Script - How to escape a command

Script - How to escape a command

bwang-tecoustics
Collaborator Collaborator
2,606 Views
8 Replies
Message 1 of 9

Script - How to escape a command

bwang-tecoustics
Collaborator
Collaborator

For AutoCAD script, usually I use an empty line to end a command as the empty line works as an 'Enter'. I now use the command of "MULTIPLE INSERT" and I can't end it with an empty line. Any idea what I can do?

0 Likes
Accepted solutions (2)
2,607 Views
8 Replies
Replies (8)
Message 2 of 9

john.uhden
Mentor
Mentor
Accepted solution

I think it's something like (command (chr 8)) or maybe (command (chr 3)).  Hmm, I think that 8 is for a tab.  Oh well, just try it out.

John F. Uhden

0 Likes
Message 3 of 9

Ranjit_Singh
Advisor
Advisor
Accepted solution

I am not very good with scripts but if autolisp statements are allowed then (command) may work.

0 Likes
Message 4 of 9

bwang-tecoustics
Collaborator
Collaborator

Seems (command (char 3)) doesn't work in script.

0 Likes
Message 5 of 9

bwang-tecoustics
Collaborator
Collaborator

maybe (command)(chr 3) worked.

0 Likes
Message 6 of 9

Kent1Cooper
Consultant
Consultant

@bwang-tecoustics wrote:

For AutoCAD script, usually I use an empty line to end a command as the empty line works as an 'Enter'. I now use the command of "MULTIPLE INSERT" and I can't end it with an empty line. Any idea what I can do?


Another option, if I assume correctly that you have a specific number of Inserts to do, since you're trying to end the Multiple aspect within the Script:  Just do each INSERT as its own command, rather than precede the first one with MULTIPLE.  It would take a small amount of additional code to repeat the INSERT command name for each, but it would eliminate your problem.

Kent Cooper, AIA
Message 7 of 9

john.uhden
Mentor
Mentor

Looking at your photo ID, I noticed a 3D coil.  If you need a routine to draw one, I have it.  These days I seem to be just giving things away.  I'd hate to kick the bucket and have all this stuff sorta get buried with me.  Actually I want to have my dead body just dumped in the Atlantic Ocean, oh, but no, there are regulations against that unless it's like 600 miles out with a steel coffin or some ****.  I don't care; can't they just use me for bait?

John F. Uhden

0 Likes
Message 8 of 9

bwang-tecoustics
Collaborator
Collaborator

Hi, Thx. You can post it here. I build 3D models for springs, but I'm interested of your AutoCAD routine.

0 Likes
Message 9 of 9

john.uhden
Mentor
Mentor

Sorry.  I just looked and found I called SPRING.LSP.  Anyway, my comments say that it is licensed solely to William J. "Bill" Townsend, Jr.  If he is still around maybe you can get his permission to get a copy.  It has a DCL file too, so I would want to repackage it as a VLX and remove the security.

 

The COIL.LSP program I wrote to design a solar water heater out of 1" poly pipe.  It's a 2D flat coil meant to be attached to a piece of plywood.  I did find that a 100' coil (with 1/4" spacing) would fit on a 4'x4' sheet of plywood.  I bought the pipe but never built it.  It was for heating my swimming pool, but even in NJ it gets plenty warm enough by the end of June without the heater.  By August we are looking to cool the pool.  When we rebuilt the pool in 2006 I should have had the contractor bury a coil of pipe more than 4' in the ground to cool water pumped through it.  I am NOT buying any heaters or coolers that pool suppliers sell.  I don't have the money and I'm too cheap anyway.

 

John F. Uhden

0 Likes