明经CAD社区

 找回密码
 注册

QQ登录

只需一步,快速开始

搜索
12
返回列表 发新帖
楼主: qwerasdf123456

[源码] 批量重命名块,防止块被冲

[复制链接]
发表于 2018-8-22 18:17 | 显示全部楼层
了解! 谢谢分享
发表于 2018-8-24 09:30 | 显示全部楼层
从基于 AutoCAD 2017 的产品开始,CDATE 和 DATE 系统变量返回的时间不再包括毫秒。如果需要计算小于一秒的时间差,将需要使用 MILLISECS。
  1. ; Returns a CDATE value that includes milliseconds based on release
  2. ; Usage: (CDate)
  3. ; Replaces (rtos (getvar "CDATE") 2 8)
  4. (defun CDate ( / ms)
  5.   ; Check to see which AutoCAD release is being used
  6.   (if (<= (atof (getvar "ACADVER")) 22.0)
  7.     (rtos (getvar "CDATE") 2 8)
  8.     (progn
  9.       ; Get the current milliseconds and append it to the CDATE value
  10.       (setq ms (itoa (getvar "MILLISECS")))
  11.       (strcat (rtos (getvar "CDATE") 2 6)(substr ms (- (strlen ms) 2)))
  12.     )
  13.   )
  14. )

AutoCAD 2019 帮助  关于 AutoLISP 兼容性
发表于 2018-8-24 12:11 | 显示全部楼层
CAD2006测试没有反应,楼主应该测试下告知大家
发表于 2018-8-28 11:42 | 显示全部楼层
感谢分享程序!!!!
发表于 2018-12-10 16:04 | 显示全部楼层
其实可以不用外挂的,用cad自带的外部参照不是更好吗?
发表于 2019-5-29 08:27 | 显示全部楼层
能够批量修改已经存在的同名块为不同的块名吗?
发表于 2019-6-17 19:28 | 显示全部楼层
cad2008用不了
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2024-3-29 23:58 , Processed in 0.157633 second(s), 19 queries , Gzip On.

Powered by Discuz! X3.4

Copyright © 2001-2021, Tencent Cloud.

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