TheSwamp

Code Red => AutoLISP (Vanilla / Visual) => Topic started by: d2010 on December 06, 2021, 02:29:37 AM

Title: How to xdsize '(1002 . "{") xd_list)) inside LINE or TEXT?
Post by: d2010 on December 06, 2021, 02:29:37 AM
Please you give a tiny example of how to use (xdroom and (xdsize without "DPPH_INFO"?
Question0=How to save addinfo1002 inside LINE?
Question1=How to read addinfo1002 from LINE?
I do not have the application.
:crazy2:
 This large demo, attached here is too hard for my mind.
  (regapp "DPPH_INFO") isinside AutoCad?
Question2=Exists any way to use the function " (xdsize" without "DPPH_INFO")?
Today I think the "DPPH_INFO", I do not have the  "DPPH_INFO" isinside my AutoCad.exe
 :laugh:
Code: [Select]
      ; Initialize list of xdata for this app.
      (setq xd_list (cons (cons 1040 input) xd_list))
      (setq xd_list (cons '(1002 . "{") xd_list))
      (setq xd_list (cons "DPPH_INFO" xd_list))
      (setq xd_list (list -3 xd_list))
      (setq size_new (xdsize xd_list))
      (setq room_left (xdroom ename))
      (setq elist (cons xd_list ent))

Title: Re: How to xdsize '(1002 . "{") xd_list)) inside LINE or TEXT?
Post by: mhupp on December 06, 2021, 10:58:14 AM
This looks like xdata. Its a way to attach notes/data to objects in the drawing that then can be used to sort or recall that info later.
Q0 & Q1 this isn't the data 1002 is to let Autocad know when your starting and ending inputs of data.
yes (regapp "DPPH_INFO") is attached to and object in a drawing.

Q2 it looks like xdsize is a real value saved under "DPPH_INFO" header. if its attached to anything in the drawing idk.

(-3 ("DPPH_INFO"
   (1002 . "{")
   (1040 . xdsize) ;could be multiple if xd_list has multiple
   (1002 . "}")
   )
)

look at this for better explanation.
https://www.afralisp.net/autolisp/tutorials/extended-entity-data-part-1.php (https://www.afralisp.net/autolisp/tutorials/extended-entity-data-part-1.php)
I don't use xdata that often so please correct me if anything said is wrong.