IsDocumentOpened

<< Click to Display Table of Contents >>

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

IsDocumentOpened

available from build: 20040916

Description

The command checks if the passed file name is already opened in the hosting CAD application.

 

Syntax

call DBWShell("IsDocumentOpened DocPathName")

 

Parameters

DocPathName

full path name of the document to check

 

Results

@OK_OPENED

1: the document is already opened
0: is closed

 

Examples

ffn="c:\my documents\store\assembly1.sldasm"

ffn=replace(ffn," ", "|")
Call DBWShell ("IsDocumentOpened " & ffn)
okOpened = DBWResult("@OK_OPENED")
if okOpened then
 DBWMsgBox "the document is already opened"
end if