|
DigiPara Liftdesigner LDX API
|
API method: ILDXObject5.ContentAsString
' from Samples/Src/LDXAPIExamples/Example_LDXSheetFrame.vb
<APIHelpAttribute(APIHelpModes.FireCalcModel Or APIHelpModes.LoadLD3File, {APIHelpModes.InputParaLDXDoc}, "", "LDXObject~ContentAsString", "Selected objects")>
Public Shared Sub SelectedObjects(ldxDocument As DigiPara.LDX.LDXDocument)
If ldxDocument.Sheets Is Nothing Or ldxDocument.Sheets.ActiveSheet Is Nothing Then
MsgBox("The are no active sheets in the drawing!")
Exit Sub
End If
Dim selectedObjects As String = ""
For Each ldxSheetFrame As DigiPara.LDX.LDXSheetFrame In ldxDocument.Sheets.ActiveSheet
For Each ldxObject As DigiPara.LDX.LDXObject In ldxSheetFrame.SelectedObjects
selectedObjects += Environment.NewLine + String.Format("{0}{1} ({2})", "DigiPara.LDX.", ldxObject.ContentAsString, ldxObject.ObjectPrefix)
Next
Next
MsgBox(If(selectedObjects = "", "There are no selected objects in the drawing!", "Selected objects are:" + selectedObjects))
End Sub