Or perhaps I may be able to do this another way. Depending on what
entities are selected, one of the two command lines that I need to run
will return an "Unknown command" message. If I could write an if
statement that will say
if "unknown command", then move to the next command line.
I am not sure if this is possible or what the sytax may be, but I
think it will work if it can be done.
Thank you,
Vlad
On Mar 14, 12:25=A0pm, vmunt...@[EMAIL PROTECTED]
wrote:
> Hello,
>
> I just run into a problem with one of my lisp functions. Depending on
> the type of entity selected (line, polyline etc), I need to run a
> different command.
>
> I added ETYPE in the (defun list and then I tried to write an if
> statement that does the following:
>
> if the user selected just polylines then a command should be run
>
> if the user selected polylines AND anything else (this should include
> the scenario where the user selects lines/arcs/..... but NO polylines)
> another command should be run.
>
> (if (=3Detype "polyline") (progn
> (command "pedit"...)
> ))
> should there be an else between the different if statements?
>
> Is there a way to ask for =A0AND/OR?
>
> (if (or (=3Detype "line") (=3Detype "arc") (=3Detype "circle") (=3Detype
> "ellipse")........)(progn
> (command "pedit"...)
> ))
>
> Not sure if the sytax is correct, but that's not even the main
> problem. I kept getting back the error - no function definition: ETYPE
> and I wasn't sure on how to get around that.
>
> Someone also mentioned that once the user selects all the required
> entities there is a way to sort them into two lists - one that
> contains all the polylines and run the command line and into another
> list that contains everything else and then run the other command
> line.
>
> There may be other ways as well. I hope this makes sense.
>
> Thank you in advance for your help,
> Vlad


|