I don't know why, but I delete the translation to English.
Full question:
Hi everyone, I have some problems with my code:
Terms:
- d64 - driving dimension
- d75 - driven dimension
Solution that I tried is:
- Check if the parameter "d64" is driving it works correct.
- If the first condition is True parameter "d64" should be driving too and I need to assign new value to it.
I think I have some problems with connection of two conditions, because both conditions works separately correct.
Dim oDoc As PartDocument
oDoc = ThisDoc.Document
Dim oSketch1 As Sketch
oSketch1 = oDoc.ComponentDefinition.Sketches.Item("Sketch1")
'Loop through dimensions looking for the one named d64
For Each cDim As DimensionConstraint In oSketch1.DimensionConstraints
If cDim.Parameter.Name = "d64" Then
If cDim.Driven = False Then
If cDim.Parameter.Name = "d75" Then
If cDim.Driven = True Then
cDim.Driven = False
End If
End If
End If
Exit For
End If
Next