[Search tip detail and code files using keywords, tip number, author name, etc ]
 
Adjust UCS Macros
Tip# 3271 By Jake Lucier On 27-Sep-2009
3.5
Rated By 2 users
Categories : View
Software type : AutoCAD 2010
Rename File To : No Files to download.
This tipster uses these two routines to lay out orthogonal site plans with ease.

Jake Lucier gives us two small LISP routine macros to help adjust the UCS (user coordinate system) in AutoCAD. One adjusts the UCS to Plan View; the other returns to World View from Plan View.

"I use these two routines while keeping civil site plans at true north with their real insertion points during my site plan layout exercises. This allows me to lay out orthogonal site plans with ease. No more do you need to struggle to change your plan view to and from World."

UCS TO PLAN
(DEFUN C:UP()

        (COMMAND "UCS" "Z" PAUSE PAUSE)
        (COMMAND "PLAN" "")
        (SETVAR "SNAPANG" 0)
       
)

 
PLAN TO WORLD

(DEFUN C:PW()
        (COMMAND "UCS" "WORLD" )
        (COMMAND "PLAN" "")
       
)

 

Notes from Cadalyst Tip Patrol: These two macros can be put in your ACAD.LSP file and loaded with AutoCAD, or you could put them in a LISP file and load them with the Appload command. You can even take these macros and make them work in a toolbar, palette, mouse button, or in the ribbon. If you change your UCS or leave Plan View often, these macros can reduce your clicks. 

 

Average Rating:
3.5


User comments
Comment by McSwain,R.K.
Posted on 2009-09-28 14:48:08
It's always a good idea to prefix commands with a period and underscore, and prefix keywords with an underscore. The period ensures that the core internal command is used, and the underscore translates the following command/keyword in case a foreign language version of AutoCAD is being used. i.e.: (command "._UCS" "_Z".......)
Comment by Anderson,Jim
Posted on 2009-09-29 04:25:43
Good tips. They can also be used by LT users when attached to a toolbar icon etc. UCS TO PLAN ^C^C_UCS;z;\plan;c PLAN TO WORLD ^C^C_ucs;world;plan;w Extra - align the UCS & view to an object (usually a line) ^C^C_ucsfollow 1 _ucs _ob \_ucsfollow 0 This shows another way of getting the same result, but the use of the PLAN command looks a better method.