|
<< Click to Display Table of Contents >> Navigation: Programming Mechworks PDM > DBWCommandShell > Library Reference > Document > DBWGetAssemblyList |
Returns a list of assemblies in which the specified document is used.
Function DBWGetAssemblyList(DocUid, byref LastAssemblyUid, byref NumOfAsm, byref AsmIDArray)
DocUid |
unique id of the document to search assemblies of |
The function assumes value of the last assembly found id.
If no assembly has been found the function assumes an empty string value.
LastAssemblyUid |
unique id of the last assembly found. |
|---|---|
NumOfAsm |
number of assemblies found. |
AsmIDArray |
array containing the IDs of assemblies found. |
Sub main()
dim asmarray()
DBWInit(TRUE)
'retrieve the currently selected document uid
call DBWShell( "CurrentDocument" )
if (okDBW = False) then exit sub
docUId = DBWResult( "@DOCUMENT_UNIQUE_ID" )
last_asm_id = DBWGetAssemblyList(DocUid, LastAsmUid, num_of_asm, asmArray)
if last_asm_id <>"" then
msgbox "Last asm found is " & last_asm_id & " with UID " & LastAsmUid
if num_of_asm>1 then
out_str = "complete list of assemblies found" & vbcrlf
for i=1 to num_of_asm
out_str = out_str & asmArray(i) & vbcrlf
next
end if
end if
End Sub