The name of the original drawing is hard-coded in the .dxe file, as
inspection with a hex editor will reveal. (Let's ignore multiple files,
okay?)
Using -dataextraction prompts only for the name of the .dxe file, not
the name of the source file, so that doesn't help.
Best thing I can suggest is to *copy* a drawing to
c:\temp\wirenumbers.dwg and create the c:\temp\wirenumbers.dxe file.
Then, after you have edited and saved each file you want to run the
extraction on, your Lisp would just have to
{code}
(setvar 'filedia 0)
(command "._saveas" "2010" "c:\\temp\\wirenumbers.dwg" "yes") ;; the yes
is to replace the .dwg file
(command "._-dataextraction" "c:\temp\wirenumbers.dxe" "yes") ;; the yes
is to replace the .csv file
(setvar 'filedia 1)
(command "._close")
{code}
and you should be good to go.
I haven't actually tried this, of course. There might be prompts like
"File exists. Overwrite - yes or no?" that you'll need to accommodate,
but if there is always a wirenumbers.dwg and a wirenumbers.dxe in the
temp directory, you can standardize the response. Maybe check to see if
they exist and act accordingly.
-Bill
On 5/18/2010 8:51 AM, drafting87 wrote:
> My original plan was to use the DATAEXTRACTION command, which opens the data extraction wizard. The problem is that a new and separate .dxe must be created for each drawing (or group of drawings) that you want to extract data from. This seriously gets in the way of creating a lisp routine which will work universally.
>
> Thanks!
>