Message 1 of 3
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Hello,
I try to rename workpoints within a rectangular pattern (see picture). This pattern or collection is created with a another collection of workpoints.
My problem is that the code only change the names of the first workpoints in each element.
Is there a way to change all the names?
'Set the document Dim oDoc As PartDocument oDoc = ThisDoc.Document 'Set the component definition Dim oCompDef As PartComponentDefinition oCompDef = oDoc.ComponentDefinition 'Set the circular pattern features collection Dim oCircularPatternFeature As CircularPatternFeature oCircularPatternFeature = oCompDef.Features.CircularPatternFeatures.Item("PointPattern") Dim oElement As FeaturePatternElement For Each oElement In oCircularPatternFeature.PatternElements If oElement.Index = 1 Then 'do nothing Else Dim oworkpoint As WorkPoint oworkpoint = oElement.ResultFeatures.Item(1) oworkpoint.Name = "TestPoint" & oElement.Index End If Next ThisDoc.Document.Update
Solved! Go to Solution.