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.

Felix Möhlmann avatar image Felix Möhlmann commented ·
Just to be sure what you are trying to achieve: Which value would you expect to be returned when you use cell(2, 2)?
0 Likes 0 ·
Jeanette F avatar image Jeanette F ♦♦ commented ·

Hi @weiiiii, was Nil Ns'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 comment back to reopen your question.

0 Likes 0 ·

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:

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.