Change color in sub-assembly (override from top assembly)

Change color in sub-assembly (override from top assembly)

Anonymous
Not applicable
886 Views
7 Replies
Message 1 of 8

Change color in sub-assembly (override from top assembly)

Anonymous
Not applicable

I have no idea on how to solve this problem.

 

What i want is this code:

Component.Color("023512-15:1") = Farve

to work on parts in a subassembly

 

my first intuision was this, but didn't work:

 

Component.Color("023512-18:1", "023512-15:1") = Farve

 

What should i do?

0 Likes
887 Views
7 Replies
Replies (7)
Message 2 of 8

BrandonBG
Collaborator
Collaborator
0 Likes
Message 3 of 8

HermJan.Otterman
Advisor
Advisor

 

it should be:

 

Component.Color("023512-18:1", "023512-15:1") = "Farve"

 

(it should be written like a string so with the "")

 

and Farve should be an existing color

If this answers your question then please select "Accept as Solution"
Kudo's are also appreciated Smiley Wink

Succes on your project, and have a nice day

Herm Jan


0 Likes
Message 4 of 8

Anonymous
Not applicable

Rule Compile Errors in Farve, in 023512-00.iam

Error on Line 24 : Der er for mange argumenter til 'Public Property Color(componentName As Object) As String'.

i get this error

 

Also, The is a mutiValue list of colors so it should be wothout "", as far as i know.

 

0 Likes
Message 5 of 8

HermJan.Otterman
Advisor
Advisor

Hello Mikael,

 

look at my assembly.

the colors are cashed, so they exist.

 

look at the rules, these change the colors.

 

if it doesn't work for you, maybe you can share you assembly/part with the code you use, and I will look at it.

If this answers your question then please select "Accept as Solution"
Kudo's are also appreciated Smiley Wink

Succes on your project, and have a nice day

Herm Jan


0 Likes
Message 6 of 8

Anonymous
Not applicable

I also need the .ipt files, if i should open your .aim.

 

Anyhow, I think the problem occurs in the Pattern i have. the component i want to change color of is in an assembly in a pattern.

and good suggestions?

0 Likes
Message 7 of 8

HermJan.Otterman
Advisor
Advisor

Hello Mikael,

 

sorry, I attached the wrong file.

 

hope  this helps

If this answers your question then please select "Accept as Solution"
Kudo's are also appreciated Smiley Wink

Succes on your project, and have a nice day

Herm Jan


0 Likes
Message 8 of 8

Anonymous
Not applicable

Hello again HermJan.

 

Your assembly on have 2 parts, i have a subassembly indside my assembly, so the task is not the same 😕

i have also made a function which can the same as our assembly 🙂

 

also, my sub-assembly are in a pattern.

 

0 Likes