Announcements
Attention for Customers without Multi-Factor Authentication or Single Sign-On - OTP Verification rolls out April 2025. Read all about it here.
atomic.lex
460 Views, 1 Reply

Component.Color() set to default

Hi all,

 

it's quiet simple to set a color of the component with ilogic:

Component.Color("iPartA:1") = "Green"

but how can I remove this color and set it back to dafault? 

Labels (3)
JhoelForshav
in reply to: atomic.lex

Hi @atomic.lex 

Try this :slightly_smiling_face:

Component.InventorComponent("iPartA:1").AppearanceSourceType = AppearanceSourceTypeEnum.kPartAppearance

Or this:

Dim oAsm As AssemblyDocument = ThisDoc.Document
Dim oCol As ObjectCollection = ThisApplication.TransientObjects.CreateObjectCollection
oCol.Add(Component.InventorComponent("iPartA:1"))
oAsm.ComponentDefinition.ClearAppearanceOverrides(oCol)