Message 1 of 5
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Hi, can anyone give me a helping hand for changing the appearance of the active part with VB.net?
I've looked through many posts, but can't seem to find something that works.
I think this code below explains what I want to achieve:
Dim invapp As Inventor.Application
invapp = GetObject(, "Inventor.Application")
Dim Doc As Document
Doc = invapp.ActiveDocument
'Grabbing row info from database
If ComboBox1.Text = row(1) Then
'row(1) = material
'row(2) = density
'row(3) = appearance
Doc.appearance = row(3)
End IfRow(3) is a copy of the displaynames of the appearances in Autodesk Appearance Library.
While searching for answers to this, I came across several posts for changing the appearance of the part occurence in assemblies, but I can't get codes like these to work:
Dim oAsset As Asset
oAsset = Doc.Assets.Item("Smooth - Red")
Doc.Appearance = oAsset
Thanks for all the help!
Solved! Go to Solution.