Visual LISP, AutoLISP and General Customization

Reply
Contributor
Posts: 17
Registered: ‎11-01-2003
Message 1 of 9 (78 Views)

close without save

78 Views, 8 Replies
02-18-2003 12:42 AM
Open a drawing done something. I want close this drawing without saving
Example

(setq SelSet (ssget "X" '((0 . "LWPOLYLINE")(8 . "MARBLE"))))
(setvar "filedia" 0)
(command "_Wblock" "NEWMARBLE "" "0,0" SelSet "")
(command "close")

it is asking confirmation to save or not
how can I set it ?
Thanks in advance
*Mark
Message 2 of 9 (78 Views)

Re: close without save

02-18-2003 12:53 AM in reply to: showkata
try this ...

(acad-push-dbmod)
...
...
...
(setq SelSet (ssget "X" '((0 . "LWPOLYLINE")(8 . "MARBLE"))))
(setvar "filedia" 0)
(command "_Wblock" "NEWMARBLE "" "0,0" SelSet "")
(acad-pop-dbmod)
(command "close")


"showkat" wrote in message
news:f144b05.-1@WebX.maYIadrTaRb...
> Open a drawing done something. I want close this drawing without saving
> Example
> (setq SelSet (ssget "X" '((0 . "LWPOLYLINE")(8 . "MARBLE"))))
> (setvar "filedia" 0)
> (command "_Wblock" "NEWMARBLE "" "0,0" SelSet "")
> (command "close")
>
> it is asking confirmation to save or not
> how can I set it ?
> Thanks in advance
>
>
*Middleton, Cliff
Message 3 of 9 (78 Views)

Re: close without save

02-18-2003 01:15 AM in reply to: showkata
This'll take 'er down. Don't let the neophytes know about it.

;Close active document, no save
(defun c:cln ()
(command "._VBASTMT"
"ThisDrawing.Application.ActiveDocument.Close(vbFalse)")
)
--
Cliff

"showkat" wrote in message
news:f144b05.-1@WebX.maYIadrTaRb...
> Open a drawing done something. I want close this drawing without saving
> Example
> (setq SelSet (ssget "X" '((0 . "LWPOLYLINE")(8 . "MARBLE"))))
> (setvar "filedia" 0)
> (command "_Wblock" "NEWMARBLE "" "0,0" SelSet "")
> (command "close")
>
> it is asking confirmation to save or not
> how can I set it ?
> Thanks in advance
>
*Broad, Doug
Message 4 of 9 (78 Views)

Re:

02-19-2003 02:12 AM in reply to: showkata
Hi Cliff,
Ain't that a little overkill? ;-)
(command "_.vbastmt" "thisdrawing.close vbfalse")

> (command "._VBASTMT"
> "ThisDrawing.Application.ActiveDocument.Close(vbFalse)")
> )
*Middleton, Cliff
Message 5 of 9 (78 Views)

Re:

02-19-2003 02:56 AM in reply to: showkata
Being as I am, a farm boy, I like going around the barn to get to my
destination. I also notice you do not need the parens around the true/false
argument. On behalf of the lisping ghetto (minus showkat evidently), thank
you.
--
Cliff

"Doug Broad" wrote in message
news:7996888D67974755DC2B781F08494BD1@in.WebX.maYIadrTaRb...
> Hi Cliff,
> Ain't that a little overkill? ;-)
> (command "_.vbastmt" "thisdrawing.close vbfalse")
>
> > (command "._VBASTMT"
> > "ThisDrawing.Application.ActiveDocument.Close(vbFalse)")
> > )
>
>
*Broad, Doug
Message 6 of 9 (78 Views)

Re:

02-19-2003 03:22 AM in reply to: showkata
You're certainly welcome. Guess showkat is a Cheshire Cat ;-) ...)
(Mine doesn't work any better than yours. It's just less typing.)
Contributor
Posts: 17
Registered: ‎11-01-2003
Message 7 of 9 (78 Views)

Re:

02-19-2003 10:12 PM in reply to: showkata
Mr.Mark,Mr.Cliff Middleton & Mr.Doug Broad

1st solution
(command "._VBASTMT" "ThisDrawing.Application.ActiveDocument.Close(vbFalse)")

2nd solution
(command "_.vbastmt" "thisdrawing.close vbfalse")

Both statement are true. working fine

thanks your contribution
*Middleton, Cliff
Message 8 of 9 (78 Views)

Re:

02-19-2003 11:21 PM in reply to: showkata
You're welcome.

1st solution = stinky
2nd solution = aaaaah

"showkat" wrote in message
news:f144b05.5@WebX.maYIadrTaRb...
> Mr.Mark,Mr.Cliff Middleton & Mr.Doug Broad
> 1st solution
> (command "._VBASTMT"
"ThisDrawing.Application.ActiveDocument.Close(vbFalse)")
>
> 2nd solution
> (command "_.vbastmt" "thisdrawing.close vbfalse")
>
> Both statement are true. working fine
>
> thanks your contribution
>
New Member
Posts: 2
Registered: ‎11-01-2000
Message 9 of 9 (78 Views)

Re:

10-19-2007 07:04 PM in reply to: showkata
Thank you,


This worked as well.

You are not logged in.

Log into access your profile, ask and answer questions, share ideas and more. Haven't signed up yet? Register

Announcements
Welcome to the new Autodesk Community!
If this is your first visit, click here to get started and make the most of the Community. Let us know what you think of the new experience in the Community Feedback Forum.

Need installation help?

Start with some of our most frequented solutions to get help installing your software.

Ask the Community