|
<< Click to Display Table of Contents >> Navigation: Programming Mechworks PDM > DBWCommandShell > Library Reference > Document > DBWCheckIfDrawingExists2 |
Check if a drawing related to the specify part/assembly exists; it's similar to DBWCheckIfDrawingExists but it also returns an array containing unique ids of found drawings.
Function DBWCheckIfDrawingExists2(Part_Asm_Uid, byref DrawingUid, byref num_of_draw, byref drawIdArray, byref drawUidArray)
Part_Asm_Uid |
is the part or assembly unique id |
The function assumes the value of the last (if more than one) drawing found or empty string if no drawing exist.
DrawingUid |
contains the the unique id of the drawing; in case of more than one it contains the last one. |
|---|---|
num_of_draw |
contains the number of drawings found |
drawIdArray |
is an array containing ids of drawings found |
drawUidArray |
is an array containing UIDs of drawings found |
DBWCheckIfDrawingExists function.
DBWShell("CurrentDocument")
uid = DBWInput("@DOCUMENT_UNIQUE_ID")
Dim drawIdArray()
Dim drawingUIDArray()
if DBWCheckIfDrawingExists2(uid, DrawingUid, numofdrawings, drawIdArray, drawingUIDArray)<>"" then
for i=0 to Ubound(drawIdArray)-1
msgString = msgString & vbcrlf & drawIdArray(i) & " - uid=" & drawingUIDArray(i)
next
DBWMsgBox cstr(numofdrawings) & " drawing(s) found:" & vbcrlf & msgString
else
DBWMsgBox "No drawings found"
end if