Hi all,
Because I couldn't wait for an out-of-the-box "synchronise all templates" functionality in ORD, I have put together an mvba that crudely will synchronise all or just edited in-place Template Drops and Linear Templates. It seems to work quite well so far. Thought i'd share as it seems a shame to keep it to myself...
What it does:
MVBA Options:
In order to avoid the "Are you sure" dialog that shows when syncing a Template that has been edited, the mvba needs to locate where you put the SendKeys.exe app. The location (path inc. trailing "\") of send keys can be defined by adding a variable named "SENDKEYS_PATH" to your workspace / configuration (I have also defined other locations we use locally)
If the variable is not defined, the macro will still work, but it will pause with the dialog and wait for user input.
Happy to get some feedback if anyone finds any issues with it...
ORD_SyncAllTemplates_mvba_v2.2.zip
Mark,
Almost got it working...counts up the number of linear templates, but stops where it is trying to count up maybe the vertices of each element??
but the code stops here
Have got a couple of 'watch' items on and seems to be populating those, but there are no vertices to be found, or the variable it is looking for has changed location????
oVertexList = oElement.ConstructVertexList(0)
I couldnt find any vertices in the watch window for the 'oElement' and dug down a few levels of information.
Any assistance would be super.
Cheers
SG
yep, perhaps the corridor handle levels are turned off? It gets those vertices to simulate a manual click.
Regards,
Mark
OpenRoads Designer 2023 | Microstation 2023.1 | ProjectWise 2023
Mark, Thanks for the snappy reply. Seems the handles are visible. These are all linear templates. All the levels are displayed for the 2d window. 'construction' attribute is on.
hmm it uses the actual "Corridor" handles of the Corridor/Linear Template (and not the Template Drop itself) - could that be the issue? Looks like the Corridor handles are not displayed?
OK....been thinking....it found 182, but reality says only 101 elements....does that mean there is some trash sitting somewhere in the dgn? How do i dispose of it? Have compressed the dgn. Cheers for the reply btw....
these handles exist...
yeah, you may have Linear Templates with no Template Drops (that were deleted). They should be the same ones you see in Explorer.