Please ensure Javascript is enabled for purposes of website accessibility
Powered by Zoomin Software. For more details please contactZoomin

AVEVA™ Unified Engineering

Whitespace Calculation on a Single Drawing

  • Last UpdatedJan 24, 2023
  • 2 minute read

To perform whitespace calculation on a single drawing, execute a piece of PML, for example:

-- Import the .NET library containing the PML API to the PML runtime.

import 'Aveva.Pdms.SDInteraction.UI'

-- Note: import cannot be executed more than once.

-- Handle the error in case we've executed it already for the current

-- E3D session.

handle ANY

endhandle

-- Enable the namespace containing the PML API.

using namespace 'Aveva.Pdms.SDInteraction.UI.Whitespace.PML'

-- Create a whitespace manager object.

!ws = object WSManager()

Note:
The above command must first be run in order to make the other commands available.

-- Whitespace a single drawing.

--

-- '/MYSHEE': the name of the sheet to whitespace. (Or a ref no.)

--

-- 300: the timeout, in seconds.

-- This is an engine timeout which doesn't include potentially

-- time-consuming

-- client-side activities, for example, collecting grey space.

--

-- 20: the MP limit at or below which we want an automatic stop.

!ws.RunAndWrite('/MYSHEE', 300, 20)

The whitespace calculation operates continuously until the first result improvement is produced, with the MP value at or below the limit. If a result cannot be calculated, the engine stops after the specified amount of time.

Note:
The computation may invoke server-imposed timeouts.

In the RunAndWrite() call, the last parameter, which is the MP limit, can be omitted in which case it is assumed zero. For example, the session can stop automatically, even if the limit is not specified, this only happens when the MP is exactly zero (as it can't be negative), which produces a perfect result according to the objective preference setting used.

There are four RunAndWrite() overloads to white space a single sheet, each with a slightly different set of parameters:

!ws.RunAndWrite(timeout)

The whitespace calculation is performed for the picture owner at the current element (CE). The calculation stops after the specified amount of time. The result (the new annotation positions) is written to the database. For example:

!ws.RunAndWrite(300)

!ws.RunAndWrite(timeout, mpLimit)

The whitespace calculation is performed for the picture owner at the current element (CE). The calculation stops after the specified amount of time. The result (the new annotation positions) is written to the database. For example:

!ws.RunAndWrite(300, 20)

!ws.RunAndWrite(picOwner, timeout)

The whitespace calculation is performed for a single picture owner. The calculation stops after the specified amount of time. The result (the new annotation positions) is written to the database. For example:

!ws.RunAndWrite('/MYSHEE', 300)

!ws.RunAndWrite(picOwner, timeout, mpLimit)

The whitespace calculation is performed for a single picture owner. The calculation is performed until the first result improvement with the MP value at or below the specified limit is produced. If it does not happen, calculation stops after the specified amount of time. The result (the new annotation positions) is written to the database. For example:

!ws.RunAndWrite('/MYSHEE', 300, 20)

TitleResults for “How to create a CRG?”Also Available in