Tharwat Posted January 18, 2014 Posted January 18, 2014 Whatever the result,all want to thank you! I will try. Okay , Try it and let me know . Quote
lucas3 Posted January 18, 2014 Author Posted January 18, 2014 Okay , Try it and let me know . I just tried,The lack of sub-style, in post#1 ,Step 2.3 and 2.4 Quote
lucas3 Posted January 18, 2014 Author Posted January 18, 2014 What is the need of that overrides ? Thank you ,Tharwat ,Maybe you are right! If need overrides , how to do?Difficult? Quote
Tharwat Posted January 18, 2014 Posted January 18, 2014 I don't know how to make that overrides with lisp although I think it is a matter of error or irregular process that may take a place in any drawing with any dimension style. Quote
lucas3 Posted January 18, 2014 Author Posted January 18, 2014 (edited) I don't know how to make that overrides with lisp although I think it is a matter of error or irregular process that may take a place in any drawing with any dimension style. (defun mksubdimsty (name mod lst / dims nname) (setq dims (vla-get-dimstyles (vla-get-activedocument (vlax-get-acad-object)) ) ) (if (and (tblsearch "dimstyle" name) (setq nname (strcat name mod)) (not (tblsearch "dimstyle" nname)) ) (progn (vla-put-activedimstyle (vla-get-activedocument (vlax-get-acad-object)) (vla-item dims name) ) (vl-cmdf ".dimstyle" "s" nname) (if lst (progn (mapcar '(lambda (x) (apply 'setvar x)) lst) (vl-cmdf ".dimstyle" "s" nname "y") ) ) ) ) (princ) ) (mksubdimsty "custom" "$3" '(("DIMTOH" 1) ("DIMTIH" 0)) ) This function? Edited January 19, 2014 by lucas3 Quote
lucas3 Posted January 18, 2014 Author Posted January 18, 2014 (edited) (vl-load-com) (defun mksubdimsty (name mod lst / dims nname) (setq dims (vla-get-dimstyles (vla-get-activedocument (vlax-get-acad-object)) ) ) (if (and (tblsearch "dimstyle" name) (setq nname (strcat name mod)) (not (tblsearch "dimstyle" nname)) ) (progn (vla-put-activedimstyle (vla-get-activedocument (vlax-get-acad-object)) (vla-item dims name) ) (vl-cmdf ".dimstyle" "s" nname) (if lst (progn (mapcar '(lambda (x) (apply 'setvar x)) lst) (vl-cmdf ".dimstyle" "s" nname "y") ) ) ) ) (princ) ) (defun Text+Dim nil ;; Tharwat 17. Jan. 2014 ;; (if (not (tblsearch "STYLE" "ggg")) (entmakex '((0 . "STYLE") (100 . "AcDbSymbolTableRecord") (100 . "AcDbTextStyleTableRecord") (2 . "ggg") (40 . 0.) (41 . 1.) (42 . 1.0) (50 . 0.) (70 . 0) (71 . 0) (3 . "gdt.shx") (4 . "gbcbig.shx") ) ) ) ;; ;; (if (and (not (tblsearch "DIMSTYLE" "custom")) (tblsearch "STYLE" "ggg") ) (entmakex (list '(0 . "DIMSTYLE") '(100 . "AcDbSymbolTableRecord") '(100 . "AcDbDimStyleTableRecord") '(2 . "custom") '(70 . 0) '(41 . 2.5) '(42 . 2.0) '(43 . 7.0) '(44 . 2.25) '(73 . 0) '(77 . 1) '(78 . '(140 . 2.5) '(141 . 2.5) '(171 . 3) '(172 . 1) '(271 . 2) '(272 . 2) '(274 . 3) '(278 . 44) '(283 . 0) '(284 . (cons 340 (tblobjname "STYLE" "ggg")) ) ) ) (mksubdimsty "custom" "$3" '(("DIMTOH" 1) ("DIMTIH" 0)) ) (princ) ) Edited January 19, 2014 by lucas3 Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.