question

Mischa Spelt avatar image
0 Likes"
Mischa Spelt asked Arun Kr answered

setProperty in specific units

Is there a switch for setProperty which allows me to set the units, or set the value of the property in the current units?

E.g. I have a conveyor with a speed of 20 m/min:

conveyor-mmin.png

But after setting the speed

// The Speed label on the conveyor is in m/min
conveyor.setProperty( "Speed", conveyor.Speed.value / minutes(1) )

the unit is displayed in the standard model units:

conveyor-ms.png


FlexSim 24.0.3
setproperty
conveyor-mmin.png (2.7 KiB)
conveyor-ms.png (3.6 KiB)
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

Arun Kr avatar image
1 Like"
Arun Kr answered

You can set the units with.

Object c = Model.find("StraightConveyor1");
c.setProperty("Speed",[5,"mm/s"]);

Press reset after executing the code.

5 |100000

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