Maria_Kar Posted September 24, 2021 Posted September 24, 2021 I have a code like that, (defun c:example1 (/ ) (setq a (entsel "Select an entity ")) (setq b (entget a)) ) Αt the end of the code by calling the variable "a" I see its contents normally (entity name and coordinates) and I also see that the list normally comes out of the command from entget. However when I call the variable "b", my command prints the message "extra cdrs in dotted pair on input" what am i doing wrong? Quote
ronjonp Posted September 27, 2021 Posted September 27, 2021 (edited) On 9/24/2021 at 2:28 AM, Maria_Kar said: I have a code like that, (defun c:example1 (/ ) (setq a (entsel "Select an entity ")) (setq b (entget a)) ) Αt the end of the code by calling the variable "a" I see its contents normally (entity name and coordinates) and I also see that the list normally comes out of the command from entget. However when I call the variable "b", my command prints the message "extra cdrs in dotted pair on input" what am i doing wrong? You have the grab the ename from entsel using CAR like so: (setq b (entget (car a))) And if you want to print the items to the command line use something like so: (if (setq a (entsel)) (mapcar 'print (entget (car a) '("*"))) ) Edited September 27, 2021 by ronjonp 1 Quote
BIGAL Posted September 28, 2021 Posted September 28, 2021 If using VL code ;;;===================================================================; ;;; DumpIt ; ;;;-------------------------------------------------------------------; ;;; Dump all methods and properties for selected objects ; ;;;===================================================================; (defun C:Dumpit ( / ent) (while (setq ent (entsel)) (vlax-Dump-Object (vlax-Ename->Vla-Object (car ent)) ) ) (princ) ) 1 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.