Jump to content

What about data storage from the entget?


Recommended Posts

Posted

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?

 

 

Posted (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 by ronjonp
  • Like 1
Posted

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) 
)

 

  • Like 1

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.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...