A2K: close current drawing and issue open command

A2K: close current drawing and issue open command

Anonymous
Not applicable
389 Views
9 Replies
Message 1 of 10

A2K: close current drawing and issue open command

Anonymous
Not applicable
I want a routine that will close the current drawing and issue the open
command so I can open another - I end up with too many drawings open that
I'm not using:-(

I've tried to do it with VBA and have crashed Acad twice and windows once.

Thanks in advance,

--
==============================
Michael Weaver
By day: Charles Bettisworth & Co.
[email protected]
By night: AlasCAD
[email protected]
AOL Instant messenger screen name:
AlasCAD
AUGI #w2170
==============================
0 Likes
390 Views
9 Replies
Replies (9)
Message 2 of 10

Anonymous
Not applicable
Tony Tanzillo recommended using a seperate-namespace vlx for such actions. I
have yet to try it, so let me know if it works.

--
Get free software and more at:
http://msnhomepages.talkcity.com/protectionfault/foquendo

"Michael Weaver" wrote in message
news:[email protected]...
> I want a routine that will close the current drawing and issue the open
> command so I can open another - I end up with too many drawings open that
> I'm not using:-(
>
> I've tried to do it with VBA and have crashed Acad twice and windows once.
>
> Thanks in advance,
>
> --
> ==============================
> Michael Weaver
> By day: Charles Bettisworth & Co.
> [email protected]
> By night: AlasCAD
> [email protected]
> AOL Instant messenger screen name:
> AlasCAD
> AUGI #w2170
> ==============================
>
>
0 Likes
Message 3 of 10

Anonymous
Not applicable
After a quick read, it looks like this might work, but it's going to have to
wait til I have a little more time.
Thanks for the pointer,
Mike

"Frank Oquendo" wrote in message
news:[email protected]...
> Tony Tanzillo recommended using a seperate-namespace vlx for such actions.
I
> have yet to try it, so let me know if it works.
>
> --
> Get free software and more at:
> http://msnhomepages.talkcity.com/protectionfault/foquendo
>
0 Likes
Message 4 of 10

Anonymous
Not applicable
Have you considered SDI ?

Michael Weaver wrote:
>
> I want a routine that will close the current drawing and issue the open
> command so I can open another - I end up with too many drawings open that
> I'm not using:-(
>
> I've tried to do it with VBA and have crashed Acad twice and windows once.
>
> Thanks in advance,
>
> --
> ==============================
> Michael Weaver
> By day: Charles Bettisworth & Co.
> [email protected]
> By night: AlasCAD
> [email protected]
> AOL Instant messenger screen name:
> AlasCAD
> AUGI #w2170
> ==============================

--
/*********************************************************/
/* Tony Tanzillo Design Automation Consulting */
/* Programming & Customization for AutoCAD & Compatibles */
/* ----------------------------------------------------- */
/* [email protected] */
/* http://ourworld.compuserve.com/homepages/tonyt */
/*********************************************************/
0 Likes
Message 5 of 10

Anonymous
Not applicable
Yes, I have. Not an option. I spend too much time toggling from drawing to
drawing.

I'm surprised. I didn't think this would be too difficult to implement.

using VBA I can issue the commands/methods but it takes Acad down, unless I
just haven't gotten the approach right yet.

Mike

"Tony Tanzillo" wrote in message
news:[email protected]...
> Have you considered SDI ?
>
...snip...
> /*********************************************************/
> /* Tony Tanzillo Design Automation Consulting */
> /* Programming & Customization for AutoCAD & Compatibles */
> /* ----------------------------------------------------- */
> /* [email protected] */
> /* http://ourworld.compuserve.com/homepages/tonyt */
> /*********************************************************/
0 Likes
Message 6 of 10

Anonymous
Not applicable
See our discussion on the subject of 1st Feb titled: ' Is this an A2K feature'

...does that help...?

Rob

Michael Weaver wrote:

> I want a routine that will close the current drawing and issue the open
> command so I can open another - I end up with too many drawings open that
> I'm not using:-(
>
> I've tried to do it with VBA and have crashed Acad twice and windows once.
>
> Thanks in advance,
>
> --
> ==============================
> Michael Weaver
> By day: Charles Bettisworth & Co.
> [email protected]
> By night: AlasCAD
> [email protected]
> AOL Instant messenger screen name:
> AlasCAD
> AUGI #w2170
> ==============================
0 Likes
Message 7 of 10

