Hi group,
I am in the process of designing a tool that needs to store information "on" elements in a dgn. Various strings and doubles to connect the elements to data from various databases and such.
I have succeeded in using datablock to do this, but maybe tags would be a better way?
I have successfully added tags to an alignment DGNfile using inRoads, and can now see various extended information in a new group: "Horizontal Alignment" in the microstation element inspector information window. I like that! I like it a lot actually! But I am a bit confused.. So my question goes:
Can I add tags to elements so they aren't visible, but show up in the element inspector AND are avaiable through VBA?
If so, any hints as to how they are added to the elements, and also how they are retreived would be greatly appreciated. Or if you have any thoughts about using datablock over tags or vice-versa I would like to know why.
Thanks,/Torben (of to read the manual...=)
Update, and partial answer to my question:
I see that I can access the tags using the "Review Tags" tool. I think that would mean they are "regular" tags, and whatever data I choose to add to an element, I can add in the same way. But,
Can I have multiple of these tag types (groups in the element inspector with various data attached)?
The help file seems to have some information to maybe get me going on adding/retrieveing tags through VBA.
System: Win7 64bit 16GB Ram - microStation V8i SS3 08.11.09.578. + PoinTools CONNECT. - Intel i7-4800MQ CPU@2.70GHz, 4 core / 8 Logic proc.
Unknown said:Can I have multiple of these tag types (groups in the element inspector with various data attached)?
It's not entirely clear what you are asking.
A DGN file can contain more than one tag set definition. You can attach more than one tag set to an element.
Regards, Jon Summers LA Solutions
Unknown said:Can I have multiple of these tag types (groups in the element inspector with various data attached)? It's not entirely clear what you are asking.[/quote] When investigating an element using the element inspection tool, you will see various groups of information ("General", "Geometry" etc.). One of these group appear to be the data attached as "tags" by inroads to this particular DGN. I was wondering if I could have more than one of these groups added by myself so the tags were neatly ordered in the element inspector. Thanks for all the hints on what to investigate in the help file together with short and clear comments and the link to your site... :)
It's not entirely clear what you are asking.[/quote]
When investigating an element using the element inspection tool, you will see various groups of information ("General", "Geometry" etc.). One of these group appear to be the data attached as "tags" by inroads to this particular DGN. I was wondering if I could have more than one of these groups added by myself so the tags were neatly ordered in the element inspector.
Thanks for all the hints on what to investigate in the help file together with short and clear comments and the link to your site... :)
I am currently adding a datablock to a cell element (I use cells because all the elements in the cell basically is a representation of the data I have harvested). I think I see the microstation manual hinting that I cannot add tags to cell elements? So before I change my code completely from datablocks to tags, I would like to ask:
Can I add tags to cell elements?
I have tried the examples in the help and managed to attach some kind of tag definition to the DGN, and tagged an element (sorry if my terminology is off!) BUT, I cannot see the tags in the element inspector.. I tried copying what I see in when querying elements generated by inroads but that wasnt enough.
Any clues?
(Note that the four posts above this one, and the first post also has unanswered questions please!)
I have observed that the elements I have generated from inroads also has an x-attribute in the inspector, where as the elements I have tagged myself does not. Indicating a conection between the x-attribute and the showing of the tags in the element inspector. Do you know if that is the case? And do you know how to handle it?
The elements I tag in microstation displays a "linkages" parameter, as do the elements generated by inroads. I do not have inroads running or even installed on my programmin machine, nor can I expect my users to have it.
Thanks in advance,/Torben
Torben
Yes, you may attach tags to cells or even shared cell elements!
But Don't mix the tag data with x-attribute data paradigm, these are different things. With mircosation vba you have the possibility to archive both!
But for me it is not really clear what you like to archive globally!
What is missing in InRoads that you are doing a lot programming yourself. Sure, and have in mind the civil products (InRoads, GeoPack) are under a huge improvement work by Bentley this days and we can not be sure that the products will work that way it's doing now or in near future (2-3 years). Have you checked the new "civil geometry" and data acquisition tools ?
What do you mean by element inspector the ms "element Info":
like
Regards
Frank
since 1985: GIS, CAD, Engineering (Civil) Senior Consultant : [Autodesk Civil 3D , Esri ArcGIS, VertiGIS: in previous days : Bentley MS V4 - V8i, GeoGraphics, Bentley Map V8i, InRoads, HHK Geograf, IBr DAVID] : Dev: [C, C++, .NET, Java, SQL, FORTRAN, UML][direct quote by: http://en.wikipedia.org/wiki/Helmut_Schmidt]: "Wer Kritik übel nimmt, hat etwas zu verbergen"Wer Grammatik- und/oder Rechtschreibfehler findet, der darf sie behalten :-)
Hi Frank,
Yes, by Element Inspector I mean precisly what you have shown on the image you attached ("Elementinfos")!As can be seen in the pictures below, the added tags from inRoads show in a group "Horizontal Alignment" in the element inspector:How can I mimic this behaviour?
When I inspect elements tagged by inRoads, they display the values in the element inspector in a new group just like "Geometrie" or "Allgemein", but the tags I have managed to add does not display in the element inspector. If I am to switch from using datablock to invisible tags, I would like to know if there is any advantages at all. I expected tags to show up in the element inspector but they do not?!
<rant begin>As for the reason to make my own interface, we cannot wait 2-3 years for the next generation of bloated stuff to be released and then approved by the corporation and installed ;o) Rolling my own quality assurance/data inspection and output routines seems to make much more sence. I also have alot of mixed data that needs to be tied together from various DGNs. Yes it is tailormade for us, but will save us oceans of time once completed. I don't mind if a program has poor tools as long as it has great speed and functions and I can roll my own tools! You just cannot make a set of dataextraction tools to suit everybody! Never, ever!! ;)</rant end>The Bentley program we are currently using cannot even show us a proper 3D output of our data!!! (Took me a few days but was no real problem)
Regards,/Torben
- Back tomorrow, Take care :)
Hi Thorben,
What you see in "Horizontal Alignment" are not tags, Jon and I talking about. This is a InRoads enhancement to microstation and the dgn elements. These application data from InRoads are not tags its "user data-linkages:
Use a vanilla Microsation and you can't see the "Horizontal Alignment" with element info. Try to use the old element info tool " analyse element" to see this "data linkages". But to understand tha linkages and to mimic them . You must ask the InRoads Development.
User data from a "InRoads DTM Trianlge" Shape
BTW: Have you checked the RDBMS interface from microsation where you may attach database linkages to dgn elements and work with them.
It's the second way microstation may work with non graphical data.
Thanks Frank.
Then the data from inRoads must be stored twice as I can also clearly see the same information when I use the tag tools. I personally don't condone having the same data stored twice, and simply assumed the Bentley team would also not store the same data twice. Thus I concluded that what I saw in the "element info" was actually the tag data! Ah well, Live and learn I guess :)
I thought I had a vanilla install of v8i (SS3 some older beta version but still) as I don't have any inroads tools available, but I guess there must be some libraries hidden somewhere then.
My conclusion is that I see no reason for switching from using datablock to tags.
Regards,
/Torben
The additional InRoads information in the datablock is only exposed when InRoads is running and even then, often you need the proper ALG or DTM file loaded.
What is written in tags is available always - unless no tags are attached.
In reality, the data is still there only once. What is written in the datablock is just the information InRoads need to connect the graphics to its data as stored in the aforementioned files. As for the data missing from the tags, it would be necessary to add your own tags or some other user data to hold the missing information to allow more feedback.
Even the new Civil Geometry tools require one of the Civil Products to do what they do.
Charles (Chuck) Rheault CADD Manager
MDOT State Highway Administration
Something I found today: Maybe it can help you:
communities.bentley.com/.../188105.aspx
Hi Frank et all,
I have never had any problems getting the tags from the elements generated by inRoads!
My "problem" is; I'd like to use tags IF the data will then be shown in the "Element inspector". But it doesn't automatically show. Some kind of Bentley-weirdo-o-magic routine is making the inRoads tag data show, but not the one I add to my elements. So, unless someone from Bentley steps up with some code, it's gonna be datablocks from here on out.. (on this project)
:)
Torben,
I am thoroughly confused as to what data you are adding and what you expect to see in the Element Information tool. There has been discussion of Tags, XAttributes, and User Data Linkages (I am guessing this is what you imply by datablock). All of these are methods for adding non graphic information to elements. Here is my review of the pros and cons.
Tags: public accessible data that you can experiment with through the tools in MicroStation before committing to programming. You need to have a Tag Definition in the file then add tags to each element that needs to hold the information.
XAttributes: MDL (C++ ) only data. You request an ID from Bentley and store your information related to an element.
We will report that there is information but not what is in the information.
User Data: MDL and VBA. You request an ID from Bentley and then you store your data on the element. You (the developer) are the only one that knows the data format. For Element Information we will just report the hex view of the bits.
Now what you are seeing in Element Information are some special handled data that we do not have a public api for at this time. To learn more about this data I would suggest that you review i-models and the business data that can be attached to the graphics.
Hope this clarifies the ways non graphic data can be held in DGN files. If you need more clarification feel free to contact me.
Rgds,
mark anderson [Bentley]
Visit me at https://communities.bentley.com/communities/other_communities/bentley_innovation/default.aspx
Thanks Mark,
If you are confused, then no wonder I am by all this terminology! ;)
But to clarify (or add to the confusion):
I am reading tag elements from a DGN generated by inRoads.This DGN also displays the same - or a copy of - the data available in the tags in the element inspector. Probably using this special not public API thingy you mention. I wondered if I could display MY data the same way - but I understand that I cannot.
I am storing "userdata" elements, that really is just a big lump of data, a "datablock" (thats what its called in the help files) on elements. together with this "ID from Bentley". I am using the "AddUserAttributeData" funkction together with a made up ID, and the datablock.
(We only use my program inhouse, and I name my datablocks so I can clearly identify them, and also I need to use more than one datablock per element. But I promise to at some point get a few of these IDs! I can clearly understand why - especially when I begin to dominate the entire world ;)
Thanks,/Torben