我需要更多的时间进行微调,但这是可行的。它只是对单元格A1和B1的测试。它显示的是方法而不是代码。
- ;using excel to update rectang dynamic block.
- ; By Alan H May 2018
- ; simple rectang with default variables d1 & d2
- (if (not GETEXCEL)(Load "getexcel"))
- (if (not LM:getdynpropvalue)(load "Dynamic block get-put.lsp"))
- (OPENEXCEL "C:\\alan\\Alan.XLSX" "SHEET1" NIL)
- (setq blk (vlax-ename->vla-object (car (entsel "Pick block"))))
- (setq len (getcell "a1"))
- (LM:setdynpropvalue blk "d1" len)
- (setq Ht (getcell "b1"))
- (LM:setdynpropvalue blk "d2" Ht)
|