Visual LISP, AutoLISP and General Customization
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Data Extraction by commandline?

10 REPLIES 10
Reply
Message 1 of 11
george.drayton
4307 Views, 10 Replies

Data Extraction by commandline?

Can I run the dataextraction command via a command line and respond to the prompts via lisp or script. In other words is there a commandline version of dataextraction - setting cmddia to 0 doesn't help.  Thanks for any help

10 REPLIES 10
Message 2 of 11
hmsilva
in reply to: george.drayton


@Anonymous wrote:

Can I run the dataextraction command via a command line and respond to the prompts via lisp or script. In other words is there a commandline version of dataextraction - setting cmddia to 0 doesn't help.  Thanks for any help


Command: -DATAEXTRACTION

 

Henrique

EESignature

Message 3 of 11
george.drayton
in reply to: hmsilva

Hello Henrique,

Thanks for the help, but I don't seem to be able to control the path
and name of the output file - it just wants to create one the same
name as in the dxe file. I don't seem to be able to use the name of
a variable such as (getvar "dwgname") to make a generic extraction file.

rgds

George
Message 4 of 11
hmsilva
in reply to: george.drayton


@Anonymous wrote:
Hello Henrique,

Thanks for the help, but I don't seem to be able to control the path
and name of the output file - it just wants to create one the same
name as in the dxe file. I don't seem to be able to use the name of
a variable such as (getvar "dwgname") to make a generic extraction file.

 

George, neither I!

 

A workaround:

(command "-DATAEXTRACTION" "C:\\DATAEXTRACTION\\01.dxe" "Y");; the .dxe directory

(if (findfile "C:\\DATAEXTRACTION\\01.xls");; the directory where .dxe saves the xls

(vl-file-rename (vl-file-rename "C:\\DATAEXTRACTION\\01.xls" (strcat (getvar "dwgprefix") (vl-filename-base (getvar "dwgname")) ".xls")))   );; renames the .xls file to the current directory with the current dwg name

 

Not a very clean way...

 

Henrique

EESignature

Message 5 of 11
george.drayton
in reply to: hmsilva

Thanks for your comments and code - I was thinking of a similar idea but your code is great.

George

Message 6 of 11
hmsilva
in reply to: george.drayton

You're welcome, George
glad I could help

Henrique

EESignature

Message 7 of 11

oops typo??

(vl-file-rename (vl-file-rename "C:\\DATAEXTRACTION\\01.xls" (strcat (getvar "dwgprefix") (vl-filename-base (getvar "dwgname")) ".xls")))

 

??

Message 8 of 11
hmsilva
in reply to: george.drayton


@Anonymous wrote:

oops typo??

(vl-file-rename (vl-file-rename "C:\\DATAEXTRACTION\\01.xls" (strcat (getvar "dwgprefix") (vl-filename-base (getvar "dwgname")) ".xls")))

 

??


Yes, typo!

EESignature

Message 9 of 11

I seem to have intermittent problems with the "-dataextraction" command. If I run the routine on a new drawing this is OK, but if i then edit the number of blocks the routine does not reliably produce new data.  I've given up using it and writing my own lisp.  If any one is interested I will post it. rgds George (New Zealand)

Message 10 of 11
anwmfg
in reply to: george.drayton

Can anybody tell me if there is a way to run dataextracition in autocad 2014 LT? I use it in standard version, and when I went to access it in LT it isn't there. It is important that I use it.

Message 11 of 11
Ajilal.Vijayan
in reply to: anwmfg

Looks like data extraction is not a part of LT.

But this link seems helpful ?

http://www.cad-notes.com/how-to-extract-block-attributes-in-autocad-lt/

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Autodesk Design & Make Report

”Boost