Hallo Ralf, danke schon einmal!
Ich habe das folgendermaßen gelöst.(in iLogic)
'-----------------------------
Dim oPartDoc As PartDocument
oPartDoc = ThisApplication.ActiveDocument
Dim oCompDef As PartComponentDefinition
oCompDef = oPartDoc.ComponentDefinition
Dim oWorkPlanes As WorkPlanes
oWorkPlanes = oCompDef.WorkPlanes
Dim oWorkPlane As WorkPlane
Dim oFeats As PartFeatures
oFeats = oCompDef.Features
Dim oiFeats As iFeatures
oiFeats = oFeats.iFeatures
Dim oiFeat As iFeature
'oiFeat = oiFeats.Item(oiFeats.Count)
Dim oFace As Face
Dim Stanzbildname As String
Dim j As Integer
Dim i As Integer
Dim Name_Workplane As String
Dim ebene_1 As Object
''--------------------------------Suche nach Bearbeitung in der Ebene "Höhe 2" ----------------------|
For i = 1 To oCompDef.WorkPlanes.Count '----------------------|
Name_Workplane = oCompDef.WorkPlanes.Item(i).Name
'MessageBox.Show(Name_Workplane, "Title")
If Name_Workplane = "hoehe_2" Then
'MessageBox.Show(Name_Workplane, "Title")
For j = 1 To oPartDoc.ComponentDefinition.Features.iFeatures.Count
oiFeat = oiFeats.Item(oiFeats.Item(j).Name)
oFace = oiFeat.Faces.Item(1)
'MessageBox.Show(j, "Title")
If(oiFeat IsNot Nothing) Then
'Stanzbildname = oPartDoc.ComponentDefinition.Features.iFeatures.Item(j).Name
ThisDoc.NamedEntities.SetName(oFace, "Bearbeitung_H2_nr" & j)
'MessageBox.Show(Stanzbildname, "Title")
End If
Next
Else
'MessageBox.Show("Gibt es nicht", "iLogic")
End If
Next
Eine Antwort auf diesen Beitrag verfassen (mit Zitat/Zitat des Beitrags) IP