Message 1 of 2
Ref parameter from ipt to iam
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Hi forum, I have a part with a ref parameter and a code which allow me to toggle between int and ext diameter and I want to access it / make editable from iam.
Can someone help me?
I have enclosed files and the code, ver 2024
Dim oPDoc As PartDocument = ThisDoc.Document Dim oPDef As PartComponentDefinition = oPDoc.ComponentDefinition Dim oSketch As PlanarSketch = oPDef.Sketches.Item("STORAGE TANK BODY") Dim oDims As DimensionConstraints = oSketch.DimensionConstraints Dim oHeightDim As DimensionConstraint Dim oAngleDim As DimensionConstraint For Each oDim As DimensionConstraint In oDims If oDim.Parameter.Name = "STORAGE_TANK_EXTERNAL_DIA" Then oHeightDim = oDim ElseIf oDim.Parameter.Name = "STORAGE_TANK_INTERNAL_DIA" Then oAngleDim = oDim End If Next If oHeightDim.Driven Then oAngleDim.Driven = True oHeightDim.Driven = False Else oHeightDim.Driven = True oAngleDim.Driven = False End If