本帖最后由 zlg258369 于 2013-6-27 23:04 编辑
- (defun c:gf ()
- (if (= (setq tst (tblobjname "style" "多重引线")) nil)
- (progn
- (setq obj (vla-add (vla-get-TextStyles (vla-get-ActiveDocument (vlax-get-acad-object))) "多重引线"))
- (vla-put-width obj 0.75)
- (vla-setFont obj "宋体" :vlax-false :vlax-false 1 0)
- (setq tst (tblobjname "style" "多重引线"))
- )
- )
- (setq DICEN (namedobjdict))
- (setq str (entget dicen))
- (setq str1 (member '(3 . "ACAD_MLEADERSTYLE") str))
- (setq str1 (entget (cdar (cdr str1))))
- (setq str2 (member '(3 . "Standard") str1))
- (setq ty (cdr (cadr str2)))
- (setq datalist
- (append
- (list '(0 . "MLEADERSTYLE") '(100 . "AcDbMLeaderStyle") '(3 . "多重引线") (cons 342 tst))
- '((179 . 2)
- (170 . 2)
- (171 . 1)
- (172 . 0)
- (90 . 3) ;最大引线点数
- (40 . 0.7854);第一段角度
- (41 . 1.5708);第二段角度
- (173 . 1)
- (290 . 1)
- (42 . 2.0)
- (291 . 0)
- (43 . 2.0)
- ;(3 . "多重引线")
- ;(341 . "")
- (44 . 1.8);箭头大小
- ;;; (300 . "sargtaery")
- ;;;;(342 . <图元名: 7ffff643910>)
- (174 . 1)
- (178 . 1)
- (175 . 1)
- (176 . 0)
- (93 . -1023410174);字体颜色
- (45 . 2.7);字高
- (292 . 0)
- (297 . 0)
- (46 . 5.0)
- (47 . 1.0)
- (49 . 1.0)
- (140 . 1.0)
- (293 . 1)
- (141 . 0.0)
- (294 . 1)
- (177 . 0)
- (142 . 1.0)
- (295 . 0)
- (296 . 0)
- (143 . 0.15);打断大小
- (271 . 0)
- (272 . 9)
- (273 . 9)
- )
- )
- )
- (setq xname (entmakex datalist))
- (setq dictionary
- (list '(0 . "DICTIONARY")
- '(100 . "AcDbDictionary")
- '(3 . "Standard")
- (cons 350 ty)
- '(3 . "22222")
- (cons 350 xname)
- )
- )
- (setq xname (entmakex dictionary))
- (dictremove DICEN "ACAD_MLEADERSTYLE")
- (dictadd (namedobjdict) "ACAD_MLEADERSTYLE" xname)
- )
|