Not applicable
11-02-2020
01:58 PM
Hello All,
I need get from "Custom" properties in assembly two value "Assembly Name" and "Assembly Nr" and write to all subassemblies and parts used in this assembly.
Bellow you can see my experiment of code for "Assembly Name", but if i try anything I get back only "(Exception from HRESULT: 0x80004005 (E_FAIL))"
Can anyone help me?
Kind Regards,
Martin Hule.
Dim oAssyDoc As AssemblyDocument = ThisApplication.ActiveDocument
Dim AllRefDocs As DocumentsEnumerator = oAssyDoc.AllReferencedDocuments
Dim oDoc As Inventor.Document = Nothing
strNR = iProperties.Value("Custom", "Assembly Name")
For Each oDoc In AllRefDocs
Dim invDesignInfo As PropertySet
invDesignInfo = oDoc.PropertySets.Item("Inventor User Defined Properties")
Dim invAssemblyNameProperty As Inventor.Property
invAssemblyNameProperty = invDesignInfo.Item("Assembly Name")
Next
Solved! Go to Solution.
Link copied