question

Omar Aguilera Rico avatar image
0 Likes"
Omar Aguilera Rico asked Omar Aguilera Rico commented

Astart add members by code

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);
FlexSim 19.1.0
astar navigatorexplore structurememberadd
sin-buffer-28.fsm (90.3 KiB)
5 |100000

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

Roi Sánchez avatar image
1 Like"
Roi Sánchez answered Omar Aguilera Rico commented

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

Object agv = Model.find("AGV1");
contextdragconnection(agv,model().find("AStarNavigator"),"A");
· 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.

Omar Aguilera Rico avatar image Omar Aguilera Rico commented ·

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

0 Likes 0 ·
Joerg Vogel avatar image
1 Like"
Joerg Vogel answered

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.

5 |100000

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