[i=s] 本帖最后由 zorsite 于 2012-12-4 08:54 编辑 [/i]
版本为Flexsim6.02中文版
具体操作见GIF附件。
[color=Red]编译器控制台出错提示:[/color]
Flexscript Error MAIN:/project/model/发生器3>variables/creationtrigger line 30 syntax error, unexpected '}', expecting end of code check for the proper number of parentheses/braces
Could not finish parsing because of previous errors.
[color=Red]系统控制台出错提示:[/color]
exception: parse error at line number 31: syntax error, unexpected '}', expecting end of code
exception: parse error at line number 31: syntax error, unexpected '}', expecting end of code
[color=Red]系统生成的代码:[/color][code]treenode item = parnode(1);
treenode current = ownerobject(c);
int rownumber = parval(2); //row number of the schedule/sequence table
{ //************* PickOption Start *************\\
/***popup:SetTypeAndColor*/
/**设置临时实体类型和颜色*/
/** \nFlowitem: */
treenode involved = /***tag:involved*//**/item/**/;
/** \nItemtype: */
double newtype = /***tag:type*//**/duniform(1,3)/**/;
/**\n\n*/
setitemtype(involved,newtype);
colorarray(involved,newtype);
} //******* PickOption End *******\\{ //************* PickOption Start *************\\
/***popup:SetColor:hasitem=1*/
/**设置颜色*/
/** \n值: */
int value = /***tag:item*//**/getitemtype(item)/**/;
switch(value)
{
/***tagex:data*//**\nCase: */case /**/1/**/: /** Color: */ /**/colorred(item)/**/;break;
/**\nCase: */case /**/2/**/: /** Color: */ /**/colorblue(item)/**/;break;
/**\nCase: */case /**/3/**/: /** Color: */ /**/colorgreen(item)/**/;break;
/***/
/** \n默认值: */
default: /***tag:default_value*//**/colorarray(item, value)/**/;break;
}
/**\n\n*/
} //******* PickOption End *******\\
//************* PickOption Start *************\\
{
/***popup:CreateInitializeLabel*/
/**创建和初始化标签*/
/** \n实体: */
treenode involved = /***tag:involved*//**/item/**/;
/** \n标签: */
string labelname = /***tag:labelname*//**/"newlabel"/**/;
/** \n值: */
double newvalue = /***tag:newvalue*//**/duniform(1,3)/**/;
/**\n\n*/
set(assertlabel(involved,labelname,DATATYPE_NUMBER),newvalue);
}
//******* PickOption End *******\\
[/code] |