To anyone used to MicroStation's reference files constantly updating, the notion of caching a reference file's contents thus requiring manual intervention to update those contents may seem alien.
However, whilst the use of Cached Visible Edges (CVE) is primarily recommended at this time to improve performance, it can offer a discipline to the information production process.
The Cached views in Drawing models do not necessarily need to be constantly updated every time a change in made to the source model(s). Making a conscious decision to update all of the CVE references at particular times offers the opportunity for structured project review rather than piecemeal revision.
Updating CVEs via the reference dialog is too time consuming for regular use, the key-in 'reference visibleedges allmodels synchronizecache' is a quicker way. This can be added to a custom tool for ease of access.
Once more than a couple of models are involved, this is still too time consuming.
Any key-in sequence can be automated using the Batch Process utility, Utilities menu > Batch Process… :
The Batch Process dialog opens. The basic sequence is:
So first, create a command file, this is nowhere near as difficult as it might sound…
The command file is a text file that should be placed somewhere in your project folders.
(Note that it is a good idea to have a folder called something like 'Resources' in every project to store project specific files like this.)
The command file is simply a list of the commands that you would like to be executed in every file.
I have called this example UpdateCVE.txt.
(Note the use of CamelCase and no spaces in the filename, a bit geeky but avoids problems later, it is so easy for someone to inadvertently type two spaces in a filename and leave you spending ages wondering why things are not working)
Now edit the file:
You are faced with a blank and not especially informative canvas:
#----------------------------------------------------------------------## 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.##----------------------------------------------------------------------
This is the standard header, every line of which is commented out so it has no effect.
(Note that if you are new to scripting, be aware that adding comments to scripts at whatever level of complexity is good practice.)
In this case, within the AECOsim Building Designer workflow, all we want to do it to update the CVEs in every Drawing Model that is referenced into the sheet files. The only line we need to add to the command file is 'reference visibleedges allmodels synchronizecache'.
The resulting file looks like this:
# Command to update cached visible edges in all models referenced to the listed filesreference visibleedges allmodels synchronizecache
When you run any kind of automated process it's always good to know how it went, so set the logging options:
The default is:
Click the magnifying glass to open the location. The batchprocess.log file will appear there.
Set the Initial Model pop-down to All Models and the save the batch process job for future use. Saving at this stage gives you a job file that contains all of the settings you need that can be used on any project. This can be saved to a central location for reuse.
Then add the files to be processed.
If all the files you need are in one folder, just select them in the list and click Done. If they are spread over multiple folders expand the 'Select Files and Directories to process' dialog with the down arrow at the lower left.
Having selected the project files to be processed save another copy of the job file named with the project/job code, e.g. 9999_UpdateCVE.bprc.
Next time you need to update the project CVEs all you need to do is open the saved job to get the settings and the list of files. The list of files can be amended and resaved as the project progresses.
Finally process the job:
A list of models to be processed will be shown, click Process to continue. The list will show progress, AECOsim will open each model listed, the process may take some time. The time taken for each model is shown giving an idea of how long the whole list will take.
Obviously it is best to run this kind of process at a quiet time for the project to ensure no one is using any of the files being processed.
The batch process log will look like this:
Processing Batch Process Job: C:\_PROJECTS\9999\Resources\9999_UpdateCVE.bprcStart Time 30/05/2013 17:55:57
BatchProcess: 45 files processed Total processing time 4:57.4 secondsEnd Time 30/05/2013 18:01:00
If you look in:
C:\ProgramData\Bentley\AECOsimBuildingDesigner V8i SS4\WorkSpace\System\data
You will find three scripts ready to go:
These enable you to switch batches of file between cached or dynamic references and update those that are cached.
The first two change the Reference Visible Edges settings, the third synchronises cached models.
RefVisibleEdge_Cache.txt, setting references to Cached, runs the command:
REFERENCE VISIBLEEDGES ALLMODELS CACHED
RefVisibleEdge_Dynamic.txt, setting references to Dynamic, runs the command:
REFERENCE VISIBLEEDGES ALLMODELS DYNAMIC
Running RefVisibleEdge_Sync.txt will update the cached visible edges in all processed files
REFERENCE VISIBLEEDGES ALLMODELS SYNCHRONIZECACHE
Note: In SS3 and SS4 RefVisibleEdge_Cache.txt, contains a couple of typos. This has been corrected in SS5 and above. The correct command that it should contain is the one listed above.
Nice!! That I'll try!
Further to Thomas's request, we now have a 'Visible Edge Tools' toolbox in ABD SS6.
I would also say this should be fit into a particular place within a work flow.
I don't like CACHED files when I am in a working mode. As every file is changed all day long and that means I want to see what has changed.
For me the Cached process fits best once I am on the downhill side of drawing or when I am dealing with revisions or milestones in drawings.
I think this should go into the interface as a tool bar.