I am running into a problem with a smart component to generate boxes of a given size and random color. Attached is the smart component library.
The boxes get generated as required but for some reason the color is not applied. The “highlighter” signal is shown as 1 for the new copy created by the “source”. But it doesn’t have any color. If I manually set the “activatecolor” signal for SC to 0 and then 1 again, it will have color.
Anyone know why this is happening or at least a workaround. Thanks is advance!
Got an idea from your smart component and with some tinkering, I manged to get it to work.
Basically 3 changes were needed.
I used a timer to activate the “highlighter” with an OR and NOT gate so that the signal always remains high.
Unticked “transient” in the “source” component. Not sure why it works but if transient is selected, the new boxes don’t have color.
Run from simulation. If you start it from the virtual flexpendant, the timer in the smart component doesn’t work and therefore, no color is applied.
So right now my library can create a box of a given dimension (given from socket) dimension and place it at a given position(given from socket). The boxes will have random color. Box_generator2-colorSC2.zip (9.58 KB)
I’m currently also in need of a parametric box with assignable or randomly changing Color. I’ve had a look into your attachments and descriptions above but none of them worked for me. I am using RS 6.07.01, maybe this is a reason (post is from 2015..!?) Help appreciated.