I am trying to figure out how to take over 2,000 dxf's and run the same lisp routines on all of these dxf's. I want to be able to identify the directory these dxf's are in open each one run the lisp routines save routines as dxf's in the same directory they were opened from, and close. Then repeat automatically for every dxf in the directory. I will let you know i only have little knowledge in Autolisp and no knowledge in VBA. So i am going to need some guidance.
Also I think doing this kind of batch run will save me weeks worth of work and that is my basis for looking into doing this.
Ok. IMO the first thing we need to do before we run off and start pounding code is identify exactly what we want to do -- what's the recipe so to speak. So let's clarify what you've provided so far (words in braces
{ word } are mine) --
1. I am trying to figure out how to take over {iterate} 2,000 dxf's and run the same lisp routines on all of these dxf's ...
I'm not sure what you mean by "take over" so I have to make an assumptive reach: You have a directory tree that hosts approximately 2000 dxf files. You want to recursively scan said directory tree and locate all dxf files, possibly using wildcarding to limit what the search discovers.
Sounds like you could use
DOLIB (dos_find) to fullfill the initial scan (I'll detail it later, let's keep the recipe lite for the moment).
Please identify anything that is missing or in err.
2) I want to be able to identify the directory these dxf's are in ...
For each dxf file you need to be able to identify the full path to the dxf file. If we go the DOSLIB route it will be a no brain-er.
Please identify anything that is missing or in err.
3) ... open each one {dxf file} run the lisp routines ...
Seems straightforward but several avenues can be persued here. Do you want to open / import the dxf file in the AutoCAD editor, open the dxf file directly via ObjectDBX (a good bet, execution wise, speed), or open the dxf as a sequential file, operating directly upon it?
Please identify anything that is missing or in err.
4) ... save routines as dxf's in the same directory they were opened from ...
Depending on what transpires in item
3, save the modified dxf file over top of itself. At this point I'd suggest that if that is the case you ensure a backup of all these files is made prior to this exercise, or that a backup mechanism be part of the "program" (I'd recommend the former, at least intially).
Hmmm, nother question -- do mean save dxf files to dxf files, or dxf files to dwg files?
Please identify anything that is missing or in err.
5) ... repeat automatically for every dxf in the directory.
Gotcha.
Dang, the sleeping pill is kicking (and Im nodding), and I must decline to work on this any more tonight (as if you couldn't tell). You wouldn't imagine how hard I gotta stare at the screen to see it in one place and legibly; woo. Forgive me, I should have just tossed it in the bin.
Anyway, I hope my swamp friends pick this up torrow where I've left and pass the battan back an forth 'til a proper solution design emerges, though the O/P has a few things to clarify before coding thing happens. Night all.
MP.