Assign Resource to Split Token

Assign Resource to Split Token

wproctorPG49C
Observer Observer
29 Views
6 Replies
Message 1 of 7

Assign Resource to Split Token

wproctorPG49C
Observer
Observer

[ FlexSim 18.1.1 ]

I have a parent token that has an assigned resource (crane). I split the token and want one of the new tokens to acquire an additional resource (transfer car) that is already identified as a label on the parent token. When the model gets to this step, I can see that the original parent token labels were copied to the new tokens, but it is giving me an exception (callbackNode) and not assigning the resource. I've tried splitting the parent into Independent, Child and Sibling token and looked at different ways to access the label information, but nothing is doing the trick. It there something that I am doing wrong? Thanks!

0 Likes
Accepted solutions (1)
30 Views
6 Replies
Replies (6)
Message 2 of 7

Matthew_Gillespie
Autodesk
Autodesk

Can you attach your model so we can see what you're doing?



Matthew Gillespie
FlexSim Software Developer

0 Likes
Message 3 of 7

wproctorPG49C
Observer
Observer

Sure. How do I attach the file so it is confidential?

0 Likes
Message 4 of 7

Matthew_Gillespie
Autodesk
Autodesk

You have to create a new question, and mark the question as private (check the checkbox).



Matthew Gillespie
FlexSim Software Developer

0 Likes
Message 5 of 7

wproctorPG49C
Observer
Observer

Ok. I created a private question with the attachments. Thanks!

0 Likes
Message 6 of 7

Matthew_Gillespie
Autodesk
Autodesk
Accepted solution

This isn't really an issue with the Split. In an Acquire Resource activity the first field is the Resource Reference field. This field needs a reference to a Resource shared asset in a Process Flow. However, you are giving it a reference to a 3D object.

In the field you entered token.AssignedCar, but this label is pointing at, for example, the 3D object Car6 in the model. This label needs to point at the Car6 Resource in Process Flow.

Normally you would just sample the resource, but if you need to refer to it in code you can use the getactivity command:

getactivity(processFlow, "Car6")


Matthew Gillespie
FlexSim Software Developer

0 Likes
Message 7 of 7

wproctorPG49C
Observer
Observer

Thanks Matt. I'll try that. I figured out another way by just referring to the node on the tree, but your method would be better.

0 Likes