question

Patrick Cloutier avatar image
0 Likes"
Patrick Cloutier asked Joshua S edited

How to convert imported Excel text string into a pointer label?

I'm importing an Excel file into a People ProcessFlow Schedule Source. 2 of the columns are used to create pointer labels on the tokens. They are called Origin and Destination and they are used to tell the process flow where to create the persons and where they should walk.

My question is how do I convert the text in Excel into a pointer label? All the texts are exact object names. For example ES1 is an object named ES1. I tried ES1 and /ES1 but in both cases the data is imported as text.

I see 2 choices. Do some Post Import Code to convert the text string into a pointer. Or do this conversion in the Process Flow after the token is created. In either case I can't find which command to use. I tried tonode() but can't seem to make it work.

Thanks a lot,

FlexSim 18.1.1
excel importpointer 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

·
Joshua S avatar image
0 Likes"
Joshua S answered Joshua S edited

How is your Process Flow referencing the Origin and Destination? Could you do reference like

model().find(Table("Schedule")[1][1])

where you can manipulate the table lookup based on the token?

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

Patrick Cloutier avatar image Patrick Cloutier commented ·

There is no global table. It's in the Source. Actually it is a process flow Date Time Source so I just added labels in it and the labels are automatically created on the tokens. I then reference them as token.Origin.

It worked great as long as the label is a pointer label. But when I import the table from Excel the info is a text so the label is created as a text label. How to I then change the label to a pointer? I can't just click the column and AssignData because then the content is erased. I need code that tells the label and its text content to be a pointer instead.

0 Likes 0 ·
Patrick Cloutier avatar image Patrick Cloutier Patrick Cloutier commented ·

Forget that. I just found it.

I just have to update the value of token.Orig to model().find(token.Orig) and it automatically makes the label a pointer label.

Thanks,

0 Likes 0 ·

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.