Creating Object by clicking button in GUI

Creating Object by clicking button in GUI

sakamoto_ryosuke
Collaborator Collaborator
1,351 Views
6 Replies
Message 1 of 7

Creating Object by clicking button in GUI

sakamoto_ryosuke
Collaborator
Collaborator

[ FlexSim 19.0.5 ]

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

25870-capture2.jpg

test-warehousearea-20200221.fsm

0 Likes
Accepted solutions (1)
1,352 Views
6 Replies
Replies (6)
Message 2 of 7

philboboADSK
Autodesk
Autodesk
Accepted solution

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:

25899-create-flowitems.png



Phil BoBo
Sr. Manager, Software Development
Message 3 of 7

sakamoto_ryosuke
Collaborator
Collaborator

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
Message 4 of 7

philboboADSK
Autodesk
Autodesk

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.



Phil BoBo
Sr. Manager, Software Development
0 Likes
Message 5 of 7

sakamoto_ryosuke
Collaborator
Collaborator

I finally got it. Thank you.

0 Likes
Message 6 of 7

luis_fernando_vr
Not applicable

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.

0 Likes
Message 7 of 7

jason_lightfoot_adsk
Autodesk
Autodesk

@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