Hallo!
Danke für die Hilfe!
Hab was zusammenbekommen, Funktioniert aber nicht. ich habs geschaft die Daten in die Dokumenteniprops zu schreiben, aber nicht für die Komponenten der Baugruppen.
-----------------
Public Sub setprop()
' Set reference to active document.
' This assumes the active document is an assembly
Dim oDoc As Inventor.AssemblyDocument
Set oDoc = ThisApplication.ActiveDocument
' Get assembly component definition
Dim oCompDef As Inventor.ComponentDefinition
Set oCompDef = oDoc.ComponentDefinition
' Get all occurrences from component definition for Assembly document
Dim oCompOcc As ComponentOccurrence
For Each oCompOcc In oCompDef.Occurrences
Dim invcustompropertyset As PropertySet
Set invcustompropertyset = oCompOcc.PropertySets.Item("Design Tracking Properties")
invcustompropertyset.Item("part number").Value = oCompOcc.Name
Next
End Sub
Eine Antwort auf diesen Beitrag verfassen (mit Zitat/Zitat des Beitrags) IP