.NET
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Reset Documet status

4 REPLIES 4
Reply
Message 1 of 5
HomeBoyLV
326 Views, 4 Replies

Reset Documet status

I insert custom data into my document when it gets created. After this is complete, I want to reset the document so that if the user closes the document without doing anything else, they do not get prompted to save it.

It would also seem proper to flush any undo tracking on this data as well.

Seems that I saw a post about this, but can't seems to find it.

Thanks

HomeBoy Out
4 REPLIES 4
Message 2 of 5
arcticad
in reply to: HomeBoyLV

My two cents worth ...

You can check for the status

{code}

Dim isModified As Integer = System.Convert.ToInt32(Application.GetSystemVariable("DBMOD"))

Dim DOC As Document = Application.DocumentManager.MdiActiveDocument

If isModified = 0 Then
doc.CloseAndDiscard()
Else
doc.CloseAndSave(doc.Name)
End If

{code}

Then save and close based on it.

I know you can reset it using lisp.

(acad-push-dbmod)
; stuff
(acad-pop-dbmod)

I would be interested how to do this also.
---------------------------



(defun botsbuildbots() (botsbuildbots))
Message 3 of 5
HomeBoyLV
in reply to: HomeBoyLV

Shameless bump.....

Any Hints?


HomeBoy Out
Message 4 of 5
Anonymous
in reply to: HomeBoyLV

Call these before/after your changes:

Document.PushDbMod()
Document.PopDbMod()


--
http://www.caddzone.com

AcadXTabs: MDI Document Tabs for AutoCAD 2009
Supporting AutoCAD 2000 through 2009

http://www.acadxtabs.com

Introducing AcadXTabs 2010:
http://www.caddzone.com/acadxtabs/AcadXTabs2010.htm

Email: string.Format("{0}@{1}.com", "tonyt", "caddzone");


wrote in message news:6229554@discussion.autodesk.com...
Shameless bump.....

Any Hints?


HomeBoy Out
Message 5 of 5
HomeBoyLV
in reply to: HomeBoyLV

Thanks Tony

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Autodesk DevCon in Munich May 28-29th


Autodesk Design & Make Report

”Boost