本帖最后由 wosiguwozai0830 于 2022-6-30 09:18 编辑
实测很好用,个人感觉加图后的重新生成图纸有点慢,改了下- ;|(vla-regen (vla-get-ActiveDocument (vlax-get-acad-object))
- ;acAllViewports
- ) |;
- (setq tktyss(ssget "x" (list (cons 0 "INSERT")(cons 2 (cl:blkname-ssname block)))))
- (foreach x (sstolistf tktyss)(entupd x))
- (setq tktyss nil)
- (defun sstolistf(ss) ;这个函数来源于本论坛
- (vl-remove-if 'listp (mapcar 'cadr (ssnamex ss)))
- )
- (defun cl:blkname-ssname(ssname1 )
- (vla-get-EffectiveName(vlax-ename->vla-object ssname1))
- )
|