DBWGetDocIdFromDrawing

<< Click to Display Table of Contents >>

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

DBWGetDocIdFromDrawing

Description

Returns all the document ids contained into a drawing

Syntax

Function DBWGetDocIdFromDrawing(DrawingUid, ByRef PartAsmUIDByRef NumOfChildrenByRef ChildrenIDArray)

Parameters

DrawingUid

drawing unique id

Return Values

The function assumes the value of the last (if more than one) part/assembly id found or empty string if no child exist.

PartAsmUID

contains the the unique id of the part/assembly; in case of more than one it contains the last one.

NumOfChildren

contains the number of children found

ChildrenIDArray

array containing ids of children found

Example

DrawingUid = 125
if DBWGetDocIdFromDrawing(DrawingUid, PartAssemblyUid, numofchilds, childsIdArray)<>"" then
 DBWMsgBox cstr(numofchilds) & " child(s) found!"
 for i=1 to Ubound(childsIdArray)
  DBWMsgBox childsIdArray(i)
 next
else
 DBWMsgBox "No children"
end if