- (vl-load-com)
- (setq ty (car (entsel)))
- (setq ent (entget ty))
- (setq blk_name (cdr (assoc 2 ent)))
- (setq pt1 (cdr (assoc 10 ent)))
- (setq bili (cdr (assoc 41 ent)))
- (vlax-for item (vlax-invoke-method (vla-get-Blocks (vla-get-ActiveDocument (vlax-get-acad-object))) 'Item blk_name)
- (if (and
- (= (vla-get-ObjectName item) "AcDbBlockReference")
- (= (vla-get-EffectiveName item) "SJY_标题栏")
- )
- (progn
- (setq pt2 (cdr (assoc 10 (entget (vlax-vla-object->ename item)))))
- (setq pt3 (mapcar '+ pt1 (mapcar '* pt2 (list bili bili 0))))
- (entmake (list '(0 . "CIRCLE")'(100 . "AcDbEntity")'(100 . "AcDbCircle")(cons 62 1)(cons 10 pt3)(cons 40 (* bili 3))))
- )
- )
- )
|