12-07-2021
05:59 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
12-07-2021
05:59 AM
I am not sure if I understand your idea, but please try if this code works.
'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
Dim i As Integer
Dim k As Integer = 1
For Each oElement In oCircularPatternFeature.PatternElements
If oElement.Index = 1 Then
'do nothing
Else
For i = 1 To oElement.ResultFeatures.count
Dim oworkpoint As WorkPoint
oworkpoint = oElement.ResultFeatures.Item(i)
oworkpoint.Name = "TestPoint" & k
k=k+1
Next
End If
Next
ThisDoc.Document.Update