question

Ryosuke S avatar image
0 Likes"
Ryosuke S asked Jason Lightfoot commented

Creating Object by clicking button in GUI

Hello,

I'm quite new to GUI Builder, and I want to create a workpiece

from the Source1 by clicking the button created in GUI Builder.

How to I do that?

Do I code in OnPress?

In that case, how do I code it?

Thank you in advance,

Ryosuke

test-warehousearea-20200221.fsm

FlexSim 19.0.5
flexscriptsourcegui builder
5 |100000

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

Phil BoBo avatar image
1 Like"
Phil BoBo answered Ryosuke S commented

Yes, write custom code in the OnPress of the Button.

You can use the insertcopy() command to create flowitems. For an example of how this command can be used, see the "Create Flow Items" pick option in a Queue's On Message trigger:


· 3
5 |100000

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

Ryosuke S avatar image Ryosuke S commented ·

Hello @phil.bobo

Thank you for you kind reply.

Could you also help me to send OnMessage to the Queue1 from the GUI OnPress?

(I'm just a month user of FlexSim, and I'm still having difficulty understanding the relation...)

Thank you in advance

0 Likes 0 ·
Phil BoBo avatar image Phil BoBo ♦♦ Ryosuke S commented ·

You don't need to "send OnMessage to the Queue1 from the GUI OnPress".

I was just pointing you to an example of code that creates flowitems. Just look at the code to see what commands it is using and then use those commands. Or copy/paste the code from one place to the other and then modify it according to your needs.

0 Likes 0 ·
Ryosuke S avatar image Ryosuke S Phil BoBo ♦♦ commented ·

I finally got it. Thank you.

0 Likes 0 ·
Luis Fernando avatar image
0 Likes"
Luis Fernando answered Jason Lightfoot commented

Good day @Phil BoBo, I am really interested on this example but with a lot of difficult to perform on FlexSim. Phil, do you have a .fsm example of this object creation with pressing a button/ Send OnMessage to a Queue?

I will appreciate,


Thank you,

Luis V.

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

Jason Lightfoot avatar image Jason Lightfoot ♦♦ commented ·

@Luis_fernando Vr we answered your related question with a dashboard example in v21. That gave an example of creating a fixed reaource (queue) are you needing to create flowitems instead? If so here's an example:

createFlowItemOnDashButtonPress.fsm

0 Likes 0 ·