Author Topic: APPID Tables  (Read 2688 times)

0 Members and 1 Guest are viewing this topic.

snownut2

  • Swamp Rat
  • Posts: 971
  • Bricscad 22 Ultimate
APPID Tables
« on: March 03, 2012, 11:52:50 AM »
I had the thought (I am sure not the first) that I could store variable data in an APPID Table.  There is no issue creating the table, however I am having issues adding variable values to it.

I need to store Text Variables, Integer Variables and Real Variables, up to 20 assorted types per APPID Table.

Any assistance would be great.

Thanks,

Bruce

Lee Mac

  • Seagull
  • Posts: 12915
  • London, England
Re: APPID Tables
« Reply #1 on: March 03, 2012, 12:33:18 PM »
The AppID Table merely stores registered Application IDs and information about each AppID, just as the Layer Table stores Layer Names and information about each Layer.

You will need to study xData, which can be used to attach information (such as Integers, Reals, Points, Handles, Strings etc.) under a specific AppID to graphical and non-graphical objects.

Here are some tutorials:

http://www.afralisp.net/autolisp/tutorials/extended-entity-data-part-1.php

Reference:

http://docs.autodesk.com/ACD/2011/ENU/filesDXF/WS1a9193826455f5ff18cb41610ec0a2e719-7943.htm

irneb

  • Water Moccasin
  • Posts: 1794
  • ACad R9-2016, Revit Arch 6-2016
Re: APPID Tables
« Reply #2 on: March 04, 2012, 03:23:47 AM »
There's another option as well: Dictionaries (not the spelling kind, but rather like a lookup table in excel). A pro over XData is there's no limit in size per entity (i.e. you can store 2GB of data onto one single APPID - not just 16kb). A pro and con is that it does not have structured ways of defining data types - each XRecord of a dictionary can hold any type of data and you need not place it in specific DXF codes like in xdata, in this way it's more like a lisp-association-list than a database. A definite con is that it's extremely difficult to selection set filter such data - xdata is relatively "simple" to filter for entities having only certain xdata values. Another con is it does not have "smart" data items, like handles linked to entities which could automatically change if copied / deleted / scaled / moved.

Here's a tut on dictionaries and xrecords: http://www.afralisp.net/autolisp/tutorials/dictionaries-and-xrecords.php

Also, making use of an APPID to store lisp data is extrelemy simple in VLisp. Just use the built-in ldata functions with your choice of APPID as dictionary name:
Common sense - the curse in disguise. Because if you have it, you have to live with those that don't.