question

Lucas D4 avatar image
1 Like"
Lucas D4 asked Jon Abbott commented

It has a command to change taskExecuter navigator value?

Does anyone know if there is a command to change traveler navigator type?

I'm creating an object with a "Create Object" activity. It is created with Navigation = DefaultNavigator.

I would like to create a custom code that changes it from DefaultNavigator to AStarNavigator.


I couldn't find any command on help.

FlexSim 20.2.0
flexsim 20.2.0navigationcommand
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 Jon Abbott commented

Simple user command code would be:

  1. //User Command setNavigator
  2. Object te=param(1);
  3. Object navigator=param(2);
  4. if (objectexists(navigator)) {
  5.     clearcontents(node(">variables/navigator",te));
  6.     function_s(navigator, "addMember", te);
  7. }

which could then be called with

  1. setNavigator(Model.find("TaskExecuter1"),Model.find("AStarNavigator"));
· 1
5 |100000

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