Talk About Network



Register and Login
Nick
Password
Register create new account Sign up is FREE and you can post replies, new topics, bookmark posts and more!
Recover lost password


Computer Aided Design - CAD > Autocad > ETYPE or SORT L...
Latest [ Topics | Posts ] Archive Post A New Topic Post a Reply
<< Topic < Post Post 1 of 5 Topic 3384 of 3467
Post > Topic >>

ETYPE or SORT LISP question

by vmuntean@[EMAIL PROTECTED] Mar 14, 2008 at 11:25 AM

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 (=etype "polyline") (progn
(command "pedit"...)
))
should there be an else between the different if statements?

Is there a way to ask for  AND/OR?

(if (or (=etype "line") (=etype "arc") (=etype "circle") (=etype
"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




 5 Posts in Topic:
ETYPE or SORT LISP question
vmuntean@[EMAIL PROTECTED  2008-03-14 11:25:04 
Re: ETYPE or SORT LISP question
vmuntean@[EMAIL PROTECTED  2008-03-14 12:36:25 
Re: ETYPE or SORT LISP question
=?iso-8859-1?q?Eduardo_Mu  2008-03-16 19:57:33 
Re: ETYPE or SORT LISP question
vmuntean@[EMAIL PROTECTED  2008-03-18 11:02:12 
Re: ETYPE or SORT LISP question
vmuntean@[EMAIL PROTECTED  2008-03-19 07:35:31 

Post A Reply:
  Go here to Signup

AddThis Feed Button


About - Advertising - Contact - Frequently Asked Questions - Privacy Policy - Terms of Use - Signup

Contact
tan12V112 Fri Jul 4 13:58:39 CDT 2008.