Page 1 of 1

Possible to change settings of many atoms in a table?!

Posted: Wednesday 30 September, 2015 - 20:17
by christian123456
Hi all,

I have in my simulation various conveyors and they all have a speed of 2m/sec. Now I would like to change that to another value, but it somehow not that advanced to change this in every atom individually. Does anybody know if this can be done in a central table or is it possible to set a reference from one conveyor to another so that only one needs to be changed?

Thanks guys!

Christian

Re: Possible to change settings of many atoms in a table?!

Posted: Thursday 01 October, 2015 - 09:35
by Bram de Vries
Hello Christian,

The entry field for the speed of a container allows 4DScript code (denoted by 4DS), so you can refer to the cell of a table you inserted in the model. The table atom can be found under DATA in the model tree. When you create an alias for this table and use the atom name for instance, you can refer to a table called MyTable with the word refMyTable. To refer to the first cell in this table you can then use this command:

Code: Select all

Cell(1, 1, refMyTable)
You of course refer to other cells in the table, in fact the first parameter of the Cell function denotes the row and the second the column you want to access. You can then enter your desired speed in the cell you are going to use and then use the cell function in the speed entry field of your conveyors. This way, when you change the value in the cell, the speed for all conveyors is changed at once.

Kind regards,

Bram

Re: Possible to change settings of many atoms in a table?!

Posted: Thursday 01 October, 2015 - 21:39
by christian123456
Wow, it works :) Thank you very much again.

Christian