TheSwamp
Code Red => AutoLISP (Vanilla / Visual) => Topic started by: Brick_top on December 07, 2011, 04:23:03 AM
-
Hi... thread title says it.
I would like to set a document active in this case a dwg using autolisp.
thanks!
-
(if (setq filename (vla-open (vla-get-Documents (vlax-get-acad-object))
"put here the complete path of your file"
:vlax-false
)
)
(vla-activate filename)
)
-
thanks a lot! :-)
-
thanks a lot! :-)
You're welcome . :-)
-
I forgot to mention the file I want to set active is already opened.
do you know how to do it in this case?
-
If the drawing is named "Drawing111.dwg"
but keep in mind that your lisp is loaded into the previous document ( the one prior to the change)
-
Thanks a lot Kerry,
I know the lisp file will not be loaded into the new active drawing.
Thanks again.
-
I would advise against having the VLIDE open when evaluating vla-activate - the two don't mix too well. :wink:
-
oh..
I'll try to remember that!
thanks...
Anyway I could close VLIDE before I use vla-activate?
-
That might help, though your bigger problem is what you do after the activate. It's near impossible to get lisp to continue working on another drawing from the one you started the routine. Or at least extremely difficult with strange work-arounds.
-
Hi irneb
I'm not trying to do that now, I just want to set an already opened drawing active without any problems. I intend to run another routine on that drawing.