11-02-2018
09:29 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
11-02-2018
09:29 AM
I got this far but I have to do may actual job now I guess.
I'm close on the sketch part but not all sketches have dependents so you'll have to find a way around that (I'm sure a Try/Catch could do it)
oDoc = ThisApplication.ActiveDocument oFeatures = oDoc.ComponentDefinition.Features oSketches = oDoc.ComponentDefinition.Sketches ext = 1 iFeat = 1 'same pattern for other feature counts here For Each oFeature In oFeatures 'look at all the features that make up the body Select Case oFeature.Type Case = ObjectTypeEnum.kExtrudeFeatureObject oFeature.Name = oFeature.SurfaceBodies(1).Name & " - Ext. " & If (ext < 10, "0" + CStr(ext), CStr(ext)) ext = ext + 1 Case = ObjectTypeEnum.kiFeatureObject oFeature.Name = oFeature.SurfaceBodies(1).Name & " - Ext. " & If (iFeat < 10, "0" + CStr(iFeat), CStr(iFeat)) iFeat = iFeat + 1 'Case = ObjectTypeEnum.k... 'same pattern as above End Select Next For Each oSketch In OSketches If oSketch.Type = ObjectTypeEnum.kPlanarSketchObject Then For Each Dependent In oSketch.Dependents ' If Not Dependent.Definition Is Nothing Then ' oSketch.Name = Dependent.Definition.Parent.Name & " - Sketch" ' End If Next End If Next
If I've helped you, please help me by supporting this idea.
Mass Override for Each Model State
Custom Glyph Icon for iMates
Mass Override for Each Model State
Custom Glyph Icon for iMates