Yellowstone Construction Posted January 27, 2008 Share Posted January 27, 2008 Could someone please tell me what to add to a script that selects all the viewports on a layer and updates them. I have the script to select all. I don't know what to add to the script to make it update. I'm sorry, but I have enough on my plate now, without learning scripting. I just want to update all the viewports on one page at one time. Thank you Quote Link to comment
Pat Stanford Posted January 28, 2008 Share Posted January 28, 2008 Two options: 1. Create a Custom Selection Script that only selects Viewport on the active layer. YOu can then hit the Update button in the OIP and update them all at the same time. 2. If you don't care about changing the selection state of the objects, you could try this script. Procedure UpdateSheetLayerVPs; {Selects, Updates and Deselects each viewport on a sheet layer} {? 2008, Coviana, Inc - Pat Stanford pat@coviana.com} {Licensed under the GNU Lesser General Public License} Begin DSelectAll; SelectObj((ST=REGVIEWPORT)); While FSActLayer<>Nil do Begin UpdateVP(FSActLayer); SetDSelect(FSActLayer); End; End; Run(UpdateSheetLayerVPs); Pat Quote Link to comment
Yellowstone Construction Posted January 28, 2008 Author Share Posted January 28, 2008 Thank You, Pat That's exactly what I wanted. It would of taken me for ever to figure out how to write that. Much appreciated! Quote Link to comment
Yellowstone Construction Posted January 30, 2008 Author Share Posted January 30, 2008 Pat thanks again for the script. I have one problem. When scripted into VW it worked fine for one day. Now it only selects one VP and updates it. Any ideas? Quote Link to comment
Pat Stanford Posted January 30, 2008 Share Posted January 30, 2008 What kind of viewports are not updating? Regular, Section or Design Layer? Pat Quote Link to comment
Yellowstone Construction Posted January 30, 2008 Author Share Posted January 30, 2008 Sections actually, They all updated unitil yesterday. Quote Link to comment
Pat Stanford Posted January 30, 2008 Share Posted January 30, 2008 It looks like the one I sent yesterday should not have handled section viewports. Try this one instead. Pat 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); Quote Link to comment
Yellowstone Construction Posted January 30, 2008 Author Share Posted January 30, 2008 (edited) Working Fine! You're Good! Thank You, Mike Edited January 30, 2008 by Yellowstone Construction 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.