question

MINGYU L avatar image
0 Likes"
MINGYU L asked David Seo answered

how to access control area's max allocations using custom code?

Hello.

I wanna access control area's max allocations value and change the value using custom code when an event occurs on waypoints.

How to get control area's max allocations and change the value?

※For reference, I have tried two methods below, but it does not work.

Object ca_1 = model().find("ControlArea1");

1) setvarnum(ca_1, "Max Allocations", 12);

2) ca_1.variables.maxAllocations = 12.00;

FlexSim 20.0.3
controlarea
· 2
5 |100000

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

David Seo avatar image David Seo commented ·

@MINGYU L

Did you use 'setvarnum(ca_1, "maxAllocations", 12);' ?

You can find the variables name in tree menu like attached picture.

0 Likes 0 ·
tree-icon-menu.png (17.4 KiB)
MINGYU L avatar image MINGYU L David Seo commented ·

Thank you for your reply.

I tried the method you said, but it didn't work.

I tried several methods, and the following method changed the value.
treenode ca_1 =model().find("/AGVNetwork/ControlArea13>variables/maxAllocations");
ca_1.value = 12;
0 Likes 0 ·

1 Answer

·
David Seo avatar image
0 Likes"
David Seo answered

Good!

Also, you can find the "Max Allocations" field in the value settings of the quick property tab with a static value.

Or treenode ca_1 = model().find("ControlArea1");

ca_1.variables.maxAllocations.value = 12;

5 |100000

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

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.