EAlexander Posted May 20, 2022 Share Posted May 20, 2022 So... does Update All Viewports update ALL viewports, or only viewports that need updating throughout the document? Quote Link to comment
Pat Stanford Posted May 20, 2022 Share Posted May 20, 2022 I believe it Updates ALL viewports. Quote Link to comment
EAlexander Posted May 20, 2022 Author Share Posted May 20, 2022 Yeah - that's what it looks like. Bummer. Thanks Pat! Quote Link to comment
Pat Stanford Posted May 20, 2022 Share Posted May 20, 2022 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); Quote Link to comment
EAlexander Posted May 20, 2022 Author Share Posted May 20, 2022 Oh wow! Thanks Pat - I'll do some testing on a duplicate file and report back! Quote Link to comment
Jesse Cogswell Posted May 20, 2022 Share Posted May 20, 2022 I wrote a script a while back that will launch a dialog box showing all viewports in the drawing, with out of date viewports shown in red. There's also a button that lets you select all out of date viewports. 3 Quote Link to comment
grant_PD Posted May 20, 2022 Share Posted May 20, 2022 Be sure to actually check to see if it did update all the viewports. I find sections to be sneaky little buggers, sometimes they just don't update. Quote Link to comment
Pat Stanford Posted May 20, 2022 Share Posted May 20, 2022 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. 😉 Quote Link to comment
Jesse Cogswell Posted May 20, 2022 Share Posted May 20, 2022 @trashcan mentioned a bug in VW2022 where the Update All Viewports command doesn't seem to work with any viewport with a BG Render set to Hidden Line. He confirmed that my script does not have this limitation. Quote Link to comment
trashcan Posted June 2, 2022 Share Posted June 2, 2022 @Jesse Cogswellis correct. There is a bug, I think from VWX2021, actually, that is solved by your script! Which I use all the time. (thanks again) 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.