Error changing part colour using VBA macro
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Can anybody help?
Can somebody try the following VBA macro and tell me if they get an error on the line that contains the words "Set color"?
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(255, 42,27) ' Red
End Function
I cannot get the macro to work. Does anybody know what's wrong.
Many thanks in advance!!!
Darren