Viewport UCS, Zoom Object
I have a 'Snake' of rectangles which represent viewport views, each has its own UCS and its own layer. I am attempting to write some code which does the following;(defun c:sheet1 (/ SS1 )(command "setvar" "ucsfollow" "1")(setq SS1 (ssget "x" '((0 . "LINE")(8 . "SHEET1"))))(command "_.UCS" "_ENTITY" SS1)(command "_.PLAN" "")(command "_.UCS" "Named" "Save" "Sheet1"))
and the next one, and so on..
There is a problem, when I zoom 'object', it zooms to the extents of the rectangle in WCS and not the extents of the rectangle in the current UCS.
This should be easy, Or maybe I am going the wrong way about it....
Any help would be much appreciated.
Cheers
H SS1 is selection set of LINE objects residing in layer SHEET1... So when used UCS "entity", you have to specify single entity, not a SS1... Maybe, if you only have 1 rectangle in SHEET1, you'll just need (command "_.UCS" "_Entity" (ssname SS1 0)) supplying last entity from SS1, otherwise CAD won't know on what entity should UCS have to be aligned to... Afterward, you don't need (command "_.PLAN" "") as you set variable 'UCSFOLLOW to 1, but you'll probably need to zoom it again to that particular object - rectangle - use : (command "_.ZOOM" "o" (ssname SS1 0))
M.R. Please read the CODE POSTING GUIDELINES and edit your post. Posted Edited - My apologies SLW210
Marko, Thanks for your input/advice. I amended my code to suit, just playing around now to make it zoom to the extents of the object..
页:
[1]