question

wonjo P avatar image
0 Likes"
wonjo P asked Jeff Nordgren converted comment to answer

batchsize how to set from port1

Hello, dear

I want to set the batchsize changed by item from port 1.

So, I write the code :

if (port == 1 && current.subnodes.length == 1)

{ setvarnum(current,"batchsize",batchsize); } }

But, I took a message, Label does not exist. at MODEL:/MOS1_3174>variables/entrytrigger

Thank you

batchsize.png

FlexSim 19.0.2
batchsize
batchsize.png (34.8 KiB)
· 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.

Joerg Vogel avatar image Joerg Vogel commented ·

How do declare the variable batchsize? For example in your code, something like:

int batchsize = 4;
1 Like 1 ·
wonjo P avatar image wonjo P Joerg Vogel commented ·

Thank you. But, I resolved my problem using a code, current.inObjects[1].

0 Likes 0 ·

1 Answer

tannerp avatar image
0 Likes"
tannerp answered

Please attach your model (or a small portion/re-creation of it) so we can identify what label it's trying to access when it gives the error. If your model contains proprietary information, you can upload this in a private question so only FlexSim U.S. can see it. Thanks!

· 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.

wonjo P avatar image wonjo P commented ·

Thank you. But, I resolved my problem using a code, current.inObjects[1].

I'm working for my customer, so I have to follow their security policy. That's why I can't upload my model. Sorry.

0 Likes 0 ·