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

processing drawings w/o opening them - no time improvment

5 REPLIES 5
Reply
Message 1 of 6
kcimos
443 Views, 5 Replies

processing drawings w/o opening them - no time improvment

I modified a routine that processed xref names & paths w/in a set of folders. Thie original version would open each drawing & do its thing. THis would take about 20 minutes (aprroximately 90 files). I modified it to work w/o opening each drawing. This still takes about 20 minutes.

 

I would have though that not avtually opeing each drawing would dramitically decrease the overall time required to run this routine.

 

anyone have any insight to this?

5 REPLIES 5
Message 2 of 6
arcticad
in reply to: kcimos

Opening the file as a side database or with ObjectDBX is much much faster then opening it in the editor.

How are you modifying the drawings?

---------------------------



(defun botsbuildbots() (botsbuildbots))
Message 3 of 6
kcimos
in reply to: arcticad

here is what my routine does to each DWG file in the set:

 

check that each XREF is on a particular layer which is locked & that the insertion point is 0,0

read the XREF status into an array

unlock that layer

reset the path of each XREF to a known existing location & reload the XREF

unload all XREFs

reload those that were loaded originally (status from the array)(most remain unloaded)

lock that layer

save

 

Message 4 of 6
kcimos
in reply to: kcimos

PS, this is done over a network

Message 5 of 6
thoman999
in reply to: kcimos

Any way to test your code against a file on the local machine rather than the network?

 

FWIW - I usually pull files from a different building and the network latencies can greatly override the benefit of doing your processing in a side database. Especially when you consider the fact that others are doing their own network stuff and filling up the pipe as it were.

 

Regards,

 

Tom

Message 6 of 6
DiningPhilosopher
in reply to: kcimos

If the drawings contain very little geometry visible in the initial view, and there is not a lot of startup code that runs on the opening of each drawing, the drawings may open quickly in the editor, and the difference between that and opening the drawings via Database.ReadDwgFile() may not be too significant, which is because AutoCAD doesn't initially read the entire database when it opens a drawing file in the editor.

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