乐筑天下

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

[编程交流] 错误:错误的参数类型:stri

[复制链接]

42

主题

173

帖子

132

银币

后起之秀

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

铜币
220
发表于 2022-7-5 18:03:56 | 显示全部楼层 |阅读模式
我在网上找到的Lisp程序。。。当我运行它时,会弹出这个错误
有什么帮助吗?
  1. ; Legend - EMT Software Inc., by Scott Hull 04/18/01
  2. ;
  3. (defun C:LEGEND (/ #ALERT #DCL-FILE #DCL-ID #DCL-LIST #GO #HELP #LEGEND-BLOCK
  4. #LEGEND-LAYER #LINENO @ALERT @DWGLYRS @LAYER @LIST @LEGEND-DRAW
  5. @LEGEND-READ @LEGEND-WRITE *error*)
  6. (setq #DCL-LIST (list
  7. "legend : dialog {"
  8. " key = "title";"
  9. " label = "Legend Generator";"
  10. " : boxed_column {"
  11. " label = "&Layers";"
  12. " : concatenation {"
  13. " : text_part {"
  14. " label = "Name";"
  15. " width = 19;"
  16. " }"
  17. " : text_part {"
  18. " label = "Legend";"
  19. " width = 9;"
  20. " }"
  21. " : text_part {"
  22. " label = "Description";"
  23. " }"
  24. " }"
  25. " : list_box {"
  26. " height = 8;"
  27. " key = "layer";"
  28. " tabs = "19 28";"
  29. " width = 70;"
  30. " }"
  31. " : row {"
  32. " : edit_box {"
  33. " edit_width = 60;"
  34. " fixed_width = true;"
  35. " key = "descp-layer";"
  36. " label = "&Description:";"
  37. " }"
  38. " }"
  39. " }"
  40. " : boxed_column {"
  41. " label = "&Blocks";"
  42. " : concatenation {"
  43. " : text_part {"
  44. " label = "Name";"
  45. " width = 19;"
  46. " }"
  47. " : text_part {"
  48. " label = "Legend";"
  49. " width = 9;"
  50. " }"
  51. " : text_part {"
  52. " label = "Description";"
  53. " }"
  54. " }"
  55. " : list_box {"
  56. " height = 8;"
  57. " key = "block";"
  58. " tabs = "19 28";"
  59. " width = 70;"
  60. " }"
  61. " : row {"
  62. " : edit_box {"
  63. " edit_width = 60;"
  64. " fixed_width = true;"
  65. " key = "descp-block";"
  66. " label = "&Description:";"
  67. " }"
  68. " }"
  69. " }"
  70. " ok_cancel_help_cadalog_errtile;"
  71. "}"
  72. ""
  73. "cadalog_button : retirement_button {"
  74. " key = "cadalog";"
  75. " label = "&CADalog.com...";"
  76. "}"
  77. ""
  78. "ok_cancel_help_cadalog : column {"
  79. " : row {"
  80. " fixed_width = true;"
  81. " alignment = centered;"
  82. " ok_button;"
  83. " : spacer {"
  84. " width = 2;"
  85. " }"
  86. " cancel_button;"
  87. " : spacer {"
  88. " width = 2;"
  89. " }"
  90. " help_button;"
  91. " : spacer {"
  92. " width = 2;"
  93. " }"
  94. " cadalog_button;"
  95. " }"
  96. "}"
  97. ""
  98. "ok_cancel_help_cadalog_errtile : column {"
  99. " ok_cancel_help_cadalog;"
  100. " errtile;"
  101. "}"))
  102. (setq #HELP (strcat
  103. "Legend Generator\n\n"
  104. "Allows you to add text descriptions to create a legend for blocks and \n"
  105. "layers. The programs stores descriptions in two files, legend-block.tbl \n"
  106. "and legend-layer.tbl so they can be reused later.\n\n"
  107. "Blocks and layers that are present in the current drawing or in an XREF \n"
  108. "can be used but XREF blocks and linetypes that cannot be found in the \n"
  109. "current drawing table will not display in the legend. Instead, any blocks \n"
  110. "that are not found will have a text marker placed in the legend, and any \n"
  111. "linetypes that are not found will use the CONTINUOUS linetype.\n\n"
  112. "The text for the legend is based on the current setting of the AutoCAD \n"
  113. "TEXTSIZE system variable. Block scales are derived from existing blocks \n"
  114. "used in the drawing.\n\n"
  115. "You can enter different descriptions for blocks and layers in XREFs that \n"
  116. "use the same name as the base drawing but the descriptions from the base \n"
  117. "drawing will take precedence when the legend program writes the two tbl \n"
  118. "files for later use."))
  119. (if (not V:LEGEND_DIR)
  120. (setq V:LEGEND_DIR
  121. (strcat (vl-filename-directory (findfile "legend.lsp")) "\")))
  122. (defun *error* (%A)
  123. (if (= (type V:FILE) 'FILE) (close V:FILE))
  124. (cond
  125. ((= %A "Function cancelled") nil)
  126. ((and V:FILENAME (= %A "malformed string"))
  127. (princ (strcat "\nerror: check file - " V:FILENAME)))
  128. (t (princ (strcat "\nerror: " %A "\007\n"))))
  129. (princ))
  130. (defun @ALERT0 (%STR)
  131. (if (not #ALERT) (setq #ALERT ""))
  132. (setq #ALERT
  133. (strcat #ALERT "Linetype " %STR " is not loaded - used CONTINUOUS\n")))
  134. (defun @ALERT1 (%STR)
  135. (if (not #ALERT) (setq #ALERT ""))
  136. (setq #ALERT
  137. (strcat #ALERT "Block " %STR " is not loaded - used text w/block name\n")))
  138. (defun @BASE (%A / #POS)
  139. (setq #POS (vl-string-position 124 %A))
  140. (if #POS (substr %A (+ #POS 2)) %A))
  141. (defun @FORMAT (%A / #CHR #COUNT #LEN #STR)
  142. (setq #COUNT 0 #LEN (strlen %A) #STR "")
  143. (repeat #LEN
  144. (setq #COUNT (1+ #COUNT) #CHR (substr %A #COUNT 1))
  145. (if (= #CHR """) (setq #CHR "\\""))
  146. (setq #STR (strcat #STR #CHR)))
  147. (eval #STR))
  148. (defun @DWGLYRS (/ #LINE #LYR #LYRNAME #X1 #X2)
  149. (setq #LYR (tblnext "layer" 1))
  150. (while #LYR
  151. (setq #LYRNAME (strcase (cdr (assoc 2 #LYR))))
  152. (if (setq #LINE (assoc (@BASE #LYRNAME) (cdr TBL:LEGEND-LAYER)))
  153. (setq #LEGEND-LAYER (cons (list #LYRNAME (cadr #LINE) (caddr #LINE)) #LEGEND-LAYER))
  154. (setq #LEGEND-LAYER (cons (list #LYRNAME 0 "") #LEGEND-LAYER)))
  155. (setq #LYR (tblnext "layer")))
  156. (setq #LEGEND-LAYER
  157. (vl-sort #LEGEND-LAYER (function (lambda (#X1 #X2) (< (car #X1) (car #X2)))))))
  158. (defun @DWGBLKS (/ #LINE #BLK #BLKNAME #X1 #X2)
  159. (setq #BLK (tblnext "block" 1))
  160. (while #BLK
  161. (setq #BLKNAME (strcase (cdr (assoc 2 #BLK))))
  162. (cond
  163. ((assoc 1 #BLK) nil)
  164. ((= (substr (@BASE #BLKNAME) 1 2) "*U") nil)
  165. ((setq #LINE (assoc (@BASE #BLKNAME) (cdr TBL:LEGEND-BLOCK)))
  166. (setq #LEGEND-BLOCK (cons (list #BLKNAME (cadr #LINE) (caddr #LINE)) #LEGEND-BLOCK)))
  167. (T (setq #LEGEND-BLOCK (cons (list #BLKNAME 0 "") #LEGEND-BLOCK))))
  168. (setq #BLK (tblnext "block")))
  169. (if #LEGEND-BLOCK (setq #LEGEND-BLOCK
  170. (vl-sort #LEGEND-BLOCK (function (lambda (#X1 #X2) (< (car #X1) (car #X2))))))))
  171. ;draw legend
  172. (defun @LEGEND-DRAW (/ #CLAYER #PT0 #PT1 #SCALE #TEXTSIZE #X
  173. @DRAWBLK @DRAWLINE @DRAWTXT @INSERT)
  174. (setvar "cmdecho" 0)
  175. (setq #CLAYER (getvar "clayer")
  176. #TEXTSIZE (getvar "textsize"))
  177. ;%A - block name
  178. (defun @DRAWBLK (%BLKNAME / #0 #BLK #DATA #EXIST #LYR #SCALE #SIZE #SS #TMP @SIZE)
  179. (defun @SIZE (%ENT / #MAXP #MINP)
  180. (vla-getboundingbox (vlax-ename->vla-object %ENT) '#MINP '#MAXP)
  181. (setq #MINP (vlax-safearray->list #MINP)
  182. #MAXP (vlax-safearray->list #MAXP))
  183. (- (cadr #MAXP) (cadr #MINP)))
  184. (setq #BLK (@BASE %BLKNAME)
  185. #EXIST (tblsearch "block" #BLK)
  186. #SS (ssget "_X" (list (cons 2 #BLK))))
  187. (if #SS
  188. (setq #0 (ssname #SS 0)
  189. #DATA (entget #0)
  190. #LYR (cdr (assoc 8 #DATA))
  191. #SCALE (cdr (assoc 41 #DATA))))
  192. (cond
  193. ((not #EXIST)
  194. (@ALERT1 #BLK)
  195. (@DRAWTXT "m" (polar #PT1 0 (* #TEXTSIZE 6.5)) #BLK)
  196. (@DRAWTXT "ml" (polar #PT1 0 (* #TEXTSIZE 15)) #TEXT)
  197. (setq #PT1 (polar #PT1 (* 1.5 pi) (* #TEXTSIZE 4))))
  198. ((and #EXIST (not #0))
  199. (setq #SCALE 1.0 #SIZE #TEXTSIZE #LYR (getvar "celayer"))
  200. (@INSERT #BLK #PT1 #LYR #SCALE))
  201. (#0
  202. (if (not vla-getboundingbox) (vl-load-com))
  203. (setq #SIZE (@SIZE #0))
  204. (if (> #SIZE (setq #TMP (* 3 #TEXTSIZE)))
  205. (setq #PT1 (polar #PT1 (* 1.5 pi) (setq #TMP (* 0.5 (- #SIZE #TMP)))))
  206. (setq #TMP nil))
  207. (@INSERT #BLK #PT1 #LYR #SCALE)
  208. (@DRAWTXT "ml" (polar #PT1 0 (* #TEXTSIZE 15)) #TEXT)
  209. (if #TMP
  210. (setq #PT1 (polar #PT1 (* 1.5 pi) (+ (* #TEXTSIZE 4) #TMP)))
  211. (setq #PT1 (polar #PT1 (* 1.5 pi) (* #TEXTSIZE 4)))))))
  212. (defun @INSERT (%BLK %PT %LYR %SCALE / #CECOLOR #CELTYPE #COLOR #DATA
  213. #LTYPE)
  214. (setq #CECOLOR (getvar "cecolor")
  215. #CELTYPE (getvar "celtype")
  216. #DATA (tblsearch "layer" %LYR)
  217. #COLOR (cdr (assoc 62 #DATA))
  218. #LTYPE (@BASE (cdr (assoc 6 #DATA))))
  219. (if (not (tblsearch "ltype" #LTYPE))
  220. (progn
  221. (@ALERT0 #LTYPE)
  222. (setq #LTYPE "CONTINUOUS")))
  223. (if (= (type #COLOR) 'INT) (setq #COLOR (itoa #COLOR)))
  224. (setvar "cecolor" #COLOR)
  225. (setvar "celtype" #LTYPE)
  226. (command "_.insert" %BLK "_none" (polar %PT 0 (* #TEXTSIZE 6.5)) %SCALE %SCALE 0)
  227. (setvar "cecolor" #CECOLOR)
  228. (setvar "celtype" #CELTYPE))
  229. ;draw line
  230. (defun @DRAWLINE (%LYR %PT / #CECOLOR #CELTYPE #COLOR #DATA #LTYPE)
  231. (setq #CECOLOR (getvar "cecolor")
  232. #CELTYPE (getvar "celtype")
  233. #DATA (tblsearch "layer" %LYR)
  234. #COLOR (cdr (assoc 62 #DATA))
  235. #LTYPE (@BASE (cdr (assoc 6 #DATA))))
  236. (if (not (tblsearch "ltype" #LTYPE))
  237. (progn
  238. (@ALERT0 #LTYPE)
  239. (setq #LTYPE "CONTINUOUS")))
  240. (if (= (type #COLOR) 'INT) (setq #COLOR (itoa #COLOR)))
  241. (setvar "cecolor" #COLOR)
  242. (setvar "celtype" #LTYPE)
  243. (command "_.line" "_none" %PT "_none" (polar %PT 0 (* #TEXTSIZE 13)) "")
  244. (setvar "cecolor" #CECOLOR)
  245. (setvar "celtype" #CELTYPE))
  246. ;draw text
  247. (defun @DRAWTXT (%JUST %PT %TXT)
  248. (if (= (cdr (assoc 40 (tblsearch "style" (getvar "textstyle")))) 0.0)
  249. (command "_.text" (strcat "_" %JUST) "_none" %PT "" 0 %TXT)
  250. (command "_.text" (strcat "_" %JUST) "_none" %PT 0 %TXT)))
  251. (initget 1)
  252. (setq #PT0 (getpoint "\nLegend insert point: ")
  253. #PT1 (polar #PT0 (* 1.5 pi) (* #TEXTSIZE 4)))
  254. (@DRAWTXT "m" (polar #PT0 0 (* #TEXTSIZE 14)) "LEGEND")
  255. (foreach #X #LEGEND-LAYER
  256. (if (= (cadr #X) 1)
  257. (progn
  258. (if (= (setq #TEXT (caddr #X)) "") (setq #TEXT "???"))
  259. (@DRAWLINE (car #X) #PT1)
  260. (@DRAWTXT "ml" (polar #PT1 0 (* #TEXTSIZE 15)) #TEXT)
  261. (setq #PT1 (polar #PT1 (* 1.5 pi) (* #TEXTSIZE 4))))))
  262. (foreach #X #LEGEND-BLOCK
  263. (if (= (cadr #X) 1)
  264. (progn
  265. (if (= (setq #TEXT (caddr #X)) "") (setq #TEXT "???"))
  266. (@DRAWBLK (car #X))))))
  267. ;write legend table
  268. (defun @LEGEND-WRITE-LAYER (%LGND / #BASE #LEGEND2 #X)
  269. (setq #LEGEND2 %LGND
  270. V:FILENAME (strcat V:LEGEND_DIR "legend-layer.tbl")
  271. V:FILE (open V:FILENAME "w"))
  272. (foreach #X (cdr TBL:LEGEND-LAYER)
  273. (if (not (assoc (car #X) #LEGEND2))
  274. (setq #LEGEND2 (append #LEGEND2 (list #X)))))
  275. (write-line ""LAYER" "LEGEND" "DESCP"" V:FILE)
  276. (foreach #X #LEGEND2
  277. (setq #BASE (@BASE (car #X)))
  278. (if (and
  279. (/= (caddr #X) "")
  280. (or (= #BASE (car #X)) (not (assoc #BASE #LEGEND2))))
  281. (write-line
  282. (strcat """ (@BASE (car #X)) "" "
  283. (itoa (cadr #X)) " "" (@FORMAT (caddr #X)) """)
  284. V:FILE)))
  285. (close V:FILE))
  286. (defun @LEGEND-WRITE-BLOCK (%LGND / #BASE #LEGEND2 #X)
  287. (setq #LEGEND2 %LGND
  288. V:FILENAME (strcat V:LEGEND_DIR "legend-block.tbl")
  289. V:FILE (open V:FILENAME "w"))
  290. (foreach #X (cdr TBL:LEGEND-BLOCK)
  291. (if (not (assoc (car #X) #LEGEND2))
  292. (setq #LEGEND2 (append #LEGEND2 (list #X)))))
  293. (write-line ""BLOCK" "LEGEND" "DESCP"" V:FILE)
  294. (foreach #X #LEGEND2
  295. (setq #BASE (@BASE (car #X)))
  296. (if (and
  297. (/= (caddr #X) "")
  298. (or (= #BASE (car #X)) (not (assoc #BASE #LEGEND2))))
  299. (write-line
  300. (strcat """ #BASE "" "
  301. (itoa (cadr #X)) " "" (@FORMAT (caddr #X)) """)
  302. V:FILE)))
  303. (close V:FILE))
  304. ;sets table and returns current legend table as a list
  305. (defun @LEGEND-GET-LAYER (/ @TABLE V:FILE V:FILENAME)
  306. (defun @TABLE (/ #A #B #C #FILE)
  307. (setq #A T
  308. #FILE "legend-layer.tbl"
  309. V:FILENAME (findfile #FILE)
  310. V:FILE (open V:FILENAME "r"))
  311. (while #A
  312. (setq #A (read-line V:FILE))
  313. (cond
  314. ((and #A (/= (substr #A 1 1) ";")
  315. (setq #C (read (strcat "(" #A ")"))))
  316. (setq #B (cons #C #B)))))
  317. (close V:FILE)
  318. (reverse #B))
  319. (if (findfile "legend-layer.tbl")
  320. (setq TBL:LEGEND-LAYER (@TABLE))
  321. (setq TBL:LEGEND-LAYER (list (list "LAYER" "LEGEND" "DESCP")))))
  322. ;sets table and returns current legend table as a list
  323. (defun @LEGEND-GET-BLOCK (/ @TABLE V:FILE V:FILENAME)
  324. (defun @TABLE (/ #A #B #C #FILE)
  325. (setq #A T
  326. #FILE "legend-block.tbl"
  327. V:FILENAME (findfile #FILE)
  328. V:FILE (open V:FILENAME "r"))
  329. (while #A
  330. (setq #A (read-line V:FILE))
  331. (cond
  332. ((and #A (/= (substr #A 1 1) ";")
  333. (setq #C (read (strcat "(" #A ")"))))
  334. (setq #B (cons #C #B)))))
  335. (close V:FILE)
  336. (reverse #B))
  337. (if (findfile "legend-block.tbl")
  338. (setq TBL:LEGEND-BLOCK (@TABLE))
  339. (setq TBL:LEGEND-BLOCK (list (list "BLOCK" "LEGEND" "DESCP")))))
  340. (defun @LIST-LAYER (/ #X)
  341. (start_list "layer")
  342. (foreach #X #LEGEND-LAYER
  343. (add_list (strcat (car #X) "\t" (if (= (cadr #X) 1) "X" "")
  344. "\t" (caddr #X))))
  345. (end_list))
  346. (defun @LIST-BLOCK (/ #X)
  347. (start_list "block")
  348. (foreach #X #LEGEND-BLOCK
  349. (add_list (strcat (car #X) "\t" (if (= (cadr #X) 1) "X" "")
  350. "\t" (caddr #X))))
  351. (end_list))
  352. (defun @LAYER (%A %B %C / #CASR #CADDR #CHECK #LINE0 #LINE1)
  353. (setq #LINENO (atoi %A)
  354. #LINE0 (nth #LINENO #LEGEND-LAYER)
  355. #CHECK (cadr #LINE0))
  356. (cond
  357. (%B
  358. (mode_tile "descp-layer" #CHECK)
  359. (setq #CADR (abs (1- #CHECK)) #CADDR (caddr #LINE0)))
  360. (%C
  361. (setq #CADR (cadr #LINE0) #CADDR %C))
  362. (T
  363. (mode_tile "descp-layer" (abs (1- #CHECK)))
  364. (setq #CADR (cadr #LINE0) #CADDR (caddr #LINE0))))
  365. (setq #LINE1
  366. (list (car #LINE0) #CADR #CADDR)
  367. #LEGEND-LAYER (subst #LINE1 #LINE0 #LEGEND-LAYER))
  368. (@LIST-LAYER)
  369. (set_tile "layer" %A)
  370. (set_tile "descp-layer" (caddr (nth #LINENO #LEGEND-LAYER)))
  371. (if (and %A (= #CHECK 0)) (mode_tile "descp-layer" 2)))
  372. (defun @BLOCK (%A %B %C / #CHECK #LINE0 #LINE1)
  373. (setq #LINENO (atoi %A)
  374. #LINE0 (nth #LINENO #LEGEND-BLOCK)
  375. #CHECK (cadr #LINE0))
  376. (cond
  377. (%B
  378. (mode_tile "descp-block" #CHECK)
  379. (setq #CADR (abs (1- #CHECK)) #CADDR (caddr #LINE0)))
  380. (%C
  381. (setq #CADR (cadr #LINE0) #CADDR %C))
  382. (T
  383. (mode_tile "descp-block" (abs (1- #CHECK)))
  384. (setq #CADR (cadr #LINE0) #CADDR (caddr #LINE0))))
  385. (setq #LINE1
  386. (list (car #LINE0) #CADR #CADDR)
  387. #LEGEND-BLOCK (subst #LINE1 #LINE0 #LEGEND-BLOCK))
  388. (@LIST-BLOCK)
  389. (set_tile "block" %A)
  390. (set_tile "descp-block" (caddr (nth #LINENO #LEGEND-BLOCK)))
  391. (if (and %A (= #CHECK 0)) (mode_tile "descp-block" 2)))
  392. (if (not (findfile (setq #DCL-FILE (strcat V:LEGEND_DIR "legend.dcl"))))
  393. (progn
  394. (setq #FILE (open #DCL-FILE "w"))
  395. (foreach #X #DCL-LIST (write-line #X #FILE))
  396. (close #FILE)
  397. (alert #HELP)))
  398. (if (< (setq #DCL-ID (load_dialog "legend")) 0) (quit))
  399. (if (not (new_dialog "legend" #DCL-ID)) (quit))
  400. (@LEGEND-GET-LAYER)
  401. (@LEGEND-GET-BLOCK)
  402. (@DWGLYRS)
  403. (@DWGBLKS)
  404. (@LIST-LAYER)
  405. (@LIST-BLOCK)
  406. (@LAYER "0" nil nil)
  407. (if #LEGEND-BLOCK
  408. (@BLOCK "0" nil nil)
  409. (progn (mode_tile "block" 1) (mode_tile "descp-block" 1)))
  410. (set_tile "layer" "0")
  411. (action_tile "accept" (strcat
  412. "(@LEGEND-WRITE-LAYER #LEGEND-LAYER)"
  413. "(@LEGEND-WRITE-BLOCK #LEGEND-BLOCK)"
  414. "(done_dialog 1)"))
  415. (action_tile "cadalog" "(done_dialog 2)")
  416. (action_tile "descp-layer" "(@LAYER (itoa #LINENO) nil $value)")
  417. (action_tile "descp-block" "(@BLOCK (itoa #LINENO) nil $value)")
  418. (action_tile "help" "(alert #HELP)")
  419. (action_tile "layer" "(@LAYER $value T nil)")
  420. (action_tile "block" "(@BLOCK $value T nil)")
  421. (setq #GO (start_dialog))
  422. (cond
  423. ((= #GO 1)
  424. (@LEGEND-DRAW)
  425. (if #ALERT (alert #ALERT)))
  426. ((= #GO 2) (command "_.browser" "www.cadalog.com")))
  427. (princ))
  428. **************************************************************************
  429. Legend.dcl
  430. legend : dialog {
  431. key = "title";
  432. label = "Legend Generator";
  433. : boxed_column {
  434. label = "&Layers";
  435. : concatenation {
  436. : text_part {
  437. label = "Name";
  438. width = 19;
  439. }
  440. : text_part {
  441. label = "Legend";
  442. width = 9;
  443. }
  444. : text_part {
  445. label = "Description";
  446. }
  447. }
  448. : list_box {
  449. height = 8;
  450. key = "layer";
  451. tabs = "19 28";
  452. width = 70;
  453. }
  454. : row {
  455. : edit_box {
  456. edit_width = 60;
  457. fixed_width = true;
  458. key = "descp-layer";
  459. label = "&Description:";
  460. }
  461. }
  462. }
  463. : boxed_column {
  464. label = "&Blocks";
  465. : concatenation {
  466. : text_part {
  467. label = "Name";
  468. width = 19;
  469. }
  470. : text_part {
  471. label = "Legend";
  472. width = 9;
  473. }
  474. : text_part {
  475. label = "Description";
  476. }
  477. }
  478. : list_box {
  479. height = 8;
  480. key = "block";
  481. tabs = "19 28";
  482. width = 70;
  483. }
  484. : row {
  485. : edit_box {
  486. edit_width = 60;
  487. fixed_width = true;
  488. key = "descp-block";
  489. label = "&Description:";
  490. }
  491. }
  492. }
  493. ok_cancel_help_cadalog_errtile;
  494. }
  495. cadalog_button : retirement_button {
  496. key = "cadalog";
  497. label = "&CADalog.com...";
  498. }
  499. ok_cancel_help_cadalog : column {
  500. : row {
  501. fixed_width = true;
  502. alignment = centered;
  503. ok_button;
  504. : spacer {
  505. width = 2;
  506. }
  507. cancel_button;
  508. : spacer {
  509. width = 2;
  510. }
  511. help_button;
  512. : spacer {
  513. width = 2;
  514. }
  515. cadalog_button;
  516. }
  517. }
  518. ok_cancel_help_cadalog_errtile : column {
  519. ok_cancel_help_cadalog;
  520. errtile;
  521. }
回复

使用道具 举报

106

主题

1万

帖子

101

银币

顶梁支柱

Rank: 50Rank: 50

铜币
1299
发表于 2022-7-5 18:32:03 | 显示全部楼层
从这一点开始,dcl代码不是lisp代码,请删除并重试,这是上面代码的副本
**************************************************************************
传奇dcl
回复

使用道具 举报

42

主题

173

帖子

132

银币

后起之秀

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

铜币
220
发表于 2022-7-5 18:38:33 | 显示全部楼层
删除dcl代码后仍然存在错误。。。有什么建议吗?
回复

使用道具 举报

24

主题

1265

帖子

1028

银币

后起之秀

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

铜币
362
发表于 2022-7-5 19:02:55 | 显示全部楼层
 
将代码加载到VLIDE中。
从AutoCAD运行。
得到错误“error:bad参数类型:stringp nil”
现在回到VLIDE
选择查看>错误跟踪。
这将打开错误跟踪窗口。
在该窗口的第2行,您可以看到错误在这一行:
190401edpfybwmucduunuw.png
如果您右键单击那里,并选择Call Point Source,它会将您带到发生错误的代码行。
190402xqywwbnn38n7z3qq.png
 
因此,该文件似乎必须另存为“Legend.lsp”,并位于支持文件搜索路径中。我这样做了,现在运行正常。
 
190403y9yigb2b02f2g9u5.png
回复

使用道具 举报

42

主题

173

帖子

132

银币

后起之秀

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

铜币
220
发表于 2022-7-5 19:08:42 | 显示全部楼层
现在效果很好。。
谢谢rkmcswain,BIGAL
 
非常感谢
回复

使用道具 举报

发表回复

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

本版积分规则

  • 微信公众平台

  • 扫描访问手机版

  • 点击图片下载手机App

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

GMT+8, 2025-3-13 01:04 , Processed in 0.646417 second(s), 64 queries .

© 2020-2025 乐筑天下

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