See the top rated post in this thread. Click here

Results 1 to 5 of 5

Thread: To Scale & Center: VPORTS Refined

  1. #1
    I could stop if I wanted to CEHill's Avatar
    Join Date
    2006-05
    Location
    TN
    Posts
    327
    Login to Give a bone
    0

    Default To Scale & Center: VPORTS Refined

    Scaling and centering viewports of LARGE scale site plans seem very diffcult in AutoCAD Vanilla.

    I have tried the various ZOOM flavors including CENTER & SCALE nXP.

    Are there any available LISP routines (for AutoCAD 2004) that let the user set the viewport scale and define the viewport center?

    NOTE: This functionality is available in a vertical (autodesk Mechanical) I use elsewhere - I am spoiled and need this for vanilla here.
    Yours,

    Clint
    Hill

    ------------------
    CAD Systems Operation and Management
    Chemical Plant Process + Mechanical Design Focus Areas

  2. #2
    100 Club
    Join Date
    2005-08
    Location
    Northern Colorado
    Posts
    100
    Login to Give a bone
    0

    Default Re: To Scale & Center: VPORTS Refined

    I'd be interested in this as well - the ability to set a scale, and then pick a point as the viewport center. All our viewports are circular, and awkard to align via other methods. Not impossible, but awkward.

  3. #3
    AUGI Addict
    Join Date
    2005-08
    Posts
    1,043
    Login to Give a bone
    0

    Default Re: To Scale & Center: VPORTS Refined

    Call while inside an active viewport.
    Code:
    (defun c:CSViewport (/ Sc Pt cViewport AcadObject)
    
            (vl-load-com)
    	(setq AcadObject (vlax-get-Acad-Object))
    	(setq Sc (getreal "\n Enter scale of viewport (where 48 would be 1/4\"): "))
    	(setq Pt (getpoint "\n Select center point of viewport: "))
    	(setq cViewport
    		(vlax-ename->vla-object
    			(ssname
    				(ssget "x"
    					(list
    						(cons 0 "VIEWPORT")
    						(cons 410 (getvar "ctab"))
    						(cons 69 (getvar "cvport"))
    					)
    				)
    				0
    			)
    		)
    	)
    	(vlax-invoke AcadObject 'ZoomCenter Pt 1.0)
    	(vla-put-CustomScale cViewport (/ 1.0 Sc))
    	(princ)
    )

  4. #4
    I could stop if I wanted to CEHill's Avatar
    Join Date
    2006-05
    Location
    TN
    Posts
    327
    Login to Give a bone
    0

    Smile Re: To Scale & Center: VPORTS Refined

    All visiting here will thank you for that golden lisp code!

    Thanks again "T"
    Yours,

    Clint
    Hill

    ------------------
    CAD Systems Operation and Management
    Chemical Plant Process + Mechanical Design Focus Areas

  5. #5
    AUGI Addict
    Join Date
    2005-08
    Posts
    1,043
    Login to Give a bone
    1

    Default Re: To Scale & Center: VPORTS Refined

    You're welcome.

Similar Threads

  1. Refined Filter Selection
    By Wish List System in forum Revit Architecture - Wish List
    Replies: 0
    Last Post: 2011-11-17, 01:55 AM
  2. 2012: Center marks don't scale annotatively?
    By chuck_cantieny in forum AutoCAD General
    Replies: 4
    Last Post: 2011-10-07, 06:58 AM
  3. Vertical/Horizontal Scale for Vports?
    By pford in forum AutoCAD General
    Replies: 3
    Last Post: 2006-08-08, 05:56 PM
  4. refined image management
    By jtgb in forum Civil 3D Wish List
    Replies: 0
    Last Post: 2006-05-30, 11:53 AM
  5. On Line Design Center scale issues
    By lkarahalis in forum AutoCAD General
    Replies: 0
    Last Post: 2004-11-02, 05:54 PM

Posting Permissions

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