question

Kadircan T avatar image
0 Likes"
Kadircan T asked Kadircan T commented

Converting String to Pointer Label

Hello,

I use scheduled source in my model and I have pointer labels here. When I copy and paste the names of these labels from a different file, the label format turns to string. Is there any way to solve this problem?

Thank you.

FlexSim 23.1.2
pointer label
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 Kadircan T commented

The pointers are to objects in your 'from' model. They do not exist in the target model in the same memory location so you'll need to write a script to find them and reassign them.

· 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.

Jason Lightfoot avatar image Jason Lightfoot ♦♦ commented ·

You just need to find the table in the scheduled source and then read and write values from that. The easiest way is to use the sampler from the script window to sample a cell in your arrival table.

Then the script is something like this:

Table t=Model.find("Tools/ProcessFlow/ProcessFlow/Source>variables/arrivals");
for (int n=t.numRows;n>0;n--){
    Object o=Model.find(t[n]["Object"]);
    if (o)
        t[n]["Object"]=o;
}
1 Like 1 ·
Kadircan T avatar image Kadircan T Jason Lightfoot ♦♦ commented ·
thank you so much for your help, it works.
0 Likes 0 ·
Kadircan T avatar image Kadircan T commented ·

Thank you for your reply. Yes, I guessed that the solution was script but I didn't know how to express it, can you help me?

0 Likes 0 ·