Storing data in the drawing

Storing data in the drawing

Jonathan3891
Advisor Advisor
1,234 Views
7 Replies
Message 1 of 8

Storing data in the drawing

Jonathan3891
Advisor
Advisor

I'm looking for a way to store some data in the actual drawing and I ran across "VLAX-LDATA-PUT".

 

I did some research about it and ran across some post on the OpenDCL forums saying that it shouldn't be used

https://opendcl.com/forum/index.php?topic=1191.0 

 

Im curious to see what some of the top guys have to say about this.

 

I dont want to store xdata in a object that can be deleted, but instead store it in the drawing itself. For example if I wanted to store the current drawing revision as data.

 

I looked into storing the data the drawing properties, but once its set it would error out. Aside from that it could be easily edited by someone.


Jonathan Norton
Blog | Linkedin
0 Likes
1,235 Views
7 Replies
Replies (7)
Message 2 of 8

john.uhden
Mentor
Mentor

I have used vlax-ldata-put and get back when I developed a way to save Land Desktop 2004 back to 2000 without losing intelligence.  It's basically the same as using dictionaries and xrecords, but it's easier because you can store most any kind of AutoLisp data, including lists.  Contrary to others' opinions, I never had any troubles.

BTW, I would store it in the Modelspace object, which I believe you cannot delete.

John F. Uhden

0 Likes
Message 3 of 8

dlanorh
Advisor
Advisor

It depends on what you have planned for the data. Most of the important entity/object data will be saved along with entity/object. So it depends on what data you want to save, why you want to save it and for how long.

 

Is it for the life of the drawing (including perpetual electronic storage), just until the drawing is archived or only until it is completed.

 

Both Xdata and Ldata are great for storing data.

LData can ONLY be read by LISP, but it can store lists directly.

 

Xdata can be read by cannot store lists directly.

 

There is a discussion of sorts at TheSwamp  HERE  You have to know your players.

 

I am not one of the robots you're looking for

0 Likes
Message 4 of 8

john.uhden
Mentor
Mentor
I do know that Owen Wengerd had advised against the use of Ldata. He is
obviously an MVP. But as I said, I have had no problem with it, even
surviving a round trip from 2004 to 2000 and back.

John F. Uhden

0 Likes
Message 5 of 8

CodeDing
Mentor
Mentor

PERSONALLY,

 

I try to avoid Visual LISP where I can. that way when/if Autodesk gets rid of supporting it, then hopefully I'll still have my AutoLISP functions. Also, some users may not have the extension installed.

 

So I'm a Dictionaries / XRecords / XData guy myself.

But don't get me wrong.. I still use many Visual LISP functions daily.. I'm just dreading the thought of them ever being unsupported. Kinda like how you laugh at your crazy apocalypse-preparing neighbor, at least until the apocalypse comes Lol.

0 Likes
Message 6 of 8

dlanorh
Advisor
Advisor

Tony T was not enamoured either.

 

I did use ldata for storing various lisp values (e.g. remembering settings) many moons ago.

 

Xdata I've used twice in the last 20yrs.

 

I am not one of the robots you're looking for

0 Likes
Message 7 of 8

dlanorh
Advisor
Advisor

@CodeDing wrote:

PERSONALLY,

 

I try to avoid Visual LISP where I can. that way when/if Autodesk gets rid of supporting it, then hopefully I'll still have my AutoLISP functions. Also, some users may not have the extension installed.

 

So I'm a Dictionaries / XRecords / XData guy myself.

But don't get me wrong.. I still use many Visual LISP functions daily.. I'm just dreading the thought of them ever being unsupported. Kinda like how you laugh at your crazy apocalypse-preparing neighbor, at least until the apocalypse comes Lol.


They've been predicting the death for 15 years. If it shuffles off this mortal coil in AutoCAD, there is always BricsCAD. 😂

I am not one of the robots you're looking for

Message 8 of 8

Sea-Haven
Mentor
Mentor

Whats that  VBA is gone ! Who said that and when ? 😆😃

0 Likes