Cad for mac rotate view in viewport

broken image

Viewport hard coded based on example drawing ((setq tab (vla-add (vla-get-layouts ad) n)) (print (strcat 'Layout ' n ' already exists.')) ((vl-position (setq n (strcase (cdr (assoc 1 (entget e))))) (mapcar 'strcase (layoutlist))) (setq ad (vla-get-activedocument (vlax-get-acad-object))) '(lambda (a b) (< (cdr (assoc 1 (entget a))) (cdr (assoc 1 (entget b))))) (setq s (vl-sort (vl-remove-if 'listp (mapcar 'cadr (ssnamex s))) I stumbled upon this post, But was not sure how to get the rotation piece to work.

broken image

(strcat '*Area' (itoa (cdr (assoc 71 (dictsearch n name))))) (setq n (cdr (assoc -1 (dictsearch (namedobjdict) 'acad_layout')))) I am trying to figure how to auto rotate the viewport to match the block view frame, then go onto the next. The below is a part of a routine which allows to copy the current layout tab a multiple of times, then it would go through each layout and activate the viewport, turn on a layer number, to zoom extents and set the scale, then go to the next layout tab and do the same.