Easily Modify All Your MicroStation Tags With Just a Few Mouse-Clicks
By Rick Sewell
It seemed a typical day as I manned Axiom's Technical Support phone lines. Calls were coming in with the usual questions. Yes, Global File Changer will replace cells in all of your files in one shot. Yes, FileFixer will repair your file. Then I received a call from a fellow with a question that was quite out of the ordinary.
He was looking for something that would allow him to extract tag values from his design files to an external database and also allow him to manage the tag values from there. He needed to do this not on just a single project either but “thousands of DGN files,” he said. “A real, hairy-monster of a job.”
My first thought was that we could likely custom program something to do the job. I didn't know of any Axiom tools out of the box that would do it. Needing more information in order to give the problem a proper assessment, I had the customer send me some sample files to analyze.
As I opened each sample DGN file, I noticed that all the files were nearly identical. Each file contained a series of cells with five tags associated with each cell. They looked like a bunch of baby title blocks. Title blocks? That’s it! Title Block Manager™ has the ability to extract tags directly from MicroStation and copy them into Microsoft Excel!
Just as the name indicates, Title Block Manager was designed to handle title blocks. The initial Title Block Manager release didn’t handle tags. However, it was later discovered that a number of customers used tags in their standard title blocks. To accommodate those users, we enhanced Title Block Manager to extract selected tag values (instead of extracting only regular Title Block Manager text elements from title blocks). This is when the universe opened up.
The new tag handling feature in Title Block Manager isn't limited to just handling tags in title blocks. It allows you to extract tag values from any tag set in any set of design files! It's like we have another application entirely living inside of Title Block Manager. We should call it "Tag Manager". [Editor's note: A "tag set" is a set of associated tags. Each and every tag is part of a tag set.]
Check it out. Figure 1 shows some tag values within a DGN file. In this file, the tag values represent unit numbers in an apartment building.
This design file has two tag sets – one for each floor. Each tag set contains three tags. Each tag has a different value to represent a unit number in the building.
Title Block Manager will take each of these values and place them elegantly into a spreadsheet by creating a row in the database for each occurrence of each tag set that was placed in the DGN file. Figure 2 shows the actual tag data extracted from the sample design file. Each row in Figure 2 is a record of an instance of a tag set attached to an element.
Column B shows the element ID number of the element that was tagged.
Column C, with the header "TBlockID", contains the name of the tag set (in this simple example, "Floor1” & “Floor2").
The heading of each of the next three columns contains the name of each tag in the tag set. Within each field under each tag name, you see the displayed value of that tag for the given element. In this case the unit numbers.
You can process all your design files and have a complete library of all the tags used in your files. Being able to do that is pretty impressive. But that's just the half of it. You can also modify your tag values in the spreadsheet and write the modifications back to your design files!
In Figure 3, I've changed all the tag values listed in the spreadsheet under the "Unit Number" column heading from "101", "102", "103", "201", "202" and "203" to "1A", "1B", "1C", "2A", "2B" and "2C, respectively.
With nothing more than a few mouse-clicks, Title Block Manager will write the newly changed values back to the design file. Here is the result (Figure 4):
Remember, you can process all your design files here. So go get your tag-laden design files and start having some fun with them.