乐筑天下

搜索
欢迎各位开发者和用户入驻本平台 尊重版权,从我做起,拒绝盗版,拒绝倒卖 签到、发布资源、邀请好友注册,可以获得银币 请注意保管好自己的密码,避免账户资金被盗
查看: 68|回复: 1

[编程交流] X RECORD management, looking f

[复制链接]

44

主题

139

帖子

95

银币

后起之秀

Rank: 20Rank: 20Rank: 20Rank: 20

铜币
221
发表于 2022-7-5 18:24:33 | 显示全部楼层 |阅读模式
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
  1. (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?
 
  1. (assoc 3 (dictsearch (namedobjdict) "Solaio Cobiax"))
get me only the 1st one (3 . "21 100")
 
Thanks!
回复

使用道具 举报

106

主题

1万

帖子

101

银币

顶梁支柱

Rank: 50Rank: 50

铜币
1299
发表于 2022-7-5 19:41:31 | 显示全部楼层
Maybe something like this make it a text string not a 300-309
 
  1. (if anXrec (setq anXrec (dictadd adict (STRCAT "TEXTVARS" (RTOS (+ X 1))) anXrec)))
回复

使用道具 举报

发表回复

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

  • 微信公众平台

  • 扫描访问手机版

  • 点击图片下载手机App

QQ|关于我们|小黑屋|乐筑天下 繁体中文

GMT+8, 2025-3-12 19:56 , Processed in 0.540608 second(s), 56 queries .

© 2020-2025 乐筑天下

联系客服 关注微信 帮助中心 下载APP 返回顶部 返回列表