发帖
 找回密码
 立即注册
搜索
9 0 0

请问如何如何根据生产状态(比如开机或停机)改变实体(比如处理器)....

匿名  发表于 2019-1-25 17:10:23
比如一台处理器,设置了SETUP TIME,则在OnSetupFinishi里设置改变固定实体3D外观的触发,表示开始作业。
系统的默认程序(已将item改成了current):
treenode item = parnode(1);
treenode current = ownerobject(c);
int port = parval(2);
{ //************* PickOption Start *************\\
/***popup:Change3DShape*/
/**Change 3D Shape*/
/** \nObject: */
treenode involved = /***tag:node*//**/current/**/;
/** \nShape Index Number: */
double theindex = /***tag:index*//**/getshapeindex("[color=#ff0000]fs3d\\General\\Box.3ds[/color]")/**/;

setname(shape(involved),"_shape");
setobjectshapeindex(involved,theindex);
/**\n*/
} //******* PickOption End *******\\

其中,
[color=#ff00]fs3d\\General\\Box.3ds[/color]
我尝试将自己的模型(SKP格式)放到这个路径下(C:\Program Files (x86)\Flexsim6\fs3d\General\),但一旦触发生效后,模型没有显示出来,读取失败?
请问正确的操作是怎样的呢?谢谢!

──── 0人觉得很赞 ────
2019-1-25 20:13:21
不清楚具体情况,可以上传模型吗?
2019-1-25 20:42:31
你好,请查看附件,
里面包含了两个SKP模型和一个FLEXSIM6版本的模型。
FLEXIM模型是想描述一个烘箱的工序过程:停机的时候,门是打开的;开机运行的时候,门是关上的,所以想通过OnSetupFinish触发和OnProcessFinish触发来改变外观,但不知该如何让它们能正确显示出来。
谢谢!

本帖子中包含更多资源

您需要 登录 才可以下载或查看,没有账号?立即注册

x
2019-1-25 23:11:14
[i=s] 本帖最后由 王奕 于 2019-1-25 23:17 编辑 [/i]

问题如图

本帖子中包含更多资源

您需要 登录 才可以下载或查看,没有账号?立即注册

x
2019-1-26 09:23:02
我式了可以呐,只是在Shap下拉框中选的.

本帖子中包含更多资源

您需要 登录 才可以下载或查看,没有账号?立即注册

x
2019-1-26 09:51:05
我用的是flexsim6版本的,一直没有试出来
2019-1-26 13:15:35
[quote][size=2][url=forum.php?mod=redirect&goto=findpost&pid=29573&ptid=11180][color=#999999]王奕 发表于 2019-1-25 23:11[/color][/url][/size]
问题如图[/quote]

我用7和18刚打开也是这样的,但是选那个shap下拉框里的就可以,6没有那个下拉框吗?或者你用吸管吸下试试呢
2019-1-26 13:23:06
[quote][size=2][url=forum.php?mod=redirect&goto=findpost&pid=29576&ptid=11180][color=#999999]Stevenzheng 发表于 2019-1-26 13:15[/color][/url][/size]
我用7和18刚打开也是这样的,但是选那个shap下拉框里的就可以,6没有那个下拉框吗?或者你用吸管吸下试试 ...[/quote]

里面代码是这样的:
treenode item = parnode(1);
treenode current = ownerobject(c);
{ //************* PickOption Start *************\\
/***popup:Change3DShape*/
/**Change 3D Shape*/
treenode involved = /** \nObject: *//***tag:object*//**/current/**/;
string shapename = /** \nShape: *//***tag:shapepath*//**/"C:\\Users\\admin\\Desktop\\flexsim model\\sketchup models_CS\\heating cabinet_type1_running.skp"/**/;

double theindex = getshapeindex(shapename);

//Grab the current size of the object
double x = xsize(involved);
double y = ysize(involved);
double z = zsize(involved);

setname(shape(involved),"_shape");
setobjectshapeindex(involved,theindex);

//Update the object to the original size
applyshapefactors(involved);
setsize(involved, x, y, z);
/** \nNote: The getshapeindex command is slow if it is called frequently.
It is better to define the shape index in a global variable that gets set
during reset. You can then replace getshapeindex with the name of your global variable.
Index values for 3D shapes can be found through the Tools>Media Files menu,
but keep in mind that index values can change when new media is loaded.*/
} //******* PickOption End *******\\
2019-1-26 13:25:51
[i=s] 本帖最后由 Stevenzheng 于 2019-1-26 13:28 编辑 [/i]

[quote][size=2][url=forum.php?mod=redirect&goto=findpost&pid=29577&ptid=11180][color=#999999]Stevenzheng 发表于 2019-1-26 13:23[/color][/url][/size]
里面代码是这样的:
treenode item = parnode(1);
treenode current = ownerobject(c);
[/quote]
那个表情是一个冒号和o,被识别成表情了:L,另外我是把原来的触发删除后重新建的触发,在原来的触发上边改了保存不上
2019-1-27 10:43:13
[quote][size=2][url=forum.php?mod=redirect&goto=findpost&pid=29578&ptid=11180][color=#999999]Stevenzheng 发表于 2019-1-26 13:25[/color][/url][/size]
那个表情是一个冒号和o,被识别成表情了,另外我是把原来的触发删除后重新建的触发,在原来的触发上边改 ...[/quote]

感谢回复,6里面没有吸管,也没有下拉框,只能通过代码来尝试。
又试了几次,还是不行,只能改用别的方法来标识了。
您需要登录后才可以回帖 立即登录
高级模式
返回
历史版块_9
热门问答
查看更多
1
流水作业线的仿真
流水作业线的仿真
33
83
2
Flexsim初级建模工程师水平标准
Flexsim初级建模工程师水平标准
30
234
3
厂区生产线布局优化案例!新做的!
厂区生产线布局优化案例!新做的!
28
224
4
图形用户界面(GUI)教学视频
图形用户界面(GUI)教学视频
25
75
5
flexsim中文教程,pdf文档已整理-重新整理
flexsim中文教程,pdf文档已整理-重新整理
25
114
博主榜
+ 5