I'm not a fan of cached views, but in this project we were force to use it to cut down the loading times, and also to get better printing (but not perfect) result.
We choosed to use "Automatic With Alert"-option so the user will be notify if there's a change.
...but to update all the drawings using the "batch process"-tool with the pre delivered RefVisibleEdge_Sync.txt or RefVisibleEdge_Dynamic.txt there's the dialog pops up for every file and blocking the batch process to continue. So I still have to click "Yes" for all the dozen of files.
Is it "worked as designed"?
/Peter
Hi Peter,
Try following solution to handle this
Copy attached mvba file to "C:\ProgramData\Bentley\OpenBuildings CONNECT Edition\Configuration\WorkSpaces\Building_Examples\worksets\<WORKSET>\Standards\Macros" OR [ Any path under MS_VBASEARCHDIRECTORIES configuration variable]
and add command 'VBA RUN [CloseAlert]module1.CloseAlert' to your batch process file.
Running batch process now will close the Alert dialog by its own and batch process won't stuck anymore. [ I have added simple demo video to show this]
Please try this.
HTH,
Best Regards,
Sandeep
CloseAlert.mvba
#---------------------------------------------------------------------- # # Command file for batchprocess utility # # This command file was originally copied from $(MS_DATA)cmdfiletemplate.txt. # Command file information: # - Lines that start with the '#' character are treated as comments and ignored. # #---------------------------------------------------------------------- VBA RUN [CloseAlert]module1.CloseAlert
Answer Verified By: Shivam Soni
Thanks, that will work for now.
How do I edit the code to press "No" on the dialog box (to not update the cached view)?
Sub CloseAlert() SendKeys ("{Enter}") End Sub
Please add following code.
Public Declare PtrSafe Sub Sleep Lib "kernel32" (ByVal dwMilliseconds As LongPtr) 'For 64 Bit Systems
Sub CloseAlert() SendKeys "%n" Sleep 2000 SendKeys ("{Enter}") End Sub