question

hermione12 avatar image
1 Like"
hermione12 asked Jason Lightfoot edited

How to do excel import for a pointer string data to global table?

Hello,

I am using the pointer string data in my global table to read the object as a destination for my parts. As there will be a huge data, I am using excel import to import all the data to the global table. But, when I import "Destination " column (which needs to be pointer string data) it does not get imported as a pointer string data but as a text. I am manually setting each column as pointer string data.

How to do this? Please help.

1672104933379.png


FlexSim 20.0.10
excel importpointer string
1672104933379.png (8.7 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.

1 Answer

Jason Lightfoot avatar image
1 Like"
Jason Lightfoot answered Jason Lightfoot edited

In the post import code use the string value to find the object and set the cell value to point to that. You may be able to do it with a single SQL update statement joining on the Objects() table.

· 8
5 |100000

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

hermione12 avatar image hermione12 commented ·

can you tell me what is the Objects() table? I did not understand how to do this using a single SQL update statement.

1 Like 1 ·
Jason Lightfoot avatar image Jason Lightfoot ♦♦ hermione12 commented ·

If you have this in the model:

1672151837734.png

Then the replacement query would be:

Table.query("UPDATE GlobalTable1  a INNER JOIN Objects() b ON b.Object.name==a.ObjectRef  SET a.ObjectRef=b.Object");

..which results in this table:

1672152049511.png

In more complex, hierarchical models you may want to match on the full path rather than just the name.

Unfortunately - you need version 20.2 or later for this to work.

20.2_UpdateObjectRefFromObjects.fsm

0 Likes 0 ·
1672151837734.png (26.8 KiB)
1672152049511.png (3.8 KiB)
hermione12 avatar image hermione12 Jason Lightfoot ♦♦ commented ·
Thank you @Jason Lightfoot

I am bound to use the flexsim version 20.0.10 for my simulation modelling. Can you please tell me an alternative for the same?

0 Likes 0 ·
Show more comments