DBWSelectFromWhereUsed

<< Click to Display Table of Contents >>

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

DBWSelectFromWhereUsed

Description

Returns the documents where the current one is used.

Syntax

Function DBWSelectFromWhereUsed(DocUid, WhereUsedType, Title)

Parameters

DocUid

unique id of the document of which find users.

WhereUsedType

filter to select only some type of document between the users.
The string must be as follows:

for every type of doc:<commas><commas>
example: ""

for a single type of doc: <commas><apostrophe>+ type to find+<apostrophe><commas>
example: "'A'" this shows only assemblies

for multiple type of doc:
<commas>
<apostrophe>+ 1st type to find+<apostrophe><comma>
<apostrophe>+ 2nd type to find+<apostrophe><comma>

...

<commas>
example: "'A','P'" this shows both assemblies and parts

Title

It is the title of the dialog shown

Remarks

SelectFromWhereUsed

The dialog containing parent documents of the current one

Data in the dialog are shown in the format:

<ID> | <DESCRIPTION> | <DOC_TYPE> | <UNIQUE_ID>

Return values

The function assumes the value of the unique id of the document selected in the dialog.

See also

DBWWhereUsed

Example

Sub Main()
 DBWInit(TRUE)
 'retrieve the currently selected document
 call dbwshell("currentDocument")
 docUID=DBWResult("@DOCUMENT_UNIQUE_ID")
 WhereUsedType=""
 title = "Document with UID=" & docUID & " is used in"
 msgbox DBWSelectFromWhereUsed( DocUid, WhereUsedType, title )
End Sub