Anonymous
Not applicable
Michael,
I created a simple script file containing

close
open

With SDI still at 0, and filedia and cmddia still at 1, when I run the script,
the current drawing closes, and the "open" command is issued, but it's issued
at the command line, and not in a dialog box. Close but not quite, I guess.

Michael Weaver wrote:

> I want a routine that will close the current drawing and issue the open
> command so I can open another - I end up with too many drawings open that
> I'm not using:-(
>
> I've tried to do it with VBA and have crashed Acad twice and windows once.
>
> Thanks in advance,
>
> --
> ==============================
> Michael Weaver
> By day: Charles Bettisworth & Co.
> [email protected]
> By night: AlasCAD
> [email protected]
> AOL Instant messenger screen name:
> AlasCAD
> AUGI #w2170
> ==============================
0 Likes
Message 8 of 10

Anonymous
Not applicable
I don't know what the solution to this is Martin. I'm beginning to wonder
is there is a solution - it's not very often that this group can't come up
with something.

Mike Weaver

"Martin Klingbeil" wrote in message
news:[email protected]...
> Michael,
> I created a simple script file containing
>
> close
> open
>
> With SDI still at 0, and filedia and cmddia still at 1, when I run the
script,
> the current drawing closes, and the "open" command is issued, but it's
issued
> at the command line, and not in a dialog box. Close but not quite, I
guess.
>
> Michael Weaver wrote:
>
> > I want a routine that will close the current drawing and issue the open
> > command so I can open another - I end up with too many drawings open
that
> > I'm not using:-(
> >
> > I've tried to do it with VBA and have crashed Acad twice and windows
once.
> >
> > Thanks in advance,
> >
> > --
> > ==============================
> > Michael Weaver
> > By day: Charles Bettisworth & Co.
> > [email protected]
> > By night: AlasCAD
> > [email protected]
> > AOL Instant messenger screen name:
> > AlasCAD
> > AUGI #w2170
> > ==============================
>
0 Likes
Message 9 of 10

Anonymous
Not applicable
Mike! Try this.

Use a (getfiled) to browse for file. Write a temp script with the following
(where filename is from getfiled):

.close
.open filename

Then execute the script.

Does it do it, does it? does it?

--
R. Robert Bell, MCSE
Network Administrator (or, Modern-day Wizard)
(remove the "not." in my address for direct e-mail)

Michael Weaver wrote in message
news:[email protected]...
> I don't know what the solution to this is Martin. I'm beginning to wonder
> is there is a solution - it's not very often that this group can't come up
> with something.
>
>
> Mike Weaver
>
>
> "Martin Klingbeil" wrote in message
> news:[email protected]...
> > Michael,
> > I created a simple script file containing
> >
> > close
> > open
> >
> > With SDI still at 0, and filedia and cmddia still at 1, when I run the
> script,
> > the current drawing closes, and the "open" command is issued, but it's
> issued
> > at the command line, and not in a dialog box. Close but not quite, I
> guess.
> >
> > Michael Weaver wrote:
> >
> > > I want a routine that will close the current drawing and issue the
open
> > > command so I can open another - I end up with too many drawings open
> that
> > > I'm not using:-(
> > >
> > > I've tried to do it with VBA and have crashed Acad twice and windows
> once.
> > >
> > > Thanks in advance,
> > >
> > > --
> > > ==============================
> > > Michael Weaver
> > > By day: Charles Bettisworth & Co.
> > > [email protected]
> > > By night: AlasCAD
> > > [email protected]
> > > AOL Instant messenger screen name:
> > > AlasCAD
> > > AUGI #w2170
> > > ==============================
> >
>
>
0 Likes
Message 10 of 10

Anonymous
Not applicable
Martin, you could also try this in the script

._close
._open
~

(put a blank line after the Tilde (~))
This should activate the Open dialog. How's that for ya!
--
Phillip Kenewell
CAD Systems Technician
Air Gage Company
[email protected]
===================
> Not < a Member of the AutoDESK
Discussion Forum Moderator Program

Martin Klingbeil wrote in message
news:[email protected]...
> Michael,
> I created a simple script file containing
>
> close
> open
>
> With SDI still at 0, and filedia and cmddia still at 1, when I run the
script,
> the current drawing closes, and the "open" command is issued, but it's
issued
> at the command line, and not in a dialog box. Close but not quite, I
guess.
0 Likes