几何尺寸与公差论坛------致力于产品几何量公差标准GD&T (GDT:ASME)|New GPS(ISO)研究/CAD设计/CAM加工/CMM测量

几何尺寸与公差论坛------致力于产品几何量公差标准GD&T (GDT:ASME)|New GPS(ISO)研究/CAD设计/CAM加工/CMM测量 (http://www.dimcax.com/hust/index.php)
-   SolidWorks二次开发 (http://www.dimcax.com/hust/forumdisplay.php?f=111)
-   -   【转帖】repeat last command macro (http://www.dimcax.com/hust/showthread.php?t=5681)

yang686526 2009-04-13 01:55 PM

【转帖】repeat last command macro
 
"repeat last command" macro
let me start by saying i have plenty of experience with excel vba but none with solidworks vba.
i am looking to add a button to the 'shortcut' toolbar that will repeat the last command. i currently have 'r' as my keyboard shortcut, but want to be able to click a button instead.
cheers.
the quick'n'dirty way would be sendkeys("r")
-handleman, cswp (the new, easy test)
hitting enter repeats last command as well.
if you wish to change the key that repeats the last command, goto tools pulldown>customize...>keyboard tab then in the search for: field search for "repeat"
matt lorono
cad engineer/ecn analyst
silicon valley, ca
ok, i'm guilty of not reading the question fully and responding to the last answer more so than to the question. sorry about that. handleman's solution is the easiest.
matt lorono
cad engineer/ecn analyst
silicon valley, ca


所有的时间均为北京时间。 现在的时间是 11:37 AM.