wimal Posted February 22, 2015 Share Posted February 22, 2015 Can we set the height of current text style to zero by lisp. Quote Link to comment Share on other sites More sharing options...
Lee Mac Posted February 22, 2015 Share Posted February 22, 2015 Try the following: (defun c:ts2zero nil (vla-put-height (vla-get-activetextstyle (vla-get-activedocument (vlax-get-acad-object))) 0.0) (princ) ) (vl-load-com) (princ) Quote Link to comment Share on other sites More sharing options...
wimal Posted February 22, 2015 Author Share Posted February 22, 2015 Thanks a lot. It was a big problem to my programs .I need another help. Can we reset it to previous value. Quote Link to comment Share on other sites More sharing options...
Lee Mac Posted February 22, 2015 Share Posted February 22, 2015 Assign the original value to a local variable before setting it to zero, and then restore the value using the local variable. Quote Link to comment Share on other sites More sharing options...
BIGAL Posted February 23, 2015 Share Posted February 23, 2015 It would be much safer to create a new text style where it is zero, for this reason we use Standard and have others that are customized and annottative. ISO25 ISO5 etc If your lisp crashes for any reason or user aborts it will not reset. (if (= "Standard" (getvar "textstyle")) (setq oldtstyle (getvar "textstyle")) (setvar "textstyle" "standard") ) Quote Link to comment Share on other sites More sharing options...
nod684 Posted February 23, 2015 Share Posted February 23, 2015 you can also try this one from Jimmy Bergmark http://www.jtbworld.com/lisp/tsh0.htm Quote Link to comment Share on other sites More sharing options...
wimal Posted February 23, 2015 Author Share Posted February 23, 2015 Thanks a lot dear all Quote Link to comment Share on other sites More sharing options...
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.