Jump to content

AutoCAD Message


Krystyna

Recommended Posts

"Object doesn't support this property or method". How to fix this problem? Thanks in advance!

Krystyna

 

One cannot apply or invoke a particular property or method, if an object does not support said property or method.

 

To view which properties and methods are available to an object, try this:

 

(defun c:DUMP (/ eName)
 (vl-load-com)
 (if (setq eName (car (entsel "\n  >>  Select Object To Dump Contents: ")))
   (progn
     (terpri)
     (vlax-dump-object (vlax-ename->vla-object eName) T)
     (textpage)))
 (princ))

 

 

Edit: For example, you cannot use vla-get-isxref on a layer item. Consider using vlax-property-available-p or vlax-method-applicable-p to mitigate uncessary errors.

 

Hope this helps!

Link to comment
Share on other sites

DXF and VLA info of selected primary or nested object...

 

(defun c:Info (/ opt obj)
 ;; VLA & DXF Info of selected Primary or Nested object
 ;; Alan J. Thompson
 (initget 0 "Nested Primary")
 (setq opt (cond ((getkword "\nSpecify selection mode [Nested/Primary] <Primary>: "))
                 ("Primary")
           )
 )
 (if (setq obj (car ((if (eq opt "Primary")
                       entsel
                       nentsel
                     )
                      (strcat "\nSelect " opt " object for VLA & DXF info: ")
                    )
               )
     )
   (progn
     (textscr)
     (princ "\nVLA Info:\n\n")
     (vlax-dump-object (vlax-ename->vla-object obj) T)
     (princ "\nDXF Info:\n")
     (mapcar 'print (entget obj))
   )
 )
 (princ)
)

Link to comment
Share on other sites

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