|
DigiPara Liftdesigner LDX API
|
API method: ILDXObject5.DisplayOptions
' from Samples/Src/LDXAPIExamples/Example_LDXObject.vb
<APIHelpAttribute(APIHelpModes.FireCalcModel Or APIHelpModes.LoadLD3File, {APIHelpModes.InputParaLDXDoc}, "", "LDXObject~DisplayOptions", "Has the selected object an editable manufacturer?")>
Public Shared Sub ShowComponentWithEditableManufacturer(ByRef ldxDocument As DigiPara.LDX.LDXDocument)
If ldxDocument.Sheets.ActiveSheet.ActiveSheetFrame.SelectedObjects.Count = 0 Then
MsgBox("The are no selected objects in this drawing. Please select an object in the drawing.")
Exit Sub
End If
With ldxDocument.Sheets.ActiveSheet.ActiveSheetFrame.SelectedObjects(0)
Dim odoDisplay As DigiPara.LDX.ObjectDisplayOptions = DigiPara.LDX.ObjectDisplayOptions.odoShowManufacturer Or DigiPara.LDX.ObjectDisplayOptions.odoShowDesc Or DigiPara.LDX.ObjectDisplayOptions.odoShowSubDesc
If (.DisplayOptions And odoDisplay) = odoDisplay AndAlso Not (.Comp.MF_DESC = "" Or .Comp.Designation1 = "" Or .Comp.Designation2 = "") Then
MsgBox(.TreeName + " has editable manufacturer")
Exit Sub
End If
MsgBox(.TreeName + " has non editable manufacturer")
End With
End Sub