<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Storing data using lisp in Visual LISP, AutoLISP and General Customization Forum</title>
    <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/storing-data-using-lisp/m-p/6570451#M128450</link>
    <description>&lt;P&gt;Looks like something like this would work for you then&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;(vlax-ldata-put "MyBlockData" "MyBlockName" (list "BlockState" 50 150 25 5 "Front" "Upper" 12 4000))&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;then access that data by requesting the data&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;(vlax-ldata-get "MyBlockData" "MyBlockName")&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;That would return&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;("BlockState" 50 150 25 5 "Front" "Upper" 12 4000)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Good luck.&lt;/P&gt;</description>
    <pubDate>Mon, 19 Sep 2016 12:43:21 GMT</pubDate>
    <dc:creator>SeeMSixty7</dc:creator>
    <dc:date>2016-09-19T12:43:21Z</dc:date>
    <item>
      <title>Storing data using lisp</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/storing-data-using-lisp/m-p/6569984#M128444</link>
      <description>&lt;P&gt;Im just after some advice on saving data.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Ive currently got a couple of dynamic blocks that create a visualisation of one of our products from an opendcl dialog. Once the drawing has been approved by a customer i pull the data from the block and use this to create parts for production. This works very well but is quite restrictive. Im currently writing lisp routines&amp;nbsp;that will draw this and store the data in the block as xdata so in future the opendcl dialog can be opened and populated with this info for modifications.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;My question is where is best to store this data (currently as xdata in the block). There could be 60 different pieces to save. I cant attach anything from work as it is sensitive.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks in advance&lt;/P&gt;&lt;P&gt;Dan&lt;/P&gt;</description>
      <pubDate>Mon, 19 Sep 2016 08:07:02 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/storing-data-using-lisp/m-p/6569984#M128444</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2016-09-19T08:07:02Z</dc:date>
    </item>
    <item>
      <title>Re: Storing data using lisp</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/storing-data-using-lisp/m-p/6570229#M128445</link>
      <description>&lt;P&gt;Write this data to a database. Then sorting and recalling&amp;nbsp;the data is simplified for you.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;A Text file is another option, but does not offer the benefit of queries.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Good luck,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 19 Sep 2016 11:04:11 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/storing-data-using-lisp/m-p/6570229#M128445</guid>
      <dc:creator>SeeMSixty7</dc:creator>
      <dc:date>2016-09-19T11:04:11Z</dc:date>
    </item>
    <item>
      <title>Re: Storing data using lisp</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/storing-data-using-lisp/m-p/6570331#M128446</link>
      <description>I thought of that but want to keep the data self contained in the drawing, and also doesn't require a database to maintain. But thanks for the reply</description>
      <pubDate>Mon, 19 Sep 2016 11:53:51 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/storing-data-using-lisp/m-p/6570331#M128446</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2016-09-19T11:53:51Z</dc:date>
    </item>
    <item>
      <title>Re: Storing data using lisp</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/storing-data-using-lisp/m-p/6570367#M128447</link>
      <description>&lt;P&gt;@Anonymous﻿,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I'm sorry but statements like &lt;EM&gt;"&lt;/EM&gt;&lt;SPAN&gt;&lt;EM&gt;I cant attach anything from work as it is sensitive."&lt;/EM&gt; completely turn me off. &amp;nbsp;Make something up if you have to that has parallels or is similar but otherwise all we can do is vaguely guess what your requirements are. &amp;nbsp;This is an open forum of volunteers. &amp;nbsp;People contribute for the benefit of all. If you need confidential assistance, you should consider hiring a programmer with a non-disclosure agreement.&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 19 Sep 2016 12:07:33 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/storing-data-using-lisp/m-p/6570367#M128447</guid>
      <dc:creator>dbroad</dc:creator>
      <dc:date>2016-09-19T12:07:33Z</dc:date>
    </item>
    <item>
      <title>Re: Storing data using lisp</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/storing-data-using-lisp/m-p/6570419#M128448</link>
      <description>&lt;P&gt;Try using a DataDictionary then. You can store data in a dictionary stored in the drawing with basically variables or defintions.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;(vlax-ldata-put "MyDictionary" "MyDataValue" "the Value")&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;then access that data by requesting the data&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;(vlax-ldata-get "MyDictionary" "MyDataValue")&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;you can store pretty much any kind of data numeric, string values, lists...&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;good luck.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 19 Sep 2016 12:33:34 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/storing-data-using-lisp/m-p/6570419#M128448</guid>
      <dc:creator>SeeMSixty7</dc:creator>
      <dc:date>2016-09-19T12:33:34Z</dc:date>
    </item>
    <item>
      <title>Re: Storing data using lisp</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/storing-data-using-lisp/m-p/6570427#M128449</link>
      <description>&lt;P&gt;I wasn't asking for anything to be written, i asked for an opinion on the best place to store information in a drawing.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I wrote that im currently saving the data as xdata in the block.&amp;nbsp;I wondered if the data would be better stored elsewhere is all.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;For clarification:&lt;/P&gt;&lt;P&gt;I currently&amp;nbsp;save information like (50 150 25 5 "Front" "Upper" 12 4000) converted to a string and saved as xdata. Is this the best place to keep it for retrieval later?&lt;/P&gt;</description>
      <pubDate>Mon, 19 Sep 2016 12:35:22 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/storing-data-using-lisp/m-p/6570427#M128449</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2016-09-19T12:35:22Z</dc:date>
    </item>
    <item>
      <title>Re: Storing data using lisp</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/storing-data-using-lisp/m-p/6570451#M128450</link>
      <description>&lt;P&gt;Looks like something like this would work for you then&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;(vlax-ldata-put "MyBlockData" "MyBlockName" (list "BlockState" 50 150 25 5 "Front" "Upper" 12 4000))&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;then access that data by requesting the data&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;(vlax-ldata-get "MyBlockData" "MyBlockName")&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;That would return&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;("BlockState" 50 150 25 5 "Front" "Upper" 12 4000)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Good luck.&lt;/P&gt;</description>
      <pubDate>Mon, 19 Sep 2016 12:43:21 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/storing-data-using-lisp/m-p/6570451#M128450</guid>
      <dc:creator>SeeMSixty7</dc:creator>
      <dc:date>2016-09-19T12:43:21Z</dc:date>
    </item>
    <item>
      <title>Re: Storing data using lisp</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/storing-data-using-lisp/m-p/6570459#M128451</link>
      <description>SeeMSixty7&lt;BR /&gt;I've used ldata in some smaller projects iv done but recently read that there is the possibility of corruption issues whilst using ldata.&lt;BR /&gt;&lt;BR /&gt;Have you had any issues with this?</description>
      <pubDate>Mon, 19 Sep 2016 12:46:03 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/storing-data-using-lisp/m-p/6570459#M128451</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2016-09-19T12:46:03Z</dc:date>
    </item>
    <item>
      <title>Re: Storing data using lisp</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/storing-data-using-lisp/m-p/6570487#M128452</link>
      <description>&lt;P&gt;I have not had any issue with dictionary data. I've only used it for setting very basic data sets though, similar to what you have. For what you want to do I can't see any reason to worry about data corruption.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 19 Sep 2016 13:02:08 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/storing-data-using-lisp/m-p/6570487#M128452</guid>
      <dc:creator>SeeMSixty7</dc:creator>
      <dc:date>2016-09-19T13:02:08Z</dc:date>
    </item>
    <item>
      <title>Re: Storing data using lisp</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/storing-data-using-lisp/m-p/6570500#M128453</link>
      <description>&lt;P&gt;I don't know why you need to save data anywhere else unless you are adding additional information beyond the dynamic block properties. &amp;nbsp;Dynamic block properties are accessible directly from dynamic blocks and via the properties palette. &amp;nbsp;Access them via the dynamic block properties of the block via activeX. &amp;nbsp;You can store additional data as xdata but that requires specialized formatting of the lists. &amp;nbsp;There are several traditional ways to store data: &amp;nbsp;hidden attributes, xdata attached to objects, and dictionaries. &amp;nbsp;Attributes are available for editing in the attribute editor. &amp;nbsp;Xdata will need to be managed by special program. Dictionaries are similar to xdata but allow the data to be stored in a centralized location rather than at the object itself. &amp;nbsp;Extension dictionaries are attached to each object.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;When deciding which way to go, think about how easy it is to access data. &amp;nbsp;If you want to make it easy, stay with dynamic block properties and attributes. &amp;nbsp;If you want to hide it, use xdata, extension dictionaries, dictionaries or persistent reactors.&lt;/P&gt;</description>
      <pubDate>Mon, 19 Sep 2016 13:06:39 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/storing-data-using-lisp/m-p/6570500#M128453</guid>
      <dc:creator>dbroad</dc:creator>
      <dc:date>2016-09-19T13:06:39Z</dc:date>
    </item>
    <item>
      <title>Re: Storing data using lisp</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/storing-data-using-lisp/m-p/6570722#M128454</link>
      <description>&lt;P&gt;Extension dictionaries are attached to objects, just as XDATA is.&amp;nbsp;&amp;nbsp;You can create a name-referenced, tree-like nested data structure that is insensitive to order of data; it requires extra work to find objects which have that data since selection sets won't filter on Extension Dictionaries/XRecords.&amp;nbsp; XDATA can be useful&amp;nbsp;when dealing with selection sets, as you can filter based on the REGAPP name; but then again, you have to deal with&amp;nbsp;REGAPPs, as well as being bound to specific order of data if you don't have enough DXF key values to work with.&amp;nbsp; I haven't had many problems using LDATA but it can be very restrictive; as there is only one LDATA on a give object, you can't easily extend it.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;One thing I wouldn't do is convert&amp;nbsp;back-and-forth between numbers and strings for non-attribute data&amp;nbsp;storage.&amp;nbsp; If the number is a real, store it as a real; if its a string, store it as a string.&amp;nbsp; Keep the values discrete so they can be referenced by either a DXF index code (XDATA) or name (XRecord).&lt;/P&gt;</description>
      <pubDate>Mon, 19 Sep 2016 14:38:19 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/storing-data-using-lisp/m-p/6570722#M128454</guid>
      <dc:creator>dgorsman</dc:creator>
      <dc:date>2016-09-19T14:38:19Z</dc:date>
    </item>
    <item>
      <title>Re: Storing data using lisp</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/storing-data-using-lisp/m-p/6571948#M128455</link>
      <description>I have not had any problems with ldata, but dictionaries are a great place to hide things. You can add your own dictionary to ModelSpace; it is an object.</description>
      <pubDate>Mon, 19 Sep 2016 23:48:01 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/storing-data-using-lisp/m-p/6571948#M128455</guid>
      <dc:creator>john.uhden</dc:creator>
      <dc:date>2016-09-19T23:48:01Z</dc:date>
    </item>
    <item>
      <title>Re: Storing data using lisp</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/storing-data-using-lisp/m-p/6573346#M128456</link>
      <description>&lt;P&gt;I'm not sure why you need to store the data twice in the drawing if all the information is in the block.&lt;/P&gt;
