question

Luis Gustavo Freitas avatar image
0 Likes"
Luis Gustavo Freitas asked anthony.johnson answered

Set unit on Property Table's Update Query

I am trying to use diferent time units on property table (like work with m/min on MaxSpeed and m/seg/seg on acceleration) and pull these inputs from a global table through update query, but every time i execute the query, it pulls the value but change all columns to the same time unit. To turn it back i have to manually change the unit on property table.

Would like to know how could i set or "lock" the unit to not change with the value on update query.

imagem-2022-08-18-181601143.pngimagem-2022-08-18-181547572.png

FlexSim 22.1.3
property tableupdate query
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

·
anthony.johnson avatar image
1 Like"
anthony.johnson answered

You can preserve the units by specifically storing them in the source table, by making the value into an array with two elements. The first element is the value, and the second is the units.

1660916829347.png


Unfortunately this isn't very user-friendly since copying the property table to the global table will only copy in model units, and even if it did copy arrays over, manipulating arrays in a table isn't very easy anyway. In the next release there will be an additional optional parameter to Object.getProperty() that lets you say whether you want to preserve units (i.e. get the array value instead of just a number). However, that option doesn't apply directly to this use case. I'll add an item to our dev list to consider ways to make the preservation of model units easier in this use case.


1660916829347.png (36.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.

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

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