ODEY Posted May 10, 2010 Share Posted May 10, 2010 hi, i'm new here and find this site very helpful. can somebody help me find a solution or does anybody has a lisp program that assign the text/mtext of a mleader/qleader with a give rotation angle, say 90 degrees. it's always give a 0 rotation or horizantal text orientation And it's very procedural changing text rotation orientation on properties and or use matchprop. thanks in advance. more power for this site. Quote Link to comment Share on other sites More sharing options...
alanjt Posted May 10, 2010 Share Posted May 10, 2010 ZeroRotation.lsp Set rotation of objects to zero (based on current UCS) RotateObjects.LSP Quote Link to comment Share on other sites More sharing options...
ODEY Posted May 11, 2010 Author Share Posted May 11, 2010 Hi, can you help me w/ this. i thought i can just adapt part of it in the routine you gave me, but that was really a complex program. auto lisp is new to me & there's a lot of language used there wlc i'm not familiar of. this is what i really want my routine to be. anybody else can help me? (defun c:bm() (setq strqty (getstring "\nEnter Number of Bars : ")) (setq strdia (getstring "\nEnter Diameter of Bars : ")) (setq strbm (getstring "\nEnter Bar Mark : ")) (setq strspc (getstring "\nEnter Spacing : ")) (setq strlayer (strcase (getstring "\nEnter Label/Layer: "))) (setq strbmk (strcat strqty " " "T" strdia "-" strbm "-" strspc " " strlayer )) (command ".leader" pause pause "" strbmk "") ;;;then this has to follow.....Rotate BM 1=90°, 2=180°, 3=270° [1/2/3] <No>: ; w/ the last object as selected. );end of defun Quote Link to comment Share on other sites More sharing options...
alanjt Posted May 11, 2010 Share Posted May 11, 2010 Post an example drawing of the finished product and we'll proceed from there. Quote Link to comment Share on other sites More sharing options...
ODEY Posted May 11, 2010 Author Share Posted May 11, 2010 here is the actual application drawing. thanks! Quote Link to comment Share on other sites More sharing options...
alanjt Posted May 11, 2010 Share Posted May 11, 2010 A DWG would have been nice. So, are you wanting to text/leader perpendicular to a selected line? Quote Link to comment Share on other sites More sharing options...
ODEY Posted May 12, 2010 Author Share Posted May 12, 2010 exactly! text/leader command gives you text horizontally, always. i hope it's possible. Quote Link to comment Share on other sites More sharing options...
alanjt Posted May 12, 2010 Share Posted May 12, 2010 exactly! text/leader command gives you text horizontally, always.i hope it's possible. The text marked in the image is not 'horizontal'. If that's all you want, just set your UCS. Quote Link to comment Share on other sites More sharing options...
ODEY Posted May 12, 2010 Author Share Posted May 12, 2010 i see, my message is a bit confusing. what i mean is, the regular way of using the command leader w/ text would always give you a horizontal text. & in order to make it rotated vertically is by changing the text rotation in properties and matchprop it w/ the rest, it's how i do it (the marked ones). if possible, as soon as it gives the text, it'll prompt to ask the text rotation. most likely, it has to be perpendicular. or maybe your right changing UCS orientation will work, is it like interchanging x-axis & y-axis before the leader command and return it back before the routine end? i know it's possible but how would i do that? Quote Link to comment Share on other sites More sharing options...
ODEY Posted May 12, 2010 Author Share Posted May 12, 2010 it's ok, i know how. thank you very much. Quote Link to comment Share on other sites More sharing options...
alanjt Posted May 12, 2010 Share Posted May 12, 2010 Glad you figured it out. However, you should post your findings; might help someone else down the line. Quote Link to comment Share on other sites More sharing options...
ODEY Posted May 13, 2010 Author Share Posted May 13, 2010 actually, i'm a little hesitant to post it here, cause u know this going to be my first ever routine that i develop and i don't think it something worth sharing. well, anyway here it is & criticism is welcome for a novice like me. (defun C:BMSET () (setq intbm (getint "\nEnter Last Bar mark: " )) );end of defun ;may 13, 2010 and ;This routine is used to mark-up Rebar Steel in BS Standard. ;It is set to current dimension style ;by:ODEY - may 13, 2010 ;rev.0 (defun c:bm(/ strqty strdia strbm strtyp strspc strlayer strbmk strbmrt) (setq strqty (getstring "\nEnter Number of Bars : ")) (setq strdia (getstring "\nEnter Diameter of Bars : "));bar size (setq strbm (getstring "\nEnter Bar Mark or <Auto Numbering>: ")); set "bmset" first (setq intbm (+ 1 intbm));global (if (= strbm "")(setq strbrmk (itoa intbm))(setq strbrmk strbm)) (setq strtyp (strcase(getstring "\nEnter Steel Type/grade <T> : "))); (if (= strtyp "")(setq strgrd "T")(setq strgrd strtyp)) (setq strspc (getstring "\nEnter Spacing of Bars <none>: "));option if spacing is req'd (setq strlayer (strcase (getstring "\nEnter Label/Layer: ")));position of rebar (if (= strspc "")(setq strbmk (strcat strqty strgrd strdia "-" strbrmk " " strlayer ));mark-up w/ no spacing req'd (setq strbmk (strcat strqty strgrd strdia "-" strbrmk "-" strspc " " strlayer )));mark-up w/ spacing req'd (setq strbmrt (getstring "\nRotate Bar Mark [Yes or <No>] :"));option to rotate the bm (if(= strbmrt "")(setq intbmrt 0)(setq intbmrt 90)) (command ".ucs" "z" intbmrt ) (prompt "/n Pick the Bar") ;(command ".clayer" "STR-barmark");option-create Layer for Bar mark first (command ".leader" pause pause "" "" "" strbmk "") (command ".ucs" "" "") );end of defun Quote Link to comment Share on other sites More sharing options...
harrison-matt Posted May 13, 2010 Share Posted May 13, 2010 How about ending the program with (princ) to finish clean. (i.e. removes the 'nil' at the end) 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.