|
DigiPara Liftdesigner LDX API
|
API method: ILDXDocuments.Item
' from Samples/Src/LDXAPIExamples/Example_LDXDocuments.vb
<APIHelpAttribute(APIHelpModes.FireCalcModel, {APIHelpModes.InputParaLDXApp, APIHelpModes.InputParaOnlyDefaultFileName}, "", "LDXDocuments~Item", "Check LDXDocument is opened in DigiPara Liftdesigner")>
Public Shared Sub CheckLDXDocumentIsOpen(ByRef ldxApplication As DigiPara.LDX.LDXApplication, ld3FileName As String)
For index = 0 To ldxApplication.Documents.Count - 1
If System.IO.Path.GetFileName(ldxApplication.Documents.Item(index).Filename.ToUpper) = ld3FileName.ToUpper Then
MsgBox("File " + ld3FileName + " is opened ☺")
Exit Sub
End If
Next
MsgBox("File " + ld3FileName + " is not opened ☹")
End Sub