Message 1 of 10
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Hi again!
Another "share-your-knowledge"-post connected to the other one I just wrote. The next step in the workflow of finding a specified dimension after finding the sketch containing it, is often to highlight it in the sketch. I split the whole thing in two rules, because I do not always want to enter the sketch mode after finding a dimension. Of course it would be possible to connect both rules, entering the sketch mode immediately or after a user confirmation, and highlighting the constraint in the same rule.
Once again: Did I miss any easier solution shipped by Autodesk?
If TypeOf ThisApplication.ActiveEditObject Is Sketch Then
Dim oDoc As PartDocument = ThisDoc.Document
Dim oSketch As Sketch = ThisApplication.ActiveEditObject
Dim name As String = InputBox("Enter the name of the dimension to find:", "Find dimension")
If (name <> "") Then
Dim waehl As SelectSet = oDoc.SelectSet
waehl.Clear
For Each oDimConst As DimensionConstraint In oSketch.DimensionConstraints
If (oDimConst.Parameter.Name = name) Then
Logger.Info(oDimConst.Parameter.Name)
waehl.Select(oDimConst)
End If
Next
End If
End If
Solved! Go to Solution.