question

Jay Khedekar avatar image
0 Likes"
Jay Khedekar asked Jay Khedekar commented

Can I add a AGV type in AGV Network Properties in FlexScript?

I want to automate the repetitive process of creating a AGV network properties by using the script that creates a new AGV network type and sets acceleration and stuff through it.

Thanks.

FlexSim 23.0.8
flexscriptagv network properties
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 Jay Khedekar commented

You'll need something like this:


Object agvNav=Model.find("AGVNetwork");
treenode newAGVType = function_s(agvNav, "addAGVType");
applicationcommand("notifydoclistenersoncustomaction", "AGVNetwork::onAGVTypesChange");
Table speeds=Table(newAGVType.subnodes["speeds"]); 
speeds["Acceleration"]["Empty"]=0.5;
setsdtvalue(newAGVType,"idleAmps",0.5);
· 5
5 |100000

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

Jay Khedekar avatar image Jay Khedekar commented ·
How can I tick attach load as trailers with this script?
0 Likes 0 ·
Jason Lightfoot avatar image Jason Lightfoot ♦♦ Jay Khedekar commented ·
setsdtvalue(newAGVType,"trailerAttachRule",1)

You can also access it as a subnode of newAGVType node.

These are the sdt/subnode names:

1694114346655.png

1 Like 1 ·
1694114346655.png (5.5 KiB)
Jay Khedekar avatar image Jay Khedekar Jason Lightfoot ♦♦ commented ·

For future purposes, how can I know the subnode names?

0 Likes 0 ·
Show more comments