Three. As you can read in the Commands Help:
sendmessage
Send a message to an object, firing its OnMessage trigger
(obj toobject, obj fromobject [, var par1, var par2, var par3])
Causes a message to be sent immediately to the toobject from the fromobject as in a direct function call. When the toobject receives the message, its OnMessage trigger will fire.
In the code of the OnMessage trigger, you may refer to the fromobject as msgsendingobject, and the three par values passed in as msgparam(1), msgparam(2) and msgparam(3). These message parameters are Variants, meaning they can be numbers, strings, treenode references or arrays.
sendmessage(current.centerObjects[1], current, item, 10);
This sends a message to the object connected to current's first center port. A reference to item is passed as par1 and the number 10 as par2.
The message parameters are Variants. You can write all of your values into an array and send that as a single parameter. Note though that this is only possible with "sendmessage()". "senddelayedmessage()" can only use numbers as parameters.
sendmessage(toObject, fromObject, [1, 2, 3, 4])
7 People are following this question.
FlexSim can help you understand and improve any system or process. Transform your existing data into accurate predictions.
FlexSim is a fully 3D simulation software environment. FlexSim can be used to simulate any process in any industry.
FlexSim®, FlexSim Healthcare™, Problem Solved.®, the FlexSim logo, the FlexSim X-mark, and the FlexSim Healthcare logo with stylized Caduceus mark are trademarks of FlexSim Software Products, Inc. All rights reserved.
Privacy | Do not sell or share my personal information | Cookie preferences | Report noncompliance | Terms of use | Legal | © Autodesk Inc. All rights reserved