乐筑天下

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

[编程交流] 需要使用LISP插入Excel

[复制链接]

1

主题

1

帖子

0

银币

初来乍到

Rank: 1

铜币
5
发表于 2022-7-5 18:45:59 | 显示全部楼层 |阅读模式
我正试图让LISP自动编辑一些动态块,比如宽度和深度。我想在Excel电子表格中通过型号设置所有这些值。为了实现这一点,我使用了Lee Mac的“Set Dynamic Property Value”和Terry Miller的“GetExcel”代码(非常感谢你们让我走到这一步)。
 
我已经成功地让LISP用Lee Mac的代码处理动态块,但只使用了硬数字。我还可以让Getexcel从我的数据库返回数字。xls。但我无法将这些Excel数字放入动态块值中。
 
下面是我编写的代码的外观(我编写的部分在底部,是我尝试将上面的所有内容结合起来):
 
  1. ;-------------------------------------------------------------------------------
  2. ; Program Name: GetExcel.lsp [GetExcel R4]
  3. ; Created By:   Terry Miller (Email: [email="terrycadd@yahoo.com"]terrycadd@yahoo.com[/email])
  4. ;               (URL: [url]http://web2.airmail.net/terrycad[/url])
  5. ; Date Created: 9-20-03
  6. ; Function:     Several functions to get and put values into Excel cells.
  7. ;-------------------------------------------------------------------------------
  8. ; Revision History
  9. ; Rev  By     Date    Description
  10. ;-------------------------------------------------------------------------------
  11. ; 1    TM   9-20-03   Initial version
  12. ; 2    TM   8-20-07   Rewrote GetExcel.lsp and added several new sub-functions
  13. ;                     including ColumnRow, Alpha2Number and Number2Alpha written
  14. ;                     by Gilles Chanteau from Marseille, France.
  15. ; 3    TM   12-1-07   Added several sub-functions written by Gilles Chanteau
  16. ;                     including Cell-p, Row+n, and Column+n. Also added his
  17. ;                     revision of the PutCell function.
  18. ; 4    GC   9-20-08   Revised the GetExcel argument MaxRange$ to accept a nil
  19. ;                     and get the current region from cell A1.
  20. ;-------------------------------------------------------------------------------
  21. ; Overview of Main functions
  22. ;-------------------------------------------------------------------------------
  23. ; GetExcel - Stores the values from an Excel spreadsheet into *ExcelData@ list
  24. ;   Syntax:  (GetExcel ExcelFile$ SheetName$ MaxRange$)
  25. ;   Example: (GetExcel "C:\\Folder\\Filename.xls" "Sheet1" "L30")
  26. ; GetCell - Returns the cell value from the *ExcelData@ list
  27. ;   Syntax:  (GetCell Cell$)
  28. ;   Example: (GetCell "H15")
  29. ; Function example of usage:
  30. ; (defun c:Get-Example ()
  31. ;   (GetExcel "C:\\Folder\\Filename.xls" "Sheet1" "L30");<-- Edit Filename.xls
  32. ;   (GetCell "H21");Or you can just use the global *ExcelData@ list
  33. ; );defun
  34. ;-------------------------------------------------------------------------------
  35. ; OpenExcel - Opens an Excel spreadsheet
  36. ;   Syntax:  (OpenExcel ExcelFile$ SheetName$ Visible)
  37. ;   Example: (OpenExcel "C:\\Folder\\Filename.xls" "Sheet1" nil)
  38. ; PutCell - Put values into Excel cells
  39. ;   Syntax:  (PutCell StartCell$ Data$) or (PutCell StartCell$ DataList@)
  40. ;   Example: (PutCell "A1" (list "GP093" 58.5 17 "Base" "3'-6 1/4""))
  41. ; CloseExcel - Closes Excel session
  42. ;   Syntax:  (CloseExcel ExcelFile$)
  43. ;   Example: (CloseExcel "C:\\Folder\\Filename.xls")
  44. ; Function example of usage:
  45. ; (defun c:Put-Example ()
  46. ;   (OpenExcel "C:\\Folder\\Filename.xls" "Sheet1" nil);<-- Edit Filename.xls
  47. ;   (PutCell "A1" (list "GP093" 58.5 17 "Base" "3'-6 1/4""));Repeat as required
  48. ;   (CloseExcel "C:\\Folder\\Filename.xls");<-- Edit Filename.xls
  49. ;   (princ)
  50. ; );defun
  51. ;-------------------------------------------------------------------------------
  52. ; Note: Review the conditions of each argument in the function headings
  53. ;-------------------------------------------------------------------------------
  54. ; GetExcel - Stores the values from an Excel spreadsheet into *ExcelData@ list
  55. ; Arguments: 3
  56. ;   ExcelFile$ = Path and filename
  57. ;   SheetName$ = Sheet name or nil for not specified
  58. ;   MaxRange$ = Maximum cell ID range to include or nil to get the current region from cell A1
  59. ; Syntax examples:
  60. ; (GetExcel "C:\\Temp\\Temp.xls" "Sheet1" "E19") = Open C:\Temp\Temp.xls on Sheet1 and read up to cell E19
  61. ; (GetExcel "C:\\Temp\\Temp.xls" nil "XYZ123") = Open C:\Temp\Temp.xls on current sheet and read up to cell XYZ123
  62. ;-------------------------------------------------------------------------------
  63. (defun GetExcel (ExcelFile$ SheetName$ MaxRange$ / Column# ColumnRow@ Data@ ExcelRange^
  64. ExcelValue ExcelValue ExcelVariant^ MaxColumn# MaxRow# Range$ Row# Worksheet)
  65. (if (= (type ExcelFile$) 'STR)
  66.    (if (not (findfile ExcelFile$))
  67.      (progn
  68.        (alert (strcat "Excel file " ExcelFile$ " not found."))
  69.        (exit)
  70.      );progn
  71.    );if
  72.    (progn
  73.      (alert "Excel file not specified.")
  74.      (exit)
  75.    );progn
  76. );if
  77. (gc)
  78. (if (setq *ExcelApp% (vlax-get-object "Excel.Application"))
  79.    (progn
  80.      (alert "Close all Excel spreadsheets to continue!")
  81.      (vlax-release-object *ExcelApp%)(gc)
  82.    );progn
  83. );if
  84. (setq ExcelFile$ (findfile ExcelFile$))
  85. (setq *ExcelApp% (vlax-get-or-create-object "Excel.Application"))
  86. (vlax-invoke-method (vlax-get-property *ExcelApp% 'WorkBooks) 'Open ExcelFile$)
  87. (if SheetName$
  88.    (vlax-for Worksheet (vlax-get-property *ExcelApp% "Sheets")
  89.      (if (= (vlax-get-property Worksheet "Name") SheetName$)
  90.        (vlax-invoke-method Worksheet "Activate")
  91.      );if
  92.    );vlax-for
  93. );if
  94. (if MaxRange$
  95.    (progn
  96.      (setq ColumnRow@ (ColumnRow MaxRange$))
  97.      (setq MaxColumn# (nth 0 ColumnRow@))
  98.      (setq MaxRow# (nth 1 ColumnRow@))
  99.    );progn
  100.    (progn
  101.      (setq CurRegion (vlax-get-property (vlax-get-property
  102.        (vlax-get-property *ExcelApp% "ActiveSheet") "Range" "A1") "CurrentRegion")
  103.      );setq
  104.      (setq MaxRow# (vlax-get-property (vlax-get-property CurRegion "Rows") "Count"))
  105.      (setq MaxColumn# (vlax-get-property (vlax-get-property CurRegion "Columns") "Count"))
  106.    );progn
  107. );if
  108. (setq *ExcelData@ nil)
  109. (setq Row# 1)
  110. (repeat MaxRow#
  111.    (setq Data@ nil)
  112.    (setq Column# 1)
  113.    (repeat MaxColumn#
  114.      (setq Range$ (strcat (Number2Alpha Column#)(itoa Row#)))
  115.      (setq ExcelRange^ (vlax-get-property *ExcelApp% "Range" Range$))
  116.      (setq ExcelVariant^ (vlax-get-property ExcelRange^ 'Value))
  117.      (setq ExcelValue (vlax-variant-value ExcelVariant^))
  118.      (setq ExcelValue
  119.        (cond
  120.          ((= (type ExcelValue) 'INT) (itoa ExcelValue))
  121.          ((= (type ExcelValue) 'REAL) (rtosr ExcelValue))
  122.          ((= (type ExcelValue) 'STR) (vl-string-trim " " ExcelValue))
  123.          ((/= (type ExcelValue) 'STR) "")
  124.        );cond
  125.      );setq
  126.      (setq Data@ (append Data@ (list ExcelValue)))
  127.      (setq Column# (1+ Column#))
  128.    );repeat
  129.    (setq *ExcelData@ (append *ExcelData@ (list Data@)))
  130.    (setq Row# (1+ Row#))
  131. );repeat
  132. (vlax-invoke-method (vlax-get-property *ExcelApp% "ActiveWorkbook") 'Close :vlax-False)
  133. (vlax-invoke-method *ExcelApp% 'Quit)
  134. (vlax-release-object *ExcelApp%)(gc)
  135. (setq *ExcelApp% nil)
  136. *ExcelData@
  137. );defun GetExcel
  138. ;-------------------------------------------------------------------------------
  139. ; GetCell - Returns the cell value from the *ExcelData@ list
  140. ; Arguments: 1
  141. ;   Cell$ = Cell ID
  142. ; Syntax example: (GetCell "E19") = value of cell E19
  143. ;-------------------------------------------------------------------------------
  144. (defun GetCell (Cell$ / Column# ColumnRow@ Return Row#)
  145. (setq ColumnRow@ (ColumnRow Cell$))
  146. (setq Column# (1- (nth 0 ColumnRow@)))
  147. (setq Row# (1- (nth 1 ColumnRow@)))
  148. (setq Return "")
  149. (if *ExcelData@
  150.    (if (and (>= (length *ExcelData@) Row#)(>= (length (nth 0 *ExcelData@)) Column#))
  151.      (setq Return (nth Column# (nth Row# *ExcelData@)))
  152.    );if
  153. );if
  154. Return
  155. );defun GetCell
  156. ;-------------------------------------------------------------------------------
  157. ; OpenExcel - Opens an Excel spreadsheet
  158. ; Arguments: 3
  159. ;   ExcelFile$ = Excel filename or nil for new spreadsheet
  160. ;   SheetName$ = Sheet name or nil for not specified
  161. ;   Visible = t for visible or nil for hidden
  162. ; Syntax examples:
  163. ; (OpenExcel "C:\\Temp\\Temp.xls" "Sheet2" t) = Opens C:\Temp\Temp.xls on Sheet2 as visible session
  164. ; (OpenExcel "C:\\Temp\\Temp.xls" nil nil) = Opens C:\Temp\Temp.xls on current sheet as hidden session
  165. ; (OpenExcel nil "Parts List" nil) =  Opens a new spreadsheet and creates a Part List sheet as hidden session
  166. ;-------------------------------------------------------------------------------
  167. (defun OpenExcel (ExcelFile$ SheetName$ Visible / Sheet$ Sheets@ Worksheet)
  168. (if (= (type ExcelFile$) 'STR)
  169.    (if (findfile ExcelFile$)
  170.      (setq *ExcelFile$ ExcelFile$)
  171.      (progn
  172.        (alert (strcat "Excel file " ExcelFile$ " not found."))
  173.        (exit)
  174.      );progn
  175.    );if
  176.    (setq *ExcelFile$ "")
  177. );if
  178. (gc)
  179. (if (setq *ExcelApp% (vlax-get-object "Excel.Application"))
  180.    (progn
  181.      (alert "Close all Excel spreadsheets to continue!")
  182.      (vlax-release-object *ExcelApp%)(gc)
  183.    );progn
  184. );if
  185. (setq *ExcelApp% (vlax-get-or-create-object "Excel.Application"))
  186. (if ExcelFile$
  187.    (if (findfile ExcelFile$)
  188.      (vlax-invoke-method (vlax-get-property *ExcelApp% 'WorkBooks) 'Open ExcelFile$)
  189.      (vlax-invoke-method (vlax-get-property *ExcelApp% 'WorkBooks) 'Add)
  190.    );if
  191.    (vlax-invoke-method (vlax-get-property *ExcelApp% 'WorkBooks) 'Add)
  192. );if
  193. (if Visible
  194.    (vla-put-visible *ExcelApp% :vlax-true)
  195. );if
  196. (if (= (type SheetName$) 'STR)
  197.    (progn
  198.      (vlax-for Sheet$ (vlax-get-property *ExcelApp% "Sheets")
  199.        (setq Sheets@ (append Sheets@ (list (vlax-get-property Sheet$ "Name"))))
  200.      );vlax-for
  201.      (if (member SheetName$ Sheets@)
  202.        (vlax-for Worksheet (vlax-get-property *ExcelApp% "Sheets")
  203.          (if (= (vlax-get-property Worksheet "Name") SheetName$)
  204.            (vlax-invoke-method Worksheet "Activate")
  205.          );if
  206.        );vlax-for
  207.        (vlax-put-property (vlax-invoke-method (vlax-get-property *ExcelApp% "Sheets") "Add") "Name" SheetName$)
  208.      );if
  209.    );progn
  210. );if
  211. (princ)
  212. );defun OpenExcel
  213. ;-------------------------------------------------------------------------------
  214. ; PutCell - Put values into Excel cells
  215. ; Arguments: 2
  216. ;   StartCell$ = Starting Cell ID
  217. ;   Data@ = Value or list of values
  218. ; Syntax examples:
  219. ; (PutCell "A1" "PART NUMBER") = Puts PART NUMBER in cell A1
  220. ; (PutCell "B3" '("Dim" 7.5 "9.75")) = Starting with cell B3 put Dim, 7.5, and 9.75 across
  221. ;-------------------------------------------------------------------------------
  222. (defun PutCell (StartCell$ Data@ / Cell$ Column# ExcelRange Row#)
  223. (if (= (type Data@) 'STR)
  224.    (setq Data@ (list Data@))
  225. )
  226. (setq ExcelRange (vlax-get-property *ExcelApp% "Cells"))
  227. (if (Cell-p StartCell$)
  228.    (setq Column# (car (ColumnRow StartCell$))
  229.          Row# (cadr (ColumnRow StartCell$))
  230.    );setq
  231.    (if (vl-catch-all-error-p
  232.          (setq Cell$ (vl-catch-all-apply 'vlax-get-property
  233.            (list (vlax-get-property *ExcelApp% "ActiveSheet") "Range" StartCell$))
  234.          );setq
  235.        );vl-catch-all-error-p
  236.        (alert (strcat "The cell ID "" StartCell$ "" is invalid."))
  237.        (setq Column# (vlax-get-property Cell$ "Column")
  238.              Row# (vlax-get-property Cell$ "Row")
  239.        );setq
  240.    );if
  241. );if
  242. (if (and Column# Row#)
  243.    (foreach Item Data@
  244.      (vlax-put-property ExcelRange "Item" Row# Column# (vl-princ-to-string Item))
  245.      (setq Column# (1+ Column#))
  246.    );foreach
  247. );if
  248. (princ)
  249. );defun PutCell
  250. ;-------------------------------------------------------------------------------
  251. ; CloseExcel - Closes Excel spreadsheet
  252. ; Arguments: 1
  253. ;   ExcelFile$ = Excel saveas filename or nil to close without saving
  254. ; Syntax examples:
  255. ; (CloseExcel "C:\\Temp\\Temp.xls") = Saveas C:\Temp\Temp.xls and close
  256. ; (CloseExcel nil) = Close without saving
  257. ;-------------------------------------------------------------------------------
  258. (defun CloseExcel (ExcelFile$ / Saveas)
  259. (if ExcelFile$
  260.    (if (= (strcase ExcelFile$) (strcase *ExcelFile$))
  261.      (if (findfile ExcelFile$)
  262.        (vlax-invoke-method (vlax-get-property *ExcelApp% "ActiveWorkbook") "Save")
  263.        (setq Saveas t)
  264.      );if
  265.      (if (findfile ExcelFile$)
  266.        (progn
  267.          (vl-file-delete (findfile ExcelFile$))
  268.          (setq Saveas t)
  269.        );progn
  270.        (setq Saveas t)
  271.      );if
  272.    );if
  273. );if
  274. (if Saveas
  275.    (vlax-invoke-method (vlax-get-property *ExcelApp% "ActiveWorkbook")
  276.      "SaveAs" ExcelFile$ -4143 "" "" :vlax-false :vlax-false nil
  277.    );vlax-invoke-method
  278. );if
  279. (vlax-invoke-method (vlax-get-property *ExcelApp% "ActiveWorkbook") 'Close :vlax-False)
  280. (vlax-invoke-method *ExcelApp% 'Quit)
  281. (vlax-release-object *ExcelApp%)(gc)
  282. (setq *ExcelApp% nil *ExcelFile$ nil)
  283. (princ)
  284. );defun CloseExcel
  285. ;-------------------------------------------------------------------------------
  286. ; ColumnRow - Returns a list of the Column and Row number
  287. ; Function By: Gilles Chanteau from Marseille, France
  288. ; Arguments: 1
  289. ;   Cell$ = Cell ID
  290. ; Syntax example: (ColumnRow "ABC987") = '(731 987)
  291. ;-------------------------------------------------------------------------------
  292. (defun ColumnRow (Cell$ / Column$ Char$ Row#)
  293. (setq Column$ "")
  294. (while (< 64 (ascii (setq Char$ (strcase (substr Cell$ 1 1)))) 91)
  295.    (setq Column$ (strcat Column$ Char$)
  296.          Cell$ (substr Cell$ 2)
  297.    );setq
  298. );while
  299. (if (and (/= Column$ "") (numberp (setq Row# (read Cell$))))
  300.    (list (Alpha2Number Column$) Row#)
  301.    '(1 1);default to "A1" if there's a problem
  302. );if
  303. );defun ColumnRow
  304. ;-------------------------------------------------------------------------------
  305. ; Alpha2Number - Converts Alpha string into Number
  306. ; Function By: Gilles Chanteau from Marseille, France
  307. ; Arguments: 1
  308. ;   Str$ = String to convert
  309. ; Syntax example: (Alpha2Number "ABC") = 731
  310. ;-------------------------------------------------------------------------------
  311. (defun Alpha2Number (Str$ / Num#)
  312. (if (= 0 (setq Num# (strlen Str$)))
  313.    0
  314.    (+ (* (- (ascii (strcase (substr Str$ 1 1))) 64) (expt 26 (1- Num#)))
  315.       (Alpha2Number (substr Str$ 2))
  316.    );+
  317. );if
  318. );defun Alpha2Number
  319. ;-------------------------------------------------------------------------------
  320. ; Number2Alpha - Converts Number into Alpha string
  321. ; Function By: Gilles Chanteau from Marseille, France
  322. ; Arguments: 1
  323. ;   Num# = Number to convert
  324. ; Syntax example: (Number2Alpha 731) = "ABC"
  325. ;-------------------------------------------------------------------------------
  326. (defun Number2Alpha (Num# / Val#)
  327. (if (< Num# 27)
  328.    (chr (+ 64 Num#))
  329.    (if (= 0 (setq Val# (rem Num# 26)))
  330.      (strcat (Number2Alpha (1- (/ Num# 26))) "Z")
  331.      (strcat (Number2Alpha (/ Num# 26)) (chr (+ 64 Val#)))
  332.    );if
  333. );if
  334. );defun Number2Alpha
  335. ;-------------------------------------------------------------------------------
  336. ; Cell-p - Evaluates if the argument Cell$ is a valid cell ID
  337. ; Function By: Gilles Chanteau from Marseille, France
  338. ; Arguments: 1
  339. ;   Cell$ = String of the cell ID to evaluate
  340. ; Syntax examples: (Cell-p "B12") = t, (Cell-p "BT") = nil
  341. ;-------------------------------------------------------------------------------
  342. (defun Cell-p (Cell$)
  343. (and (= (type Cell$) 'STR)
  344.    (or (= (strcase Cell$) "A1")
  345.      (not (equal (ColumnRow Cell$) '(1 1)))
  346.    );or
  347. );and
  348. );defun Cell-p
  349. ;-------------------------------------------------------------------------------
  350. ; Row+n - Returns the cell ID located a number of rows from cell
  351. ; Function By: Gilles Chanteau from Marseille, France
  352. ; Arguments: 2
  353. ;   Cell$ = Starting cell ID
  354. ;   Num# = Number of rows from cell
  355. ; Syntax examples: (Row+n "B12" 3) = "B15", (Row+n "B12" -3) = "B9"
  356. ;-------------------------------------------------------------------------------
  357. (defun Row+n (Cell$ Num#)
  358. (setq Cell$ (ColumnRow Cell$))
  359. (strcat (Number2Alpha (car Cell$)) (itoa (max 1 (+ (cadr Cell$) Num#))))
  360. );defun Row+n
  361. ;-------------------------------------------------------------------------------
  362. ; Column+n - Returns the cell ID located a number of columns from cell
  363. ; Function By: Gilles Chanteau from Marseille, France
  364. ; Arguments: 2
  365. ;   Cell$ = Starting cell ID
  366. ;   Num# = Number of columns from cell
  367. ; Syntax examples: (Column+n "B12" 3) = "E12", (Column+n "B12" -1) = "A12"
  368. ;-------------------------------------------------------------------------------
  369. (defun Column+n (Cell$ Num#)
  370. (setq Cell$ (ColumnRow Cell$))
  371. (strcat (Number2Alpha (max 1 (+ (car Cell$) Num#))) (itoa (cadr Cell$)))
  372. );defun Column+n
  373. ;-------------------------------------------------------------------------------
  374. ; rtosr - Used to change a real number into a short real number string
  375. ; stripping off all trailing 0's.
  376. ; Arguments: 1
  377. ;   RealNum~ = Real number to convert to a short string real number
  378. ; Returns: ShortReal$ the short string real number value of the real number.
  379. ;-------------------------------------------------------------------------------
  380. (defun rtosr (RealNum~ / DimZin# ShortReal$)
  381. (setq DimZin# (getvar "DIMZIN"))
  382. (setvar "DIMZIN"
  383. (setq ShortReal$ (rtos RealNum~ 2 )
  384. (setvar "DIMZIN" DimZin#)
  385. ShortReal$
  386. );defun rtosr
  387. ;-------------------------------------------------------------------------------
  388. (princ);End of GetExcel.lsp
  389. ;;;THIS IS THE ORIGINAL CODE PULLED FROM [url]http://www.cadtutor.net/forum/archive/index.php/t-89036.html?[/url]
  390. ;;;top half not used....just the setdynpropvalue
  391. (defun c:test ( / blk )
  392. (if (and (setq blk (car (entsel "\nSelect dynamic block: ")))
  393. (setq blk (vlax-ename->vla-object blk))
  394. (= "AcDbBlockReference" (vla-get-objectname blk))
  395. (= :vlax-true (vla-get-isdynamicblock blk))
  396. )
  397. (LM:setdynpropvalue blk "distance1" 1.0)
  398. )
  399. (princ)
  400. )
  401. ;; Set Dynamic Block Property Value - Lee Mac
  402. ;; Modifies the value of a Dynamic Block property (if present)
  403. ;; blk - [vla] VLA Dynamic Block Reference object
  404. ;; prp - [str] Dynamic Block property name (case-insensitive)
  405. ;; val - [any] New value for property
  406. ;; Returns: [any] New value if successful, else nil
  407. (defun LM:setdynpropvalue ( blk prp val )
  408. (setq prp (strcase prp))
  409. (vl-some
  410. '(lambda ( x )
  411. (if (= prp (strcase (vla-get-propertyname x)))
  412. (progn
  413. (vla-put-value x (vlax-make-variant val (vlax-variant-type (vla-get-value x))))
  414. (cond (val) (t))
  415. )
  416. )
  417. )
  418. (vlax-invoke blk 'getdynamicblockproperties)
  419. )
  420. )
  421. (vl-load-com) (princ)
  422. ;;;;;;;;;;;;
  423. ;;;Test for plugging excel numbers into dynamic blocks
  424. (defun c:dynant ()
  425. (GetExcel "C:\\Users\\eli.garcia\\Desktop\\getexceltest.xls" "Sheet1" "B5");<-- Edit Filename.xls
  426. (setq DA (GetCell "B2"));Or you can just use the global *ExcelData@ list
  427. ( / blk )
  428. (if (and (setq blk (car (entsel "\nSelect dynamic block: ")))
  429. (setq blk (vlax-ename->vla-object blk))
  430. (= "AcDbBlockReference" (vla-get-objectname blk))
  431. (= :vlax-true (vla-get-isdynamicblock blk))
  432. )
  433. ((LM:setdynpropvalue blk "depth" DA)
  434. (LM:setdynpropvalue blk "half-width" DA))
  435. )
  436. (princ)
  437. )
  438. )

 
我试图附上一个所有这些的文本文件,但很明显,这个工具现在坏了,因此这个巨大的帖子。
 
在这方面我很接近于新手,但我在工作允许的时间内学习。我的想法是,我使用SETQ的方式是错误的,或者SETQ不能像这样与Excel一起工作。
 
请帮忙。
回复

使用道具 举报

发表回复

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

本版积分规则

  • 微信公众平台

  • 扫描访问手机版

  • 点击图片下载手机App

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

GMT+8, 2025-3-12 13:30 , Processed in 0.618062 second(s), 54 queries .

© 2020-2025 乐筑天下

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