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

Iterating documents and determining if its modied using vb.net ?

4 REPLIES 4
Reply
Message 1 of 5
Anonymous
274 Views, 4 Replies

Iterating documents and determining if its modied using vb.net ?

First I assume that this is the best way to loop through the open
documents in a session?

Dim docs As DocumentCollection
Dim doc As Document
docs = Autodesk.AutoCAD.ApplicationServices.Application.DocumentManager
For Each doc In docs
' do stuff
Next

During this process, the *doc* appears to contain the majority of
sysvars but DBMOD is missing and I don't see a IsModified either.

I can use COM and .GetVariable, but in the status line at the bottom,
AutoCAD appears to be switching to the document and when you have a lot,
it slows it down considerable and has a lot of 'visual noise'.

So whats the best way to determine DBMOD status?

Thanks in advance,

Terry
4 REPLIES 4
Message 2 of 5
jbooth
in reply to: Anonymous

Are you sure DBMOD is a document level variable, and not an application level variable?

Try using Application.GetSystemVariable(), instead of using the DocumentManager.

This is just a guess.
Message 3 of 5
Anonymous
in reply to: Anonymous

>> Are you sure DBMOD is a document level variable,
>> and not an application level variable?

How can that be, if its value reflects if a given
document has been modified?


--
http://www.caddzone.com

AcadXTabs: MDI Document Tabs for AutoCAD 2004/2005/2006/2007
http://www.acadxtabs.com
Message 4 of 5
ChrisArps
in reply to: Anonymous

It sort of works because it is referring to the "current" document. So he is back to the slow switching of the documents again.

I wonder if there is a technical reason that this was omitted from the dotnet document object or was it just an oversight?

Chris Arps
Message 5 of 5
Anonymous
in reply to: Anonymous

Yes, it returns the value for the current document,
and that means it is not an application-level state.

I don't know why DBMOD was not floated at the
document/database level.


--
http://www.caddzone.com

AcadXTabs: MDI Document Tabs for AutoCAD 2004/2005/2006/2007
http://www.acadxtabs.com

wrote in message news:5146464@discussion.autodesk.com...
It sort of works because it is referring to the "current" document. So he is back to the slow switching of the documents again.

I wonder if there is a technical reason that this was omitted from the dotnet document object or was it just an oversight?

Chris Arps

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