Message 1 of 2
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
I'm composing iLogic rule that should inform user whether the IPT has any sketch that was not used for creating Solid/Surface Bodies (return Sketch Name if any).
Initially I thought I would use Sketch.Parent property value but now I don't think it was good idea because it only returns Part or SheetMetal Component definition enumerator.
Now I think the fastest way would be to analyse browser tree (check if there is any parent PartFeature object for each Sketch) but i lack experience of processing the model-tree. Till now I have this:
Dim oSketch As Sketch Dim oCompDef As PartComponentDefinition oCompdef = ThisApplication.ActiveDocument.ComponentDefinition Dim oControlDef As ControlDefinition oControlDef = ThisApplication.CommandManager.ControlDefinitions.Item("AppFindInBrowserCtxCmd") For each oSketch in oCompDef.Sketches ThisApplication.ActiveDocument.SelectSet.Clear ThisApplication.ActiveDocument.SelectSet.Select(oSketch) oControlDef.Execute MsgBox(oSketch.Name) ' Comment after debugging 'if ??? Then MsgBox (oSketch.Name): Exit For Next
Could somebody hint what should I put instead "???" to achieve my goal ?
Please vote for Inventor-Idea Text Search within Option Names
Solved! Go to Solution.