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

Printing commands

1 REPLY 1
Reply
Message 1 of 2
Anonymous
101 Views, 1 Reply

Printing commands

Greetings and salutations!

I posted a while back asking for help regarding a program which would automatically insert blocks at certain points. I'm both proud and ashamed to say that I've completed said program. Proud, because it functions smoothly and I've added a good deal of meat to it. Ashamed, because I'm still not entirely sure why it works. But, that's why we have Google I suppose.

Getting to the point, this program shows me something with crystal clarity that I had known since the beginning but never gave much thought, as I didn't care much of the extraneous results so long as the program completed its task. I speak of the command line text. Example, when you insert a block using your LISP program, the command line prints the text that you would see if you had inserted the block from the command line:

Command: _insert Enter block name or [?] : C:/Documents and Settings/Administrator/Desktop/SYMBOLS/WG.dwg Specify insertion point or
[Scale/X/Y/Z/Rotate/PScale/PX/PY/PZ/PRotate]:
Enter X scale factor, specify opposite corner, or [Corner/XYZ] <1>: 1 Enter Y
scale factor : 1
Specify rotation angle <0d>: 0

It's really not a huge deal, but the way the program is currently set up, it will change the current layer to the necessary one for the block to be inserted, insert the block, then revert to layer 0. All that text shows up on the command line, for each block, every time. There are well over 100 blocks to be inserted, and the program only started working yesterday. There's much more to add to it. Now, normally I wouldn't care. It works. Yay. Get on with life. But, as an added bonus, I've made it so that if the block is NOT inserted, a little line of text is printed declaring what block was not inserted. It's multi-functional; one can see with a quick F2 what was not inserted, and the debugger (me) can see at a glance what went wrong. That's the theory at least. But even F2 fails when there are hundreds upon hundreds of lines of text popping up on the command line telling me that the layer was changed, a block was inserted, the layer was changed back, the layer was changed, a block was inserted, the layer was changed back, the layer was changed... you get the idea. So, my question is, is there any way to have a LISP program run without printing everything it does to the command line? I know I'm a novice programmer, but I'm slowly getting to the point where I'd really like to see what didn't get done, as opposed to everything that DID get done.

Many thanks! And Happy Holidays!
1 REPLY 1
Message 2 of 2
devitg
in reply to: Anonymous

"cmdecho"

Controls whether prompts and input are echoed during the AutoLISP command function.

0
Turns off echoing

1
Turns on echoing Message was edited by: devitg

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

Post to forums  

Autodesk Design & Make Report

”Boost