question

Gabriel illescas Cavazos avatar image
0 Likes"
Gabriel illescas Cavazos asked Sebastian Hemmann answered

How many parameters could be able to contain a sendmessage command?

FlexSim 17.2.5
commands
5 |100000

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

1 Answer

·
Sebastian Hemmann avatar image
1 Like"
Sebastian Hemmann answered

Three. As you can read in the Commands Help:

sendmessage

Send a message to an object, firing its OnMessage trigger

Parameters

(obj toobject, obj fromobject [, var par1, var par2, var par3])

Description

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.

Example

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.

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.