IsDetachedDrawing

<< Click to Display Table of Contents >>

Navigation:  Programming Mechworks PDM > DBWCommandShell > Commands Reference > CADSystem >

IsDetachedDrawing

Description

Checks if a drawing is detached.
Please note a detached drawing is a drawing that has been saved as detached in Solidworks CAD.

Syntax

call DBWShell("IsDetachedDrawing UniqueID")

Parameters

UniqueID

unique id of the document

Results

@IS_DETACHED_DRAWING

0: it is not a detached drawing
1: it is a detached drawing

Example

docUid=1234
call DBWShell("IsDetachedDrawing " & docUid )
IsDetached = DBWResult("@IS_DETACHED_DRAWING")
if IsDetached="1" then
 DBWMsgBox "document with uid=" & docUid & " is a detached drawing"
Else
 DBWMsgBox "document with uid=" & docUid & " is not a detached drawing"
End if

Set pDBWInit = CreateObject("MwPDMApi.Initialize")
Set pDBWAppl = pDBWInit.StartConnection(DBWorksApplicationName)
IsDetached = pDBWAppl.CADSystem.IsDetachedDrawing(docUid)