Message 1 of 10
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
I have found this code that works but how do I do this without the FOR statement? Can't I just call the dimension by its name somehow? I cannot get it to work.
Here is what I have that works:
'get the sketch to work with
oSketch = ThisDoc.Document.ComponentDefinition.Sketches.Item("Top of door frame s")
i=0
For i = 1 To oSketch.DimensionConstraints.Count If oSketch.DimensionConstraints.Item(i).Parameter.Name = "doorAngle" Then oSketch.DimensionConstraints.Item(i).Driven = False Exit For End If Next
How can I just say:
oSketch.DimensionConstraints.Item(doorAngle).Driven = False
It throws an error.
Thanks group.
Solved! Go to Solution.