MastroLube 发表于 2022-7-5 18:24:33

X RECORD management, looking f

Hello guys,
I'm wondering if it's possible to manage my data in a better way.
By now, after creating a dictionary, I add an Xrecord to it

(setq anXrec (entmakex (list '(0 . "XRECORD")                               '(100 . "AcDbXrecord")                        (cons 300(dcl-Control-GetText Cobiax/Main/h)) ;altezza soletta                        (cons 301(dcl-Control-GetText Cobiax/Main/tipo_alleggerimento)) ;alleggerimento                               (cons 302(dcl-Control-GetText Cobiax/Main/c)) ;copriferro inf                        (cons 303(dcl-Control-GetText Cobiax/Main/c1)) ;copriferro sup                               (cons 304(dcl-Control-GetText Cobiax/Main/R_fuoco)) ;resistenza al fuoco                               (cons 305(dcl-Control-GetText Cobiax/Main/phi_base)) ;armatura sup di base                               (cons 306(dcl-Control-GetText Cobiax/Main/passo_base)) ;passo armatura sup di base                               (cons 307(dcl-Control-GetText Cobiax/Main/classe_cls)) ;classe del cls                               (cons 308(dcl-Control-GetText Cobiax/Main/classe_acciaio)) ;classe acciao                               (cons 309(dcl-Control-GetText Cobiax/Main/superficie)) ;superficie di getto                               (cons 91(atoi altezza_gabbia))                              (cons 92(atoi rid_peso)) ;ok                               (cons 93(atoi (rtos (* (atof vol_vuoti) 10000) 2 0)))                               (cons 94 (atoi passo_alleggerimenti)) ;ok                                   (cons 95 (atoi (rtos (* (atof pezzi_mq) 100) 2 0)))                                   (cons 96 (atoi lunghezza_gabbia))                        ;diametro ferri sup                        (cons 281(atoi (dcl-Control-GetText Cobiax/Main/phi_sup1)))                        (cons 282(atoi (dcl-Control-GetText Cobiax/Main/phi_sup2)))                        ;diametro ferri inf                              (cons 283(atoi (dcl-Control-GetText Cobiax/Main/phi_inf1)))                        (cons 284(atoi (dcl-Control-GetText Cobiax/Main/phi_inf2)))                        )                               )                           )
 
As you know dxf 90-99 are for 32bit integer value, 280-298 for 8bit integer and 300-309 for arbitrary txt values.
In fact i wanted to store all as text, but i don't know how to do that.
 
How can I storage more than 10 text value? I really need to create another Xrecord?
 
Thanks, Dennis
 
EDIT: got another little question
 
I've to dump the dictionary when I load my lisp.
Is there anyway to get all of the (3. " ") entities?
 

(assoc 3 (dictsearch (namedobjdict) "Solaio Cobiax"))
get me only the 1st one (3 . "21 100")
 
Thanks!

BIGAL 发表于 2022-7-5 19:41:31

Maybe something like this make it a text string not a 300-309
 

(if anXrec (setq anXrec (dictadd adict (STRCAT "TEXTVARS" (RTOS (+ X 1))) anXrec)))
页: [1]
查看完整版本: X RECORD management, looking f