|
<< Click to Display Table of Contents >> Navigation: Programming Mechworks PDM > DBWCommandShell > Library Reference > Document > DBWCheckIfDrawingExists |
Check if a drawing related to the specify part/assembly exists
Function DBWCheckIfDrawingExists(Part_Asm_Uid, byref DrawingUid, byref num_of_draw, byref drawIDArray)
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 |
DBWCheckIfDrawingExists2 function.
Dim drawIdArray()
DBWShell("CurrentDocument")
uid = DBWInput("@DOCUMENT_UNIQUE_ID")
if DBWCheckIfDrawingExists(uid, DrawingUid, numofdrawings, drawIdArray)<>"" then
for i=1 to Ubound(drawIdArray)
msgString = msgString & vbcrlf & drawIdArray(i)
next
DBWMsgBox cstr(numofdrawings) & " drawing(s) found:" & vbcrlf & msgString
else
DBWMsgBox "No drawings found"
end if