DigiPara Liftdesigner LDX API
Loading...
Searching...
No Matches
Show geometry path of sheet frame

API method: ILDXApplication5.PoolPath

 ' from Samples/Src/LDXAPIExamples/Example_LDXSheetFrame.vb

    <APIHelpAttribute(APIHelpModes.FireCalcModel Or APIHelpModes.LoadLD3File, {APIHelpModes.InputParaLDXDoc}, "", "LDXApplication~PoolPath", "Show geometry path of sheet frame")>
 Public Shared Sub ShowGeometryPathOfSheetFrame(ByRef ldxDocument As DigiPara.LDX.LDXDocument)

     If ldxDocument.Sheets Is Nothing Or ldxDocument.Sheets.ActiveSheet Is Nothing Then
         MsgBox("Active sheet not found! Please reload the .ld3 file.")
         Exit Sub
     End If

     Dim sheetFrames As String = ""
     For Each ldxSheetFrame As DigiPara.LDX.LDXSheetFrame In ldxDocument.Sheets.ActiveSheet
         Try
             sheetFrames += Environment.NewLine + String.Format("{0} ({1}{2})",
                                                                                      ldxSheetFrame.Object.ObjectPrefix,
                                                                                      ldxDocument.Application.PoolPath,
                                                                                      TryCast(ldxSheetFrame.Object.GetObjectByRelativeName("Storage.SHFRITEM_FILENAME").LDXType, DigiPara.LDX.LDXObjectStorageText).Text.Substring(1))
         Catch
         End Try
     Next

     MsgBox(String.Format("Geometry paths of all sheet frames are:{0}{1}Frame count: {2}",
                                   sheetFrames.Replace(IO.Path.DirectorySeparatorChar, "/"), Environment.NewLine, ldxDocument.Sheets.ActiveSheet.Count.ToString))

 End Sub