Hi Forum,
I am trying to use oDestDoc to retrieve the material of the opened component. Here's what I have so far:
oDestDoc = ThisApplication.Documents.Open(File, False)
oDestDoc.PropertySets.Item("All Properties").Item("Material").Value 'doesn't work
oDestDoc.Close
Best regards,
Felix
Solved! Go to Solution.
Solved by bradeneuropeArthur. Go to Solution.
Public Sub main() Dim a As Application a = ThisApplication Dim b As PartDocument b = a.documents.open(File, false) ' FILE TO BE DEFINED!!!
'OR USE b = a.Activedocument Dim c As String c = b.ActiveMaterial.DisplayName MsgBox c b.close End Sub
Regards,
Arthur Knoors
Autodesk Affiliations:
Autodesk Software:Inventor Professional 2024 | Vault Professional 2022 | Autocad Mechanical 2022
Programming Skills:Vba | Vb.net (Add ins Vault / Inventor, Applications) | I-logic
Programming Examples:Drawing List!|Toggle Drawing Sheet!|Workplane Resize!|Drawing View Locker!|Multi Sheet to Mono Sheet!|Drawing Weld Symbols!|Drawing View Label Align!|Open From Balloon!|Model State Lock!
Posts and Ideas:Dimension Component!|Partlist Export!|Derive I-properties!|Vault Prompts Via API!|Vault Handbook/Manual!|Drawing Toggle Sheets!|Vault Defer Update!
! For administrative reasons, please mark a "Solution as solved" when the issue is solved !
Can't find what you're looking for? Ask the community or share your knowledge.