Jump to content

Recommended Posts

Posted

i pulled this off the other day but now i cant remember how its done, all i want to do is use vlax-ldata-put to write data to an object then vlax-ldata-get to get it back, can someone show me a simple example to refresh my mind please, thanks =)

Posted

Examples:

 

(defun c:LDWrite ( / ent )
 (vl-load-com)

 (if (setq ent (car (entsel "\nSelect Object to Write Data to: ")))
   (vlax-ldata-put ent "Data-Test" "Lee Mac"))

 (princ))

(defun c:LDRead ( / ent dat )
 (vl-load-com)

 (if (and (setq ent (car (entsel "\nSelect Object to Read Data: ")))
          (setq dat (vlax-ldata-get ent "Data-Test")))

   (alert dat))

 (princ))

Posted
You're welcome Mr Mojo :)

LoL

Mr. Mojo Risin :lol:

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