Jump to content

Recommended Posts

Posted

Screen Capture.jpg

I run a company plug-ins with AutoCAD 2013. When I hover over room boundary (polyline) created by this plug-ins it shows data as the attached file.

Please how to extract these data from attached drawing with AutoCAD (with Autolisp ,visual lisp,VBA or .NET)

dwg.zip

Posted
Please how to extract these data from attached drawing with AutoCAD

It will depend on what you hope to get from this fathihvac, but the extended data on its own probably won't be much use to you unless you know how the plug-in interprets the data.

But you could have a play at looking at what data is attached to the entity itself using this.

(defun c:getstuff ( / ent stuff )
 (if (and (setq ent (ssname (ssget "_:S+.") 0))
          (setq stuff (cdr (assoc -3 (entget ent '("*")))))
          )
   (progn
     (textpage)
     (terpri)
     (print stuff)
     )
   )
 (princ)
 )

Posted

@cwake: Be careful with your error trapping as (ssname nil) will error ;)

 

@fathihvac: Here is another simple program to display all xdata associated with an entity:

(defun c:showxd ( / s )
   (if (setq s (ssget "_+.:E:S" '((-3 ("*")))))
       (foreach a (cdr (assoc -3 (entget (ssname s 0) '("*"))))
           (princ (strcat "\n\nAppID: " (car a)))
           (foreach x (cdr a) (print x))
       )
       (princ "\nObject has no xdata or no object selected.")
   )
   (princ)
)

My Entity List utility will also include xdata in its output, and there is also the Express Tools XDLIST command.

 

Lee

Posted

Thank you for all but both getstuff.lsp and showxd.lsp do not give the data shown on screen capture jpg! could try more to help.

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