Jump to content

Recommended Posts

Posted

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

Posted

Can you post a sketch with what you are looking for?

Posted

Here is the scetch

upright txt.jpg

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

Posted (edited)

I think that is enough to redraw those lines in other opposite sense; or to rotate them 180degrees around their middle.

Edited by MSasu
Adjusted words
Posted

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

Posted

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)
)

Posted

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?

Posted

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.

Posted

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

Posted
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)...

Posted

And so there is. I should wear my glasses more often! My apologies MSasu.

Posted

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.

Posted

That certainly would make the task a bit more complicated.

Posted

@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!

Posted

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".

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...