question

Durga Ghosal avatar image
0 Likes"
Durga Ghosal asked Matthew Gillespie edited

what is the full dot syntax to get color component of an item/object

FlexSim 19.0.4
color
5 |100000

Up to 12 attachments (including images) can be used with a maximum of 23.8 MiB each and 47.7 MiB total.

1 Answer

·
Benjamin W2 avatar image
0 Likes"
Benjamin W2 answered Matthew Gillespie edited

Hi @Durga Ghosal,

Here is an example:

Object obj = Model.find("Processor1");
return obj.color.r;  //Returns the red component of the color.

I hope this helps!

· 2
5 |100000

Up to 12 attachments (including images) can be used with a maximum of 23.8 MiB each and 47.7 MiB total.

Durga Ghosal avatar image Durga Ghosal commented ·

To get the color. The old syntax was getcolorcomponent(item,1)

0 Likes 0 ·
Durga Ghosal avatar image Durga Ghosal Durga Ghosal commented ·

I got the syntax.

Object item;

double val = item.color.r;

Thanks

0 Likes 0 ·

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

Up to 12 attachments (including images) can be used with a maximum of 23.8 MiB each and 47.7 MiB total.