Results 1 to 2 of 2

Thread: Twisted View Zoom Object or Extents

  1. #1
    Wish List Administration
    Join Date
    2011-08
    Posts
    4,581

    Default Re: 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


  2. #2
    Certifiable AUGI Addict
    Join Date
    2001-03
    Location
    Tallahassee, FL USA
    Posts
    3,658

    Default 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)
    )
    Last edited by Tom Beauford; 2020-07-22 at 04:23 AM. Reason: Added more code and information.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •