question

10Dulkar avatar image
0 Likes"
10Dulkar asked Andrew O commented

FlexScript help

Can anyone help with a flexscript code to access and change the values of Speed Table's speed_multiple with 2 content and 3 content.


1670346272756.png

FlexSim 22.1.4
flexscript code
1670346272756.png (5.3 KiB)
· 1
5 |100000

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

Andrew O avatar image Andrew O commented ·

Hi @sachin T3, was Matthew Gillespie's answer helpful? If so, please click the "Accept" button at the bottom of their answer. Or if you still have questions, add a comment and we'll continue the conversation.

If we haven't heard back from you within 3 business days we'll auto-accept an answer, but you can always unaccept and comment back to reopen your question.

0 Likes 0 ·

1 Answer

Matthew Gillespie avatar image
0 Likes"
Matthew Gillespie answered

You can get the speedtable variable and assign it to a Table variable and then access it using the Table API, like this:

Table speedTable = getvarnode(Model.find("TrafficControl1"), "speedtable");
speedTable[1][2] = 0.1;
speedTable[2][2] = 0.3;
5 |100000

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