GetSelection

<< Click to Display Table of Contents >>

Navigation:  Programming Mechworks PDM > DBWCommandShell > Commands Reference > Selection >

GetSelection

Description

Returns in the variable @SELECTION the unique id of the document currently selected.

Syntax

call DBWShell("GetSelection")

Results

@SELECTION

The unique id of the selected document(s) in the tree or in a grid
In case more than one document is selected, a comma separated list of uids is returned
example: 10,42,36

Remarks

MechworksPDM browser must be open and at least one document must be selected.

Example

Sub Main()

 DBWInit(TRUE)
 DBWShell("GetSelection")
 if (okDBW) then
  selection = DBWResult("@SELECTION")
  DBWShell("WorkingSetCreate " & selection)
 end if
End Sub