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

LIST command output to a file?

7 REPLIES 7
SOLVED
Reply
Message 1 of 8
mdhutchinson
15302 Views, 7 Replies

LIST command output to a file?

The LIST command prints to the text screen.... when there is more than one screen, AutoCAD prompts: "Press ENTER to continue:"

 

I tried a cmdactive loop list this

 

(while (eq 1 (logand 1 (getvar "cmdactive")))
    (command "")
)

 

But it doesn't work in this case.

 

I thought there was a variable to control how many line of text goes to the textscreen but I can't seem to find it.

 

Any ideas how I can do this programmatically?

7 REPLIES 7
Message 2 of 8
gjrcmb
in reply to: mdhutchinson

As far as how to control the length of the Text Screen, I copied the following from somewhere:

 

Command: (setenv "CmdHistLines" "1000")
In this example, I'm setting the history length to 1000 lines. The allowable range is between 25 lines and 2048 lines. If you try to set a value outside that range, it will default to the last used length. This new value gets saved to the current profile.
If you want to find out the current history length, you can type the following:  Command: (getenv "CmdHistLines")
"1000".  Note that "CmdHistLines" is case-sensitive and must be entered that way. Also, the length value must be included within quotes as shown. 

Message 3 of 8
mdhutchinson
in reply to: gjrcmb

Thanks!

I was in hopes that this would suppress the "Press ENTER to continue:"

 

But alas it does not.

 

Might there be a way I can pass a script to the LIST that would issue the correct number of <enter> keys?   I wonder? 

 

Message 4 of 8

Hmmmm... the help says "You can use LIST to display and then copy the properties of selected objects to a text file."  I can't find any options to do that though.  I guess they mean you can manually do that.  I tried setting EXPERT to 1 as a long shot, but no go.  The only thing I can think of to suggest is to write the equivalent routine so you can totally control it... Might take a bit of time, but the code might be useful in future projects.

Message 5 of 8
mdhutchinson
in reply to: mdhutchinson

The option to get the text screen to a file is LOGFILEON... I ended up LISTing one object at a time. This then doesn't require the EnterKey from the user. Takes a bit longer, but it accomplished what I needed. 

 

Woud still like to LIST all he objects together then get the text file... but I can't find the solution to get the Enter Key in Lisp to act in the midst of the LIST command output.

 

The info I need using the LIST comman is because I cannot find another way.  This is AutoCAD MEP and Autodesk took away all but the essential DXF data...  

 

There might be a way to use a Script to do this EnterKey.. but I have not tried this yet.

Message 6 of 8
pbejse
in reply to: mdhutchinson

QAFLAGS 2

 

Message 7 of 8
mdhutchinson
in reply to: pbejse

Thank you!!!

I will test and come back to 'accept as an solution"

 

yes it works!!!

 

I didn't thing to look at undocumented commands.

 

... but why would they take this out?

Message 8 of 8
pbejse
in reply to: mdhutchinson


@mdhutchinson wrote:

Thank you!!!

I will test and come back 'accept as an solution"


Glad I could help mdhutchinson

 

Cheers Smiley Happy

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

Post to forums  

Autodesk Design & Make Report

”Boost