Message 1 of 5
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Can anybody help?
I am trying to set the colour of a part, via a VBA macro, using RGB Values.
Can someone try the following VBA macro on a Inventor part (ipt) document and let me know if you are getting the same error as me?
Public Function SetPartColour()
Dim oDoc As PartDocument
Set oDoc = ThisApplication.ActiveDocument
Dim color As ColorAssetValue
Set color = oDoc.ActiveAppearance.Item("generic_diffuse")
color.Value = ThisApplication.TransientObjects.CreateColor(Red, Green, Blue)
End Function
I get an error on the line highlighted in RED
Does anybody know how I can fix the error?
Many thanks in advance!!!!
Darren
Solved! Go to Solution.