Message 1 of 3
Using a loaded macro in two or more open drawings

Not applicable
12-01-2006
07:13 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
I have a drawing template that has a VBA macro attached to it that is loaded when a new drawing is created from the template. If I type vbarun then I see only one macro available: "Drawing1.Module2.ECMacro". I have created a tiny LISP routine to automatically run this:
(defun c:ec()
(command "-vbarun" "ECMacro")
)
This works fine and will start the macro which basically is just a nice interface which allows the user to load in different sets of layers based on different disciplines.
The problem is when I have one drawing with this macro attached to it and then open a second drawing that has been created by the template as well. If I try and run the LISP routine on the second drawing, the layers load into the first drawing.
I see that when I run vbarun on the second drawing I am presented with two macro options, "ECMacro" on Drawing1 and the same on Drawing2 with the first drawing being the default selection which is most likely why the layers get created in the wrong drawing.
Is there an easy way to get around this? I appreciate all of your help!
Nick
(defun c:ec()
(command "-vbarun" "ECMacro")
)
This works fine and will start the macro which basically is just a nice interface which allows the user to load in different sets of layers based on different disciplines.
The problem is when I have one drawing with this macro attached to it and then open a second drawing that has been created by the template as well. If I try and run the LISP routine on the second drawing, the layers load into the first drawing.
I see that when I run vbarun on the second drawing I am presented with two macro options, "ECMacro" on Drawing1 and the same on Drawing2 with the first drawing being the default selection which is most likely why the layers get created in the wrong drawing.
Is there an easy way to get around this? I appreciate all of your help!
Nick