|
DigiPara Liftdesigner LDX API
|
API method: ILDXComp5.AddProfile
Treename: Shaft0.Car.Frame.Profile21.
' from Samples/Src/LDXAPIExamples/Example_LDXCarFrame.vb
<APIHelpAttribute(APIHelpModes.FireCalcModel Or APIHelpModes.LoadLD3File, {APIHelpModes.InputParaLDXDoc}, "Shaft0.Car.Frame.Profile21.", "LDXComp~AddProfile", "Add a profile")>
Public Shared Sub AddAProfile(ldxDocument As DigiPara.LDX.LDXDocument)
If ldxDocument.GetLDXObject("Sheets.LdvSheet1.LdvFrame2.") Is Nothing Then
MsgBox("There is no valid sheet frame for this example. Please reload the relevant .ld3 file.")
Exit Sub
End If
Dim frame As DigiPara.LDX.LDXSheetFrame = DirectCast(ldxDocument.GetLDXObject("Sheets.LdvSheet1.LdvFrame2.").LDXType, DigiPara.LDX.LDXSheetFrame)
EnsureDeveloperMode(ldxDocument, frame)
' Add profile
Dim profile As DigiPara.LDX.LDXProfile = frame.DeveloperComp.Profiles.Add()
With profile
' Set location of the profile
.SetEquation(DirectCast(DigiPara.LDX.ProfileEquationType.peqtLocalPositionZ, Integer), "2330")
.SetEquation(DirectCast(DigiPara.LDX.ProfileEquationType.peqtLocalPositionY, Integer), "-100")
' Set material of the profile
.Comp.VisualMaterial.ChangePGOGLRID64(38, 45)
' Set part shape to flat steel
.TYP = DigiPara.LDX.ProfileType.prtQ
' Detail level 3 (High detail level)
.PG_P_DETAIL = 4
' Add sub component
.PGT_RID64 = 1
End With
End Sub