Software Customisation
Reference Manual
Summary of Objects, Members and Methods
:
Object Type Details
: Graphical Selection
Graphical Selection
The Selection object allows the PML user to interact with the 3D graphical selections set. It is not reliant on AVEVA E3D™ being in graphical mode - the selection set can be created and manipulated in TTY mode, and thus can be used in regression tests.
Only significant elements can be in selection sets. The definition of what is significant varies between graphical interaction modes:
•
in Design navigate mode, all database elements are significant
•
in Model Editor mode, then only those database elements defined in the Model Editor definition are significant, and some non-database elements.
•
In Draw mode, only drawlist elements are significant.
Most methods look for the 'highest significant element' - they climb up the ownership tree looking for significant elements, until the value of 'scope' is reached - the nearest significant element below this ceiling is used.
Set-up Methods
Name
Purpose
.selection()
Creates an empty selection object .
Methods that Modify Object
This object is manipulating the graphical selection set itself. As elements are added or removed, they will be highlighted in the graphics view at the same time (if in graphics mode).
Name
Result
Purpose
.scope(DBREF)
BOOLEAN
Defines the scope of the selection, i.e. defines the top element that the selected elements must exist beneath. Default is WORLD.
.add(DBREF)
DBREF
Adds the highest significant parent of passed element to selection
.addConnected(DBREF)
ARRAY
Simulates "Select connected" for piping components:
Adds the given component and the connected network relative to the component
.addBranchLeg(DBREF)
ARRAY
Simulates "Select leg" for piping components:
Adds the given component and adjacent components within the branch which are in the same leg as the passed component
.addAttached(DBREF)
ARRAY
Simulates "Select attached" for sections:
Adds the given section and all sections attached into the selection
.addOffspring(DBREF)
ARRAY
Adds the highest significant sub-elements of given element to selection. This action as if DBREF were ancestor for select
.remove(DBREF)
No Result
Remove highest significant parent of passed element from selection
.clear()
No Result
Empty the selection
.getCurrent()
No Result
Set the contents of the selection to the contents of the current graphical selection set
.getAll()
No Result
Set the selection set to contain the entire drawlist
.setCurrent()
No Result
Set the current graphical selection set to be the same as the contents of the selection set
Query Methods
Name
Result
Purpose
.isValid()
BOOLEAN
Is the selection valid. (This is a standard method, and should not normally need to be called)
.selected(DBREF)
DBREF
Returns highest significant parent of given element, i.e. the element which will be included in the selection
.isSelectable(DBREF)
BOOLEAN
Returns true if the given element is in itself selectable within the scope of the selection
.isModifiable(DBREF)
BOOLEAN
Returns true if the highest significant parent of the given element is modifiable
.inSelection(DBREF)
BOOLEAN
Returns true if the given element exists in the selection
.ancestors(DBREF)
ARRAY of DBREFs
Returns list of permissible ancestors for given element, within the current scope
.getSelection()
ARRAY of DBREFs
Returns all elements in the selection
CanvasSelection Object
The CanvasSelection object is more generic than the Selection object and allows the user to interact with the graphical selections set for the current document in both 2D and 3D. For example it provides PML access to the selection in both the 2D DRAW canvas and the 3D canvas in MODEL and DRAW.
Note:
That it only operates in graphical mode, not in TTY mode.
Unlike the Selection object, the CanvasSelection object allow PML access to the 2D canvas. This does not replace the Selection object for 3D which continues to provide more specialist and powerful access to the selection set in the 3D canvas.
Set-up Methods
import 'Aveva.Interaction.Generic'
using namespace 'Aveva.Interaction.Generic.Tools.Selection'
Name
Purpose
.canvasselection()
Creates an empty CanvasSelection Object
Query Methods
Name
Result
Purpose
.getselection()
ARRAY OF DBREFs
Returns all the elements currently selected in the canvas
Modify Methods
Name
Argument
Purpose
.add()canvas
DBREF
Selects the passed element if it corresponds to an entity in the canvas. Otherwise it does nothing (no error is raised).
.remove()selected in the canvas
DBREF
Deselects the passed element if it corresponds to an entity selected in the canvas. Otherwise it does nothing (no error is raised).
.clear()
Deselects all entities selected in the canvas.
1974 to current year.
AVEVA Solutions Limited and its subsidiaries. All rights reserved.