Jump to content

Rotating a View Port to a Line


MillerMG

Recommended Posts

I have a drawing with a parcel. I want one of the lines to be straight across with no angle. On the older version of cadd I was able to align a view port to a line. Is there a way to do this with Civil 3D 2015? If so, how would I go about do this? Or does anyone know of a trick they use to achieve this? Any and all reply's is greatly appreciated! Thanks!

 

Miller

Link to comment
Share on other sites

I actually just found a way about 5 minutes ago. Its in express tools called align space. It works great. You put a line in paper space how you want the viewport to be aligned (Horizontal in my case) you then select the model space line to use and then the paper space line to align it to. It just changes the viewport scale. Just change it to the scale you want but the viewport will be rotated the way you want it.

Link to comment
Share on other sites

Like Nestly if you go down the UCS OB path you can have as many view directions as you like and work in both the layout and modelspace just use UCS Save name & UCS Restore name, we do this all the time for long roads.

Link to comment
Share on other sites

The only issue with changing USC, is that you're no longer in WCS... Something most verticals do not always play nicely with.

 

I used to use UCS method discussed here, until I learned the [DVIEW] 'twist' route. :thumbsup:

 

Cheers

Link to comment
Share on other sites

I have a drawing with a parcel. I want one of the lines to be straight across with no angle. On the older version of cadd I was able to align a view port to a line. Is there a way to do this with Civil 3D 2015? If so, how would I go about do this? Or does anyone know of a trick they use to achieve this? Any and all reply's is greatly appreciated! Thanks!

 

Miller

 

You can rotate the viewport itself using the usual Reference option during the rotate command.

Link to comment
Share on other sites

If you dont do PLAN the you can go UCS W but your layout will remain orientated to a different angle, but will be in World one way around 3rd party problems ?

 

Correct; I used to orientate my Viewports about our roadway alignments using PLAN Command, etc., and then UCS _W (world), which allowed me to Copy/Paste by basepoint without having to account for first copying at same 'view' (if that makes sense). That, and the orientation being one angle, and when WCS, the crosshairs are at WCS angle which was annoying aesthetically.

 

 

 

Can you use DVIEW > TWist to align the objects orthogonally by picking, or must you determine the rotation as a separate operation beforehand?

 

I simply specify two points, first left, then right, generally about a 'line' that I'm intending to orient my view about (if that makes sense?).

 

Now, a drawing's complexity plays a significant factor in how long it actually takes to 'twist' and 'untwist' a given view (particularly for Civil 3D; never thought to port this to .NET API before, hrmmm? :geek: ), but all in all, this works very well for my needs:

 

(vl-load-com)
;;;--------------------------------------------------------------------;
;;; Twist dview function:
(defun c:TW () (c:TWIST))
(defun c:TWIST (/ *error* cmdecho osmode pt1 pt2 acDoc ang)
 (prompt "\rTWIST")

 (defun *error* (msg)
   (and cmdecho (setvar 'cmdecho cmdecho))
   (and osmode (setvar 'osmode osmode))
   (if acDoc
     (vla-endundomark acDoc)
   )
   (cond ((not msg))                                                   ; Normal exit
         ((member msg '("Function cancelled" "quit / exit abort")))    ; <esc> or (quit)
         ((princ (strcat "\n** Error: " msg " ** ")))                  ; Fatal error, display it
   )
   (princ)
 )

 (if (and (setq cmdecho (getvar 'cmdecho))
          (setvar 'cmdecho 0)
          (setq osmode (getvar 'osmode))
          (setvar 'osmode 512)
          (setq pt1 (getpoint "\nSpecify start point (left): "))
          (not (initget 32))
          (setq pt2 (getpoint pt1 "\nSpecify end point (right): "))
     )
   (progn
     (vla-startundomark
       (setq acDoc (vla-get-activedocument (vlax-get-acad-object)))
     )
     (command "._dview"
              "_l"
              ""
              "_po"
              "@0,0,0"
              "@0,0,1"
              ""
              "._dview"
              "_l"
              ""
              "_tw"
              (- 360 (/ (* (setq ang (angle pt1 pt2)) 180.0) pi))
              ""
     )
     (setvar 'snapang ang)
   )
 )
 (*error* nil)
)
;;;--------------------------------------------------------------------;
;;; Untwist dview function:
(defun c:UTW () (c:UNTWIST))
(defun c:UNTWIST (/ *error* cmdecho acDoc)
 (prompt "\rUNTWIST")

 (defun *error* (msg)
   (and cmdecho (setvar 'cmdecho cmdecho))
   (if acDoc
     (vla-endundomark acDoc)
   )
   (cond ((not msg))                                                   ; Normal exit
         ((member msg '("Function cancelled" "quit / exit abort")))    ; <esc> or (quit)
         ((princ (strcat "\n** Error: " msg " ** ")))                  ; Fatal error, display it
   )
   (princ)
 )

 (if (and (setq cmdecho (getvar 'cmdecho))
          (setvar 'cmdecho 0)
     )
   (progn
     (vla-startundomark
       (setq acDoc (vla-get-activedocument (vlax-get-acad-object)))
     )
     (command "._dview" "_l" "" "_tw" 0 "" "._ucs" "_w")
     (setvar 'snapang 0)
   )
 )
 (*error* nil)
)
;;;--------------------------------------------------------------------;
(princ)

Link to comment
Share on other sites

We use the WCS all the time. Pulling in point files and lines from different DWG's that the survey side completed. That way everything lines up nicely and no rotation of any kind are necessary.

Link to comment
Share on other sites

Whats an easy way to rotate all the text in the viewport so they all are horizontal with the page without making one correct and doing match properties?

Link to comment
Share on other sites

BigAl, ReMark, BlackBox!! Hope ya'll have been doing great! Thanks again for all the help. Ya'll always have the right answer or at the very least point me in the right direction.

Link to comment
Share on other sites

Yes it was, I forgot to put that back on there. I had a reply to that all ready to send and I hit refresh and lost it all. Setting it to zero rotated the text to East. So, all I have to do it put the correct degree and i'll be good to go. Much, Much faster then the way i was trying

Link to comment
Share on other sites

We use the WCS all the time. Pulling in point files and lines from different DWG's that the survey side completed. That way everything lines up nicely and no rotation of any kind are necessary.

 

Likewise, here.

 

 

 

Whats an easy way to rotate all the text in the viewport so they all are horizontal with the page without making one correct and doing match properties?

 

Another option, is to use the STYLE Command to edit the desired Text Style, under Size, check 'Annotative', and 'Match text orientation to layout'. :thumbsup:

 

Cheers

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