Pat Stanford Posted July 24, 2008 Share Posted July 24, 2008 I have found the Update All Viewports command dangerous as it updated everything in the file and can take a very loooooooong time (in one case 17+ hours.) You can certainly select all the viewports and click the Update button, but if you accidentally select anything other than viewports, you don't get the button in the OIP. This script will select and update each viewport on a sheet layer. {*************************} Procedure UpdateSheetLayerVPs; {Selects, Updates and Deselects each viewport on a sheet layer} {Revised to handle both sheet layer and section viewports} {? 2008, Coviana, Inc - Pat Stanford pat@coviana.com} {Licensed under the GNU Lesser General Public License} Begin DSelectAll; SelectObj((ST=REGVIEWPORT) or (ST=SECTVIEWPORT)); While FSActLayer<>Nil do Begin UpdateVP(FSActLayer); SetDSelect(FSActLayer); End; End; Run(UpdateSheetLayerVPs); {************************} Pat Quote Link to comment
twk Posted June 27, 2011 Share Posted June 27, 2011 Hi Pat, This script is very handy. I was wanting to just update viewports of a certain class. When put UpdateVP(C='Elev.VP'); I get an error. How would this be done? Thanks in Advance Tui Quote Link to comment
Pat Stanford Posted June 28, 2011 Author Share Posted June 28, 2011 UpdateVP requires a handle to a viewport. You are trying to pass it a class. You need to change the Selct Obj line. SelectObj(((ST=REGVIEWPORT) or (ST=SECTVIEWPORT) and (c='Elev.VP))); Quote Link to comment
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.