Community
PowerMill Forum
Welcome to Autodesk’s PowerMill Forums. Share your knowledge, ask questions, and explore popular PowerMill topics.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Find Colours of model

8 REPLIES 8
Reply
Message 1 of 9
ulrich_luedemann
407 Views, 8 Replies

Find Colours of model

Hi,

I get models with difference colours, now I like to check how many difference colours are inside the model.

With the command "EDIT SELECTION SMART NO FORM MODELSELECT", I can see all colours,

but:

1. is it possible to get the numbers of difference colours, like $Number = size(Smart Form)?

2. can I get the RGB code from each colours what I can see inside the form?

 

 

Cheers

Ulli

UlliL
8 REPLIES 8
Message 2 of 9
icse
in reply to: ulrich_luedemann

what you mean by:

1. is it possible to get the numbers of difference colours, like $Number = size(Smart Form)?

 

2nd:

EDIT SELECTION SMART NO FORM MODELSELECT


int $num = list_num_rows('ModelSelect.List')
int $index = 0

string $msg = ""

while $index < $num {

	EDIT SELECTION MODEL STORE ${index} NEW
	string $rgb = widget('ModelSelect.Name').Value
	$msg = $msg + $rgb + CRLF
	$index = $index + 1
}

message info $msg
Message 3 of 9

🖕Great, so simple --> thank you

 

Ulli

UlliL
Message 4 of 9

is it possible to catch the name of the colour also?

 

Ulli

UlliL
Message 5 of 9
icse
in reply to: ulrich_luedemann

there are ~16,58million combinations of rgb values... i dont think theres a name for every color 😛

Message 6 of 9
icse
in reply to: ulrich_luedemann

I probably can write a algorythm that gets the color that comes the closest to the given rgb value if you like

Message 7 of 9

if I select the colour manual, I can  see the name at the right side of form,

my idea will be, to catch this name.

 

UlliL
Message 8 of 9
icse
in reply to: ulrich_luedemann

I dont know how the get the value from there...

Message 9 of 9

Ok, Thank you icse

 

UlliL

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Autodesk Design & Make Report