- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Hi forum, a few days ago I make a post regarding, toggle between parameters. I thank all the members who tried to help me, so far the solutions I'm getting back are more or less the same, in the sense of alter the exiting code or variant's of the same code.
Dim oPDoc As PartDocument = ThisDoc.Document Dim oPDef As PartComponentDefinition = oPDoc.ComponentDefinition Dim oSketch As PlanarSketch = oPDef.Sketches.Item("TANK SHELL") 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 = "TANK_EXTERNAL_DIA" Then oHeightDim = oDim ElseIf oDim.Parameter.Name = "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
The code I'm currently using is working as supposed to but it doesn't solve the issues I'm dealing with.
As you can see from the recording, I can edit and write a new value on a TANK_INTERNAL_DIA and TANK_THK, but when I run the TANK SHELL TOOGLE DIA, I can't edit the TANK_EXTERNAL_DIA or the TANK_THK, the cause is the circular reference in the equation / conflict with the reference parameter TANK_THK, which I would like to keep this option.
I would like to run the TANK_INTERNAL_DIA or the TANK_EXTERNAL_DIA whenever I choose to do so, with the TANK_THK parameter intact.
I hope and I will appreciate if someone have the time to look into it.
Thank you
Solved! Go to Solution.