Author Topic: ActiveDocument.close in AutoCad 2009  (Read 2399 times)

0 Members and 1 Guest are viewing this topic.

Viktor

  • Guest
ActiveDocument.close in AutoCad 2009
« on: September 29, 2008, 05:05:25 PM »
I'm using autocad Map 2009, and I noticed that if the only thing you have openend is a single drawing, and in your code you say application.activedocument.close(false), then the entire application closes, while in 2007 it would only close the document. Anyone know what's the deal with this? Can this be duplicated in vanilla cad 2009?

Thanks,
Viktor.

Bob Wahr

  • Guest
Re: ActiveDocument.close in AutoCad 2009
« Reply #1 on: September 29, 2008, 07:15:44 PM »
Brief testing in Vanilla 2009.  If SDI is set to 0, with one drawing open, the document closes.  If SDI is set to 1, with one document open, the application closes.  If SDI is set to 0 and multiple drawings are open, the active one closes.  If SDI is set to 1 and multiple drawings are open, you've probably got bigger problems than AutoCAD closing.

[Cliff Notes Version]
Check SDI
[/CNV]

Viktor

  • Guest
Re: ActiveDocument.close in AutoCad 2009
« Reply #2 on: September 29, 2008, 08:17:04 PM »
Thanks Bob, what I forgot to mention is that if you have sdi set at 0, you have one drawing open, and you do this:

application.visible = false
application.activedocument.close(false)

^ does that crash it? cause it works in Map 07.