Twisted View Zoom Object or Extents
Summary: Twisted View Zoom Object or Extents doesn't fit either to full screen
Description: Twisted View Zoom Object centers but only fill extents when the objects are rotated to match DVIEW TWist angle.
Zoom Extents is just as bad.
Simple commands like this should work for Civil 3D users as well.
Product and Feature: AutoCAD Civil 3D - Civil View
Submitted By: Tom Beauford on 07/21/2020
Re: Twisted View Zoom Object or Extents
I found a solution to Zoom Object in a Twisted View at least by gile at The Swamp
Zoom out to fit an object into screen: https://www.theswamp.org/index.php?t...0028#msg250028
Placed the code for ZoomObject and the test/calling function: zo in one file and changed zo to zob since ZO is defined in c3d.mnl as Zoom Out.
Enter zob at command line to Zoom to Objects in twisted views.
As the TIN-Surface is usually the area I'm working in I added this code to the bottom of the same file for Zooming to Surface
Code:
(defun c:zs (/ lastent ss)
(or *acdoc*
(setq *acdoc* (vla-get-ActiveDocument (vlax-get-acad-object)))
)
(setq ;lastent (entlast)
ss (ssget "X" '((0 . "AECC_TIN_SURFACE")))
)
(if (>(sslength ss)0)
(progn
(vla-StartUndoMark *acdoc*)
(command-s "LineworkShrinkwrap" ss "")
(c:zob)
(command-s "erase" "_previous" "")
(vla-EndUndoMark *acdoc*)
)
)
(princ)
)
Then added this zet function below it to do the Zoom Extents in Twisted View to full screen.
Code:
(defun c:zet (/ lastent ss)
(or *acdoc*
(setq *acdoc* (vla-get-ActiveDocument (vlax-get-acad-object)))
)
(setq ;lastent (entlast)
ss (ssget "X")
)
(if (>(sslength ss)0)
(progn
(vla-StartUndoMark *acdoc*)
(command-s "LineworkShrinkwrap" ss "")
(c:zob)
(command-s "erase" "_previous" "")
(vla-EndUndoMark *acdoc*)
)
)
(princ)
)