&lt;P&gt;When you reopen the drawing, you can read the block and populate the dialog box with the info.&lt;/P&gt;
&lt;P&gt;If you need to store additional information with each block, you could create invisible attributes and store the information there.&lt;/P&gt;</description>
      <pubDate>Tue, 20 Sep 2016 15:13:36 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/storing-data-using-lisp/m-p/6573346#M128456</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2016-09-20T15:13:36Z</dc:date>
    </item>
    <item>
      <title>Re: Storing data using lisp</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/storing-data-using-lisp/m-p/6573389#M128457</link>
      <description>My general thoughts on this...&lt;BR /&gt;If it has something to do with the drawing environment, use the drawing's Dictionary.&lt;BR /&gt;If it has something to do with user settings, store in the Registry (SETCFG is now obsolete).&lt;BR /&gt;If it has something to do with an object (such as a block), embed the data into the object.&lt;BR /&gt;If it is none, some or all of the above, write to an external file.&lt;BR /&gt;&lt;BR /&gt;As far as corruption issues, it is possible the data that was stored used the same name&lt;BR /&gt;for two different situations and the second had overwritten the first, and the first tried&lt;BR /&gt;accessing the data, but failed.&lt;BR /&gt;&lt;BR /&gt;???&lt;BR /&gt;</description>
      <pubDate>Tue, 20 Sep 2016 15:32:30 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/storing-data-using-lisp/m-p/6573389#M128457</guid>
      <dc:creator>scot-65</dc:creator>
      <dc:date>2016-09-20T15:32:30Z</dc:date>
    </item>
    <item>
      <title>Re: Storing data using lisp</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/storing-data-using-lisp/m-p/6577674#M128458</link>
      <description>I'm moving away from dynamic blocks so a user can create modifications if/when the need arises.&lt;BR /&gt;&lt;BR /&gt;Ive gone down the ldata route for now but will probably upgrade to xrecords in future. I'm not trying to hide the data as such I just don't want it accessible by everyone.&lt;BR /&gt;&lt;BR /&gt;I also wanted to keep the data out of the block as some people like to meddle.&lt;BR /&gt;&lt;BR /&gt;As for corruption on ldata I'm saving the data with a key the same as the block name, and deleting it as soon as it is read and put into a list. Then putting it back in when all modifications have been made. So I'm not overwriting the values now I'm replacing. Thanks for that scot.&lt;BR /&gt;&lt;BR /&gt;Thanks for all the replies&lt;BR /&gt;Dan</description>
      <pubDate>Thu, 22 Sep 2016 11:45:55 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/storing-data-using-lisp/m-p/6577674#M128458</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2016-09-22T11:45:55Z</dc:date>
    </item>
  </channel>
</rss>

