.NET

.NET

Reply
*Terry W. Dotson
Post 1 of 5

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

124 Views, 4 Replies
04-12-2006 09:05 AM
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
Distinguished Contributor
223 Posts
0 Kudos
Registered: ‎02-17-2006
Post 2 of 5

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

04-12-2006 02:24 PM in reply to: *Terry W. Dotson
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.
*Tony Tanzillo
Post 3 of 5

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

04-14-2006 02:10 PM in reply to: *Terry W. Dotson
>> 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
Distinguished Contributor
311 Posts
0 Kudos
Registered: ‎07-29-2004
Post 4 of 5

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

04-18-2006 02:40 PM in reply to: *Terry W. Dotson
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
*Tony Tanzillo
Post 5 of 5

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

04-18-2006 03:29 PM in reply to: *Terry W. Dotson
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
Post to the Community

Have questions about Autodesk products? Ask the community.

New Post