- UID
- 134979
- 积分
- 175
- 精华
- 贡献
-
- 威望
-
- 活跃度
-
- D豆
-
- 在线时间
- 小时
- 注册时间
- 2004-5-9
- 最后登录
- 1970-1-1
|
楼主 |
发表于 2004-10-18 12:31:12
|
显示全部楼层
首先可以先手功链接一个单元库,上面链接有提供。 之后就是下面的函数不能成功的替换。
函数中的颜色,层,单元等属性可以改成已有的共享单元的层,颜色属性。单元可改为M7511或M7312
sub repacell()
Dim point as MbePoint
Mbesendkeyin "REPLACE CELLS EXTENDED "
MbeSetAppVariable "SELECTBY", "selectorGlobals.level[0]", 0&
MbeSetAppVariable "SELECTBY", "selectorGlobals.level[1]", 0&
MbeSetAppVariable "SELECTBY", "selectorGlobals.level[2]", 0&
MbeSetAppVariable "SELECTBY", "selectorGlobals.level[3]", 0&
MbeSetAppVariable "SELECTBY", "selectorGlobals.colorButton", 0&
MbeSetAppVariable "SELECTBY", "selectorGlobals.styleButton", 0&
MbeSetAppVariable "SELECTBY", "selectorGlobals.weightButton", 0&
MbeSetAppVariable "SELECTBY", "selectorGlobals.typemask[0]", -1&
MbeSetAppVariable "SELECTBY", "selectorGlobals.typemask[1]", -1&
MbeSetAppVariable "SELECTBY", "selectorGlobals.typemask[2]", -1&
MbeSetAppVariable "SELECTBY", "selectorGlobals.typemask[3]", -1&
MbeSetAppVariable "SELECTBY", "selectorGlobals.typemask[4]", -1&
MbeSetAppVariable "SELECTBY", "selectorGlobals.typemask[5]", -1&
MbeSetAppVariable "SELECTBY", "selectorGlobals.typemask[6]", -1&
MbeSetAppVariable "SELECTBY", "selectorGlobals.typemask[7]", -1&
MbeSetAppVariable "REPCELL", "repCellInfo.selectMethod", 1&
MbeSetAppVariable "REPCELL", "repCellInfo.selectMode", 0&
MbeSetAppVariable "REPCELL", "repCellInfo.fromLibrary", -1&
point.x = 0.0
point.y = 0.0
point.z = 0.0
MbeSendCommand "selectby level " & M7511lv
MbeSendCommand "selectby color " & M7511co
MbeSendCommand "selectby execute "
MbeSendCommand "REPLACE CELLS EXTENDED "
'MbeSetAppVariable "REPCELL", "repCellInfo.selectMethod", 0& 更新
'MbeSetAppVariable "REPCELL", "repCellInfo.selectMode", 1& 全局
'MbeSetAppVariable "REPCELL", "repCellInfo.fromLibrary", 0& 是否使用激活单元
MbeSetAppVariable "REPCELL", "tcb->activecell", M7511ce$
MbeSendDataPoint point
MbeSendCommand "selectby execute"
MbeSendCommand "REPLACE CELLS EXTENDED "
MbeSendDataPoint point
MbeSendReset
MbeSetAppVariable "SELECTBY", "selectorGlobals.level[0]", 0&
MbeSetAppVariable "SELECTBY", "selectorGlobals.level[1]", 0&
MbeSetAppVariable "SELECTBY", "selectorGlobals.level[2]", 0&
MbeSetAppVariable "SELECTBY", "selectorGlobals.level[3]", 0&
MbeSetAppVariable "SELECTBY", "selectorGlobals.colorButton", 0&
MbeSetAppVariable "REPCELL", "tcb->activecell", M7312ce$
MbeSendCommand?selectby level " & M7312lv
MbeSendCommand?selectby color " & M7312co
MbeSendCommand "selectby execute"
MbeSendCommand "REPLACE CELLS EXTENDED "
MbeSendDataPoint point
MbeSendCommand "selectby execute"
MbeSendCommand "REPLACE CELLS EXTENDED "
MbeSendDataPoint point
MbeSendReset
end sub
不知问题出现在哪里!我在调 试的时候如果在执行前先把替换单元的工具条点起后,一次就可以替换成功 |
|