Component.Color() set to default

Component.Color() set to default

atomic.lex
Enthusiast Enthusiast
551 Views
1 Reply
Message 1 of 2

Component.Color() set to default

atomic.lex
Enthusiast
Enthusiast

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? 

0 Likes
Accepted solutions (1)
552 Views
1 Reply
Reply (1)
Message 2 of 2

JhoelForshav
Mentor
Mentor
Accepted solution

Hi @atomic.lex 

Try this 🙂

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)