Jump to content

How to Retrieve Object Properties


Recommended Posts

Posted

I am trying to find a way to view a list of an object's properties to use while trying to develop a lisp. I feel like I am looking in every place except the correct one. Can anyone point me in the right direction? Thanks for any help you can give.

Posted

You can view the list of available ActiveX Properties & Methods for an object (including the number of parameters required by each method) by passing the VLA-Object to the vlax-dump-object function.

 

You can also view the entire AutoCAD Object Model, including a list of Properties & Methods for every object (and documentation for each Property / Method) in the ActiveX Developer Documentation (found in the acadauto.chm file, or made available online here).

Posted

Heres the lisp for dump object

 

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

Posted

;;; DumpIt                                                           
;;; Dump all methods and properties for selected objects 

 

That gives only Properties and to get methods as well , you should add T to the function Vlax-Dump-object

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