question

Jay K9 avatar image
0 Likes"
Jay K9 asked Jay K9 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 K9 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 K9 avatar image Jay K9 commented ·
How can I tick attach load as trailers with this script?
0 Likes 0 ·
Jason Lightfoot avatar image Jason Lightfoot ♦ Jay K9 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 K9 avatar image Jay K9 Jason Lightfoot ♦ commented ·

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

0 Likes 0 ·
Show more comments

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

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