44
139
95
后起之秀
(setq anXrec (entmakex '((0 . "XRECORD") (100 . "AcDbXrecord") (300 . posizione) (301 . altezza) (302 . larghezza) (303 . colore_cordolo) (280 . n_superiore) (281 . phi_superiore) (282 . n_inferiore) (283 . phi_inferiore) (284 . phi_staffa) (285 . passo_staffa) (286 . n_legature) ) ) )
使用道具 举报
(defun c:cordoli/cordoli/aggiungi_cordolo#OnClicked (/) (dcl-ComboBox-AddString cordoli/cordoli/n_tipo_cordoli (dcl-Control-GetText cordoli/cordoli/nome)) (setq nome (dcl-Control-GetText cordoli/cordoli/nome)posizione (dcl-Control-GetText cordoli/cordoli/posizione) altezza (dcl-Control-GetText cordoli/cordoli/altezza) larghezza (dcl-Control-GetText cordoli/cordoli/larghezza);;COLORE colore_cordolo (dcl-Control-GetText cordoli/cordoli/colore_cordolo)estensione (dcl-Control-GetText cordoli/cordoli/estensione) n_superiore (atoi (dcl-Control-GetText cordoli/cordoli/n_superiore)) phi_superiore (atoi (dcl-Control-GetText cordoli/cordoli/phi_superiore)) n_inferiore (atoi (dcl-Control-GetText cordoli/cordoli/n_inferiore)) phi_inferiore (atoi (dcl-Control-GetText cordoli/cordoli/phi_inferiore)) phi_staffa (atoi (dcl-Control-GetText cordoli/cordoli/phi_staffa)) passo_staffa (atoi (dcl-Control-GetText cordoli/cordoli/passo_staffa)) n_legature (atoi (dcl-Control-GetText cordoli/cordoli/n_legature)) ) (get-or-make-Xrecord nome) );this sets the variables;//////////////////////////////(defun get-or-create-Dict (/ adict) ;;test if "Cordoli" is already present in the main dictionary (if (not (setq adict (dictsearch (namedobjdict) "Cordoli"))) ;;if not present then create a new one and set the main ;; dictionary as owner (progn (setq adict (entmakex '((0 . "DICTIONARY")(100 . "AcDbDictionary")))) ;;if succesfully created, add it to the main dictionary (if adict (setq adict (dictadd (namedobjdict) "Cordoli" adict))) ) ;;if present then just return its entity name (setq adict (cdr (assoc -1 adict))) )) (defun get-or-make-Xrecord ( nome / adict anXrec nome) (cond ;;first get our dictionary. Notice that "Cordoli" will be ;;created here in case it doesn't exist ((setq adict (get-or-create-Dict)) (cond ;;if "Cordoli" is now valid then look for "Cordoli" Xrecord ((not (setq anXrec (dictsearch adict nome))) ;;if "Cordoli" was not found then create it (setq anXrec (entmakex '((0 . "XRECORD") (100 . "AcDbXrecord") (cons 300 posizione) (cons 301 altezza) (cons 302 larghezza) (cons 303 colore_cordolo) (cons 280 n_superiore) (cons 281 phi_superiore) (cons 282 n_inferiore) (cons 283 phi_inferiore) (cons 284 phi_staffa) (cons 285 passo_staffa) (cons 286 n_legature) ) ) ) ;;if creation succeeded then add it to our dictionary (if anXrec (setq anXrec (dictadd adict nome anXrec))) ) ;;if it's already present then just return its entity name (setq anXrec (cdr (assoc -1 (dictsearch adict nome))) ) ) ) ))
0
301
初来乍到
(setq anXrec (entmakex (list '(0 . "XRECORD") '(100 . "AcDbXrecord") (cons 300 posizione) (cons 301 altezza) (cons 302 larghezza) (cons 303 colore_cordolo) (cons 280 n_superiore) (cons 281 phi_superiore) (cons 282 n_inferiore) (cons 283 phi_inferiore) (cons 284 phi_staffa) (cons 285 passo_staffa) (cons 286 n_legature) ) ) )
本版积分规则 发表回复 回帖后跳转到最后一页
微信公众平台
扫描访问手机版
点击图片下载手机App
|关于我们|小黑屋|乐筑天下 繁体中文
GMT+8, 2025-3-12 13:53 , Processed in 0.850850 second(s), 64 queries .
© 2020-2025 乐筑天下
在线时间:10:00-17:00
暂无
扫一扫,关注我们
帮助中心
关于我们
下载APP客户端