Author Topic: AutoCAD Viewport Rotate Error  (Read 3011 times)

0 Members and 1 Guest are viewing this topic.

mailmaverick

  • Bull Frog
  • Posts: 494
AutoCAD Viewport Rotate Error
« on: August 28, 2017, 04:09:00 AM »
Please see attached drawing. I have a Viewport in 'Layout' TAB which when I rotate by 90 degrees, it changes its extents.
My VPROTATEASSOC variable is set to 1.



tombu

  • Bull Frog
  • Posts: 288
  • ByLayer=>Not0
Re: AutoCAD Viewport Rotate Error
« Reply #1 on: August 28, 2017, 07:55:33 AM »
What commands are you using to rotate it with?  Dview TWist rotates the view, while other methods affect UCS.  What's your UCSFOLLOW set to?
Tom Beauford P.S.M.
Leon County FL Public Works - Windows 7 64 bit AutoCAD Civil 3D

Crank

  • Water Moccasin
  • Posts: 1503
Re: AutoCAD Viewport Rotate Error
« Reply #2 on: August 28, 2017, 12:33:31 PM »
I see the same.
In Acad2017 it doesn't happen, so I'll guess this is a bug that's new in 2018.1.

But the size of your viewport is only 0.088 x 0.038 drawing units. After rotation the new viewport is 0.1x0.1 drawing units. That's still very very small.
Larger (normal) viewports don't have this problem.
Vault Professional 2023     +     AEC Collection

mailmaverick

  • Bull Frog
  • Posts: 494
Re: AutoCAD Viewport Rotate Error
« Reply #3 on: August 29, 2017, 06:18:36 AM »
I am using ROTATE command to rotate it.

mailmaverick

  • Bull Frog
  • Posts: 494
Re: AutoCAD Viewport Rotate Error (Bug in AutoCAD)
« Reply #4 on: August 31, 2017, 12:46:19 PM »
Still no idea why I'm facing this problem

Crank

  • Water Moccasin
  • Posts: 1503
Re: AutoCAD Viewport Rotate Error
« Reply #5 on: August 31, 2017, 01:04:39 PM »
In Acad2018.1 they have added extra options to viewports.

As a result of this the minimum size of a viewport after rotation appears to be 0.1x0.1 drawing units.
Normally this shouldn't be a problem, because your layout is much larger.
I wonder why this is important for you, because such a tiny viewport will look like a dot on your sheet.
Vault Professional 2023     +     AEC Collection

tombu

  • Bull Frog
  • Posts: 288
  • ByLayer=>Not0
Re: AutoCAD Viewport Rotate Error
« Reply #6 on: September 01, 2017, 10:20:20 AM »
Only way I could reproduce your issue was to set VPROTATEASSOC to 0.  With VPROTATEASSOC set to 1 (default) ROTATE works fine.
Tom Beauford P.S.M.
Leon County FL Public Works - Windows 7 64 bit AutoCAD Civil 3D

mailmaverick

  • Bull Frog
  • Posts: 494
Re: AutoCAD Viewport Rotate Error
« Reply #7 on: September 14, 2017, 10:33:34 AM »
Another bug which i have found in AutoCAD 2014 is that when I rotate the viewport using (command "ROTATE" .........) automatically a closed polyline with coordinates same as of Viewport gets created which itself binds with the viewport entity. Anybody else came across such problem ?

Crank

  • Water Moccasin
  • Posts: 1503
Re: AutoCAD Viewport Rotate Error
« Reply #8 on: September 16, 2017, 03:49:09 AM »
That's not a bug, it's how it works:
If you look at the dxf-codes, you'll notice that an angle of the viewport isn't present (a viewport is allways orthogonal, but you can rotate/twist the view).
A rotated viewport is clipped from an object (polyline/circle/elipse/region) and has a twisted view. In this case the polyline is automaticly generated.
Vault Professional 2023     +     AEC Collection

mailmaverick

  • Bull Frog
  • Posts: 494
Re: AutoCAD Viewport Rotate Error
« Reply #9 on: September 18, 2017, 04:29:39 AM »
Thanks for your answer Crank. One more thing, if a viewport is rotated, its properties window does not show its rotation. So how to know whether a viewport has been rotated or not ?

ahsattarian

  • Newt
  • Posts: 112
Re: AutoCAD Viewport Rotate Error
« Reply #10 on: August 11, 2021, 07:07:12 AM »
Code - Auto/Visual Lisp: [Select]
  1. (setq s (ssname (ssget ":e:s" '((0 . "viewport"))) 0))
  2. (cdr (assoc 51 (entget s)))

PM

  • Guest
Re: AutoCAD Viewport Rotate Error
« Reply #11 on: August 17, 2021, 05:06:11 PM »
I use this code to rotate viewport. I dont know if it is what are you looking for

Code - Auto/Visual Lisp: [Select]
  1. ; DVA.LSP
  2.  
  3. ; Jim Nakazawa
  4. ; (415) 768-1234
  5.  
  6. ; TO SET DVIEW TWIST ANGLE BY POINTING TO AN EXISTING LINE
  7. ; FIRST DRAW THE LINE FROM LEFT TO RIGHT THAT YOU WANT TO SET THE DVIEW
  8. ; TWIST ANGLE FROM
  9.  
  10. (defun C:DVA (/ rgm a b pt1 pt2 ang1 )
  11.   (setq rgm (getvar "regenmode"))
  12.   (command "setvar" "regenmode" 0)
  13.   (setq a (entsel "select a line to DVIEW TWist angle: "))
  14.   (setq b (entget (car a)))
  15.   (setq pt1 (cdr (assoc 10 b)))
  16.   (setq pt2 (cdr (assoc 11 b)))
  17.   (setq ang1 (angle pt1 pt2))
  18.   (setq ang1 (/ (* ang1 200.0) pi))
  19.   (setq ang1 (- ang1))
  20.   (command "dview"  "" "tw" ang1 "")
  21.   (command "setvar" "regenmode" rgm)
  22.   (princ "Dview Twist Angle Set to ") (princ (+ 400.0 ang1)) (terpri)
  23. ;this should be modified to show angle in current angular units
  24.   (princ)
  25. ) ;this routine seems to work
  26.