Jump to content

Recommended Posts

Posted

Hi,

 

I have recently been mirroring and rotating parts of drawings with lots of leaders on them. Using MIRRTEXT=0 I have managed to get around re-leadering everything when mirroring. However, I cannot find a similar variable for rotations, ie. A way to keep text the horizontal when rotating by 90, 180 etc.

 

Ta

Posted

How about a custom rotate :twisted:

 

(defun c:r2 ( / *error* p a undo doc ss v )
 ;; © Lee Mac 2010
 (vl-load-com)

 (defun *error* ( msg )
   (and undo (vla-EndUndoMark doc))
   (or (wcmatch (strcase msg) "*BREAK,*CANCEL*,*EXIT*")
       (princ (strcat "\n** Error: " msg " **")))
   (princ)
 )

 (if (and (ssget "_:L")
          (setq p (getpoint "\nSpecify Base Point: "))
          (setq a (getangle p "\nSpecify Rotation Angle: ")))
   (progn
     (setq undo
       (not
         (vla-StartUndoMark
           (setq doc
             (vla-get-ActiveDocument
               (vlax-get-acad-object)
             )
           )
         )
       )
     )
     (setq v (vlax-3D-point p))
     (vlax-for obj (setq ss (vla-get-ActiveSelectionSet doc))
       (vla-rotate obj v a)

       (if (wcmatch (vla-get-ObjectName obj) "AcDb*Text")
         (vla-put-rotation obj 0.)
       )
     )
     (vla-delete ss)
     (setq undo (vla-EndundoMark doc))
   )
 )
 (princ)
)    

 

Doesn't have the fancy preview that the inbuilt rotate command has, but should do the job :)

 

Lee

Posted

hmm, unless i'm doing something wrong using your lisp doesn't change things much. My text is still skewed and I have to re-draw the leaders after rotating. I'm sure there's some way to keep text horizontal, but I just can't remember what it is.

here's a pictorial representation of my issues:

AUTOCAD ISSUES.jpg

  • 3 months later...
Posted

Hi - Sorry I cant answer your query, but I have the same problem and have come here looking for answers if anyone can help? Thanks :)

Posted

Hi isnt´t working with annotative textstyles a solution?

Posted

thanks for your reply Rob

 

The drawings have come in to us already created, not with annotative text

 

we are having to add to them and reproduce what has been done at a different angle and mirrored, we have the mirrtext option set at 0 but the angle of the text is incorrect

 

hope this makes sense

Posted

Hi Barney,

 

I never had that problem. But have you tried changed the texts in an annotiative text style? It might be less work than editing all the texts.

Posted

thanks again for your reply Rob, in older versions of Autocad there was definitely a command for rotating objects and the text would move with the object, but stay the same way up and we just cant find it in 2010

 

no worries, we have had to just move it all individually :roll:

 

i do appreciate the time you have taken to reply

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