几何尺寸与公差论坛

 找回密码
 注册
查看: 624|回复: 0

【转帖】using methods vs seperate macros

[复制链接]
发表于 2009-4-12 22:45:46 | 显示全部楼层 |阅读模式
using methods vs seperate macros
i'm working on this macro that is starting to grow into a full blown configurator ...
problem is that my methods are starting to grow out of the roof here, and i'm thinking it might be better to split it all up and devide it into a set of seperate macro's. this to improve oversight , readablility.
wich leads me to my next question;
how can i launch/call a external/seperate macro from within a macro ?
thanks !
bert
solidworks professional 2009 sp2.0
hpxw4400 workstation
intel core2 cpu
6600 @ 2.40ghz
yes, i'm aware i have a funky surname ....
swapp.runmacro smacrofile, smodulename, sprocedurename
answer nevermind ! looked a bit deeper into it , and resolved my problem with this :
option explicit
dim swapp as sldworks.sldworks
dim boolstatus as boolean
private sub kc1image_click()
unload mainform
set swapp = application.sldworks
dim filename as string
filename = swapp.getcurrentmacropathname
filename = left(filename, instrrev(filename, "\")) + "singlecell.swp"
boolstatus = swapp.runmacro(filename, "main", "main")
end sub
greets,
bert
solidworks professional 2009 sp2.0
hpxw4400 workstation
intel core2 cpu
6600 @ 2.40ghz
yes, i'm aware i have a funky surname ....
exactly ivana !
thanks !
solidworks professional 2009 sp2.0
hpxw4400 workstation
intel core2 cpu
6600 @ 2.40ghz
yes, i'm aware i have a funky surname ....
quick
您需要登录后才可以回帖 登录 | 注册

本版积分规则

QQ|Archiver|小黑屋|几何尺寸与公差论坛

GMT+8, 2024-12-23 18:14 , Processed in 0.035397 second(s), 20 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2023 Discuz! Team.

快速回复 返回顶部 返回列表