Author Topic: Xrecord - saving lists  (Read 1928 times)

0 Members and 1 Guest are viewing this topic.

Lube

  • Guest
Xrecord - saving lists
« on: August 13, 2015, 05:54:10 AM »
Hello guys,

I got a question about Xrecord.

I've to save 13 list of elements in my drawing and edit them if necessary.
I've read this tutorial http://www.afralisp.net/autolisp/tutorials/dictionaries-and-xrecords.php but I don't know how to collect list (and if It's possible).

Can someone help me to accomplish that?

Thanks guys, Dennis

roy_043

  • Water Moccasin
  • Posts: 1895
  • BricsCAD 18
Re: Xrecord - saving lists
« Reply #1 on: August 13, 2015, 09:41:30 AM »
You can easily store points (= list of 3 reals) in Xrecords. For other lists you will have to use special functions.

Two links that may be of interest:

http://www.theswamp.org/index.php?topic=48868.0
(Topic is about Xdata so you will have to change the groupcodes)

http://www.theswamp.org/index.php?topic=1375.0
(Topic claims to be about Xdata but is mostly about dictionary data)

dgorsman

  • Water Moccasin
  • Posts: 2437
Re: Xrecord - saving lists
« Reply #2 on: August 13, 2015, 10:15:46 AM »
No special functions needed.  Each XRecord can store multiple elements of data, with each one assigned a DXF code which indicates the type (integer, real, string, soft pointer, and so on).  There are ranges of values available for most data types so you can assign sequential numbers to make it easier to recover specific information without depending on sequence or number of elements.
If you are going to fly by the seat of your pants, expect friction burns.

try {GreatPower;}
   catch (notResponsible)
      {NextTime(PlanAhead);}
   finally
      {MasterBasics;}

roy_043

  • Water Moccasin
  • Posts: 1895
  • BricsCAD 18
Re: Xrecord - saving lists
« Reply #3 on: August 14, 2015, 06:44:41 AM »
@ dgorsman:
In a way you are right. Which approach is the most useful for the OP will (also) depend on what is meant by '13 list of elements': 13 lists, or a list of 13 elements?

Maybe Dennis can clarify?