Jump to content

Update All Viewports?


Recommended Posts

I THINK this script will do what you want and only update out of date viewports. Test carefully. I only used it in a file with 6 objects and 2 viewports.

 

And to prove out assumption, time how long it takes an Update All Viewports to run versus the script.  If it it much longer than we are right. If it is shorter or about the same them only the out of date viewports are being updated.

 

Procedure UpdateOutOfDateVPs;

{May 20, 2022}
{©2022 Patrick Stanford pat@coviana.com}
{Licensed under the GNU Lesser General Public License}

{No Warranty Expressed of Implied. Use at your own risk.}
{Very lightly tested. Test on backup copy for suitabilty to use.}


Procedure Execute(Hd1:Handle);
	BEGIN
		If ((GetType(Hd1)=122) and (GetObjectVariableBoolean(Hd1, 1004))) then UpdateVP(Hd1);
	End;
	
BEGIN
	ForEachObject(Execute, ((T=VIEWPORT)));
End;

Run(UpdateOutOfDateVPs);

 

Link to comment

Per Grant's warning, I think the script will update all Sheetlayer Viewports, but Section VPs do have a separate sub-object type and may need to be handled separately in the script.  Let me know if you find this to be the case.

 

Or just run Jesse's script instead. I trust he has all the edge cases worked out. 😉

Link to comment
  • 2 weeks later...

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.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...