I assume many Civil product users are like me: Since the particular civil product we used created many of the elements in our DGN files, Element Templates were not seen as a priority, nor as a necessity.
However, as we begin using more and more Open Roads tools, we find ourselves needing more and more Element Templates. While I actually have written other VBA macros that convert other types of files into Element Templates, in the XML format, I discovered this MVBA as another tool for the toolbox. However, after some testing and trial sessions, I often found that some level naming conventions are not naturally descriptive enough to be a satisfactory naming convention for element templates. Additionally, since Element Templates do not have a Description attribute, there seems to be very little options than to use verbose, descriptive names when creating element templates. Since most DGNLIB's that I have used that are intended to supply levels contain levels with good descriptions, the modifications that I made to this VBA macro were a "no-brainer" (except for the use of my VBA Coding brain.)
I therefore created a new version of the VBA macro with the following revisions:
Notes: The test of whether the level is coming from a DGNLIB does not return TRUE if the active file is a DGNLIB, even if it is one that is supposed to be supplying levels to files in a workspace. Basically, it only returns TRUE if the Level does not exist in the active file but is coming solely from a DGNLIB. Currently, if the level has no description, an unnamed element template is created in the XML file. I have not tested to see what happens if such an element template is imported.
I hope others find this useful.
great work
Wow thanks for sharing your work with us, very appreciated!