Jump to content
Sign in to follow this  
Yellowstone Construction

Script addition

Recommended Posts

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

Share this post


Link to post

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

Share this post


Link to post

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);

Share this post


Link to post

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

 

7150 Riverwood Drive, Columbia, Maryland 21046, USA   |   Contact Us:   410-290-5114

 

© 2018 Vectorworks, Inc. All Rights Reserved. Vectorworks, Inc. is part of the Nemetschek Group.

×