Message 1 of 3
I want to change the Frame of a 3D model with the process flow, FlexSim 2019
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Hi everyone, i'm trying to change the frame of a 3D model and i use process flow, but it doesn't work. I recive a number from my backend and i put it in a global table, then i take it from the table to the function (Send message), and then i send it to the Model 3D;
this is the code of the send message:
Object current = ownerobject(c);
Object item = param(1);
int rownumber = param(2); //row number of the schedule/sequence table
{ // ************* PickOption Start ************* //
int NoDelay = -1;
Variant tableID="StatiVigneto";
Variant row = 1;
Variant col = 1;
Table table;
switch (tableID.type){
case VAR_TYPE_NODE: table=tableID; break;
case VAR_TYPE_STRING: table=Table(tableID.as(string));break;
default:
table = reftable(tableID.as(int));
break;
}
double delaytime = /** \nDelay Time: *//***tag:delaytime*//**/0/**list:NoDelay~0~10~current.messageDelay*/;
treenode toobject = /** \nTo: *//***tag:to*//**/Model.find("Shape62")/**/;
treenode fromobject = /** \nFrom: *//***tag:from*//**/current/**/;
double param1 = /** \nParam1: *//***tag:par1*//**/ (table[row][col]) /**/;
double param2 = /** \nParam2: *//***tag:par2*//**/0/**/;
double param3 = /** \nParam3: *//***tag:par3*//**/0/**/;
/**\n\nDelay Time:\nNoDelay: message sent immediately within trigger context\n0: delayed message sent in 0 time*/
if (/** \nCondition: *//***tag:condition*//**/true/**/) {
if (delaytime == NoDelay)
sendmessage(toobject,fromobject,param1,param2,param3);
else
senddelayedmessage(toobject, max(0,delaytime), fromobject,param1,param2,param3);
}
}