Astart add members by code

Astart add members by code

omar_aguilera_rico
Not applicable
122 Views
3 Replies
Message 1 of 4

Astart add members by code

omar_aguilera_rico
Not applicable

[ FlexSim 19.1.0 ]

Hi. I have a model where I create and destroy objects, the objects that I create add them to a group. I want the objects that are in the group to be added to the astar, how do I do this by means of code? Try adding rows to the tree but I do not know how to modify the value of the member row:

Table thelist = getvarnode(Model.find("AStarNavigator"), "fixedResourceBarriers");
addtablerow(thelist);
0 Likes
Accepted solutions (1)
123 Views
3 Replies
Replies (3)
Message 2 of 4

joerg_vogel_HsH
Mentor
Mentor

You find the commands in the properties view of AStar, if you explore the structure of the window. @phil.bobo has described the procedure for another question and different properties here. If you can select a group to add members to be in the AStar module then you can do it by code, too.

Message 3 of 4

roi_sn
Not applicable
Accepted solution

Hi @Omar Aguilera Rico, you can use the next code:

Object agv = Model.find("AGV1");
contextdragconnection(agv,model().find("AStarNavigator"),"A");
Message 4 of 4

omar_aguilera_rico
Not applicable

Hello @Roi Sánchez! Nice to say hello again, thanks for the prompt reply. Regards!

0 Likes