Jump to content

help! mleader/qleader's text or mtext rotation.


ODEY

Recommended Posts

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.

Link to comment
Share on other sites

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

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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?

Link to comment
Share on other sites

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

Link to comment
Share on other sites

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.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...