libra86
Guest
Good morning to all,
as from title I would like to open a certain dwg file from a specially created command button.
in an old discussion I found this instruction to insert in the macro of the button:
(setq acapp (vlax-get-acad-object))
(seq acdocs (vla-get-documents acapp))
(vla-open acdocs d:/drawings/mydrawing.dwg)
(vla-activate (vla-item acdocs) (- (vla-get-count acdocs) 1))
the instruction works however I don't understand why before opening the file, it opens twice the user interface customization window (like by _.quickcui), or it opens twice the "guide" window (that of the f1 key to understand us).
only after manually closing the above windows opens the file.
Can you tell me how to remove the opening of these windows?
or do you have other methods to open a dwg by button?
Thank you in advance!
as from title I would like to open a certain dwg file from a specially created command button.
in an old discussion I found this instruction to insert in the macro of the button:
(setq acapp (vlax-get-acad-object))
(seq acdocs (vla-get-documents acapp))
(vla-open acdocs d:/drawings/mydrawing.dwg)
(vla-activate (vla-item acdocs) (- (vla-get-count acdocs) 1))
the instruction works however I don't understand why before opening the file, it opens twice the user interface customization window (like by _.quickcui), or it opens twice the "guide" window (that of the f1 key to understand us).
only after manually closing the above windows opens the file.
Can you tell me how to remove the opening of these windows?
or do you have other methods to open a dwg by button?
Thank you in advance!