Phaedron Posted May 10, 2012 Posted May 10, 2012 I am having an issue with the "upright" script in my ltype descriptions. Apparently it works the way it is supposed to and not the way I want it to. The upright is set to 0 which orients the text in linetypes to be shown as "upright" to the model space. In most design cases; not an issue, but I am designing construction plans along a roadway and as such, north is not always "upright" to my viewport. Is there a script (ie ...,u=v],... or ...,u=vp],...) that will orient my text based on the line displayed in the viewport? Thanks Quote
MSasu Posted May 10, 2012 Posted May 10, 2012 Can you post a sketch with what you are looking for? Quote
Phaedron Posted May 10, 2012 Author Posted May 10, 2012 Here is the scetch This text is aligned upright or u=0 in the ltype description. Is there a way to get it to realign based on its orientation in the viewport? Thanks Quote
MSasu Posted May 10, 2012 Posted May 10, 2012 (edited) I think that is enough to redraw those lines in other opposite sense; or to rotate them 180degrees around their middle. Edited May 11, 2012 by MSasu Adjusted words Quote
Phaedron Posted May 10, 2012 Author Posted May 10, 2012 The problem is, this is just a smal segment. We do construction drawings for miles in a single project. Often times, we turn city blocks and must orient the drawings where the matchlines align to read from left to right across the page. This means that 50 percent of the time (if not more it seems) the situation of North pointing down or to the right is how we have to show the drawing. My question is: Is there a way to get text in a line to orient correctly through the viewport in Paperspace just as it does in Modelspace. If they can do it with annotation, why not orientation. Thanks Quote
MSasu Posted May 10, 2012 Posted May 10, 2012 The best automation I can think on is an AutoLISP routine: ; Reverse Line Sense (10-V-2012) (defun c:RLS( / itemSet assocItem ) (while (setq itemSet (ssget "_:S:E" '((0 . "LINE")))) (setq assocItem (entget (ssname itemSet 0))) (entmod (subst (cons 11 (cdr (assoc 10 assocItem))) (assoc 10 assocItem) (subst (cons 10 (cdr (assoc 11 assocItem))) (assoc 11 assocItem) assocItem))) ) (princ) ) Quote
RobDraw Posted May 10, 2012 Posted May 10, 2012 How does the linetype determine the orientation of the text? If it's the UCS, does orienting your UCS within the viewport to align with the viewport do the trick? If not, can you post the linetype for us to play with? Quote
MSasu Posted May 11, 2012 Posted May 11, 2012 The string part of linetypes is aligned with OCS (Object's Coordinates System) - for lines axis X means that origin is first vertex, while the second one establish the positive direction. So, the same line will bear normal text when drawn from left to right, and upward when drawn inverse. Quote
ReMark Posted May 11, 2012 Posted May 11, 2012 Isn't there a lisp routine (reverse line direction) that will fix this problem for people running older releases of AutoCAD and AutoCAD vertical products? Why yes there is. It is called SWAPLINE.LSP and it is available FREE as a download from DotSoft. http://www.dotsoft.com/freestuff.htm Quote
MSasu Posted May 11, 2012 Posted May 11, 2012 Isn't there a lisp routine (reverse line direction) that will fix this problem for people running older releases of AutoCAD and AutoCAD vertical products? Yes, there is one right in this thread (#6)... Quote
ReMark Posted May 11, 2012 Posted May 11, 2012 And so there is. I should wear my glasses more often! My apologies MSasu. Quote
RobDraw Posted May 11, 2012 Posted May 11, 2012 That was my first thought to swap the start and endpoints of the lines but the OP wants to be able to do it per viewports. What he posted was a small part of miles of roads. It sounds like the text is oriented correctly in model space and needs to be changed per the viewports orientation. So I thought maybe if he changes the UCS in the viewport, that could affect the orientation of the text if the OCS responds to changes in the UCS. Quote
ReMark Posted May 11, 2012 Posted May 11, 2012 That certainly would make the task a bit more complicated. Quote
MSasu Posted May 11, 2012 Posted May 11, 2012 @ReMark: Please, there is really no need to apologise for this! But what makes a machine with glasses?!? Adjust the sensors, maybe… Have a great day! Quote
Blackfish Posted May 12, 2012 Posted May 12, 2012 Just to remind you that in AutoCAD 2011 or newer text in linetypes is readable regardless of the line’s orientation... *GAS_LINE,Gas line ----GAS----GAS----GAS---- A,.5,-.2,["GAS",STANDARD,S=.1,[b]R=0.0[/b],X=-0.1,Y=-.05],-.25 *GAS_LINE,Gas line ----GAS----GAS----GAS---- A,.5,-.2,["GAS",STANDARD,S=.1,[b]U=0.0[/b],X=-0.1,Y=-.05],-.25 ... where "R" for "relative" is replaced with "U" for "upright". 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.