question

weiiiii avatar image
0 Likes"
weiiiii asked Jeanette F commented

get Parameter value

8.24.fsm1692757953814.png

I want to use the form, [2][2], to read the value of the parameter

But I don't know how to write it


It's wrong like this

1692758086916.png

FlexSim 22.2.0
parameters
1692757953814.png (16.3 KiB)
1692758086916.png (23.0 KiB)
824.fsm (75.5 KiB)
· 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.

1 Answer

Nil Ns avatar image
0 Likes"
Nil Ns answered

Hello and thank you for your question.


The parameter table is not intended for this use. To do this, you could use a normal table or access the parameter by its name directly. However, the problem you are having is because the function you are looking at returns the node where the value is, not the number itself. To get the number, you must add .value at the end of the expression:

  1. getvarnode(Model.find("Tools/ParameterTables/Parameters"), "parameters").as(Table).cell(7, 2).value

I hope this helps!

5 |100000

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