明经CAD社区

 找回密码
 注册

QQ登录

只需一步,快速开始

搜索
楼主: guosheyang

[经验] 加载几何计算器并计算表达式的值

  [复制链接]
发表于 2023-3-29 10:52 | 显示全部楼层
感谢楼主分享,看看学习
发表于 2023-3-29 11:11 | 显示全部楼层
早就在用了
  1. (defun C:++( / ss i txt txt1)
  2.   (setvar "cmdecho" 0)
  3. (setq ss (ssget '((0 . "text"))))
  4. (setq i (sslength ss))
  5. (setq txt "0")
  6. (if (> i 0)
  7.   (progn
  8.   (while (> i 0)
  9.      (setq i (- i 1))
  10.      (setq txt1 (cdr (assoc 1 (entget (ssname ss i)))))
  11.       (setq txt (strcat txt1 "+" txt))
  12.     ))
  13.   )
  14. (prin1 txt)
  15. (arxload "geomcal")
  16. (setq txt1 (getpoint""))
  17. (entmake
  18.     (list '(0 . "TEXT")
  19.    (cons 1 (rtos (cal txt) 2 2))
  20.    (cons 10 txt1)
  21.    (cons 40 0.8)
  22.    (cons 11 txt1)
  23.    (cons 72 1)
  24.    (cons 73 2)
  25.    (cons 7 "宋体")
  26.    (cons 62 1)          
  27.     ))
  28. (princ)  
  29. )
发表于 2023-3-29 11:29 | 显示全部楼层
支持一下楼主
发表于 2023-3-29 11:52 | 显示全部楼层
谢谢分享      
发表于 2023-3-29 12:42 | 显示全部楼层
66666666666666
发表于 2023-3-29 14:15 | 显示全部楼层
是的  我这也才知道的
发表于 2023-3-29 16:15 | 显示全部楼层
打开看看     
 楼主| 发表于 2023-3-29 17:29 | 显示全部楼层

与这个不是一回事儿哦
发表于 2023-3-29 20:29 | 显示全部楼层
学习 谢谢分享!
您需要登录后才可以回帖 登录 | 注册

本版积分规则

小黑屋|手机版|CAD论坛|CAD教程|CAD下载|联系我们|关于明经|明经通道 ( 粤ICP备05003914号 )  
©2000-2023 明经通道 版权所有 本站代码,在未取得本站及作者授权的情况下,不得用于商业用途

GMT+8, 2024-5-8 20:26 , Processed in 0.261957 second(s), 18 queries , Gzip On.

Powered by Discuz! X3.4

Copyright © 2001-2021, Tencent Cloud.

快速回复 返回顶部 返回列表