vivekgrs Posted July 8, 2006 Posted July 8, 2006 hi everybody, i want 2 capture the attribute values of the point and display it in the drawing by using autolisp. by using entget we can get the information about the entity, by using which command we can able 2 retrieve the attribute data. in the entmake command, entmake '(( 0 . "text")(40 . 0.2)(nth count plist)(1 . "missing") ---- by giving like this means its working fine. but in this i want 2 use variable which has capture the data while running. for ex (setq trs(cdr(assoc -1 ent) ----- entity name now i want 2 use the variable in entmake. i had used as (entmake '((0 . "text")(40 . 0.2)(nth coutn plist)(1. trs) ------ its showing error. bad dxf code. can anyone gave me help to solve the problem. regards m.arunachalam Quote
CarlB Posted July 8, 2006 Posted July 8, 2006 I abswered your question at the 'other' forum also... You are using the variable 'trs' to supply a string value and combine it into a data pair. You *can*use only literal values in a quoted list, as variables will not be evaluated. When including variables in a list, use the "list" function rather than a quote (apostrophe). Also, to create a "dotted pair" list (two values separated by a period), use the "cons" function. So you should use; (entmake (list (0 . "text") (40 . 0.2) (nth count plist);;<<-??Is this a data pair? (cons 1 trs)) ) ) Quote
alanjt Posted May 8, 2009 Posted May 8, 2009 How can I convert 3d to 2d, I mean z=0 you can convert a point like this: ((lambda (x) (list (car x) (cadr x))) (getpoint)) or just (setq point1 (getpoint) point1z (list (car point1) (cadr point1)) ) Quote
Lee Mac Posted May 8, 2009 Posted May 8, 2009 How can I convert 3d to 2d, I mean z=0 If you have a new unrelated question - please start a new thread. This helps with searches and will get your question answered both quicker and more accurately. Quote
alanjt Posted May 8, 2009 Posted May 8, 2009 If you have a new unrelated question - please start a new thread. This helps with searches and will get your question answered both quicker and more accurately. oh yeah, oops. what lee said ^ Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.