Hi, sorry I had not seen that message in the other thread.
Try the following rule. I think it could work
Dim oDoc As PartDocument = ThisApplication.ActiveDocument
Dim oCD As ComponentDefinition = oDoc.ComponentDefinition
Dim oSketch As PlanarSketch = oCD.Sketches.Item(1)
Dim oDim As DimensionConstraint
For Each oDim In oSketch.DimensionConstraints
If oDim.Parameter.Name = "d1" Then oDim.Driven = True
If oDim.Parameter.Name = "d0" Then oDim.Driven = False
Next
'd0 = d1 * 2
oCD.parameters("d0").value = oCD.parameters("d1").value *2
InventorVb.DocumentUpdate()
iLogicVb.UpdateWhenDone = True
For Each oDim In oSketch.DimensionConstraints
If oDim.Parameter.Name = "d0" Then oDim.Driven = True
If oDim.Parameter.Name = "d1" Then oDim.Driven = False
Next
I hope this helps with your problem. Regards
Please accept as solution and give likes if applicable.
I am attaching my Upwork profile for specific queries.
Sergio Daniel Suarez
Mechanical Designer
| Upwork Profile | LinkedIn