Hi All,
I am now have a C# addin on top of Microstation EC, my addin now can read all the ECproperties from the DgnECInstance,
but i can't tell the property belong to which group, when check the instance properties with Microstation we can see the property groups as below,
I need to know the property belongs to which group or category, "General", "Geometry", "Extended", "Raw Data" , "Groups"?
is there any api can get the properties group name?
thanks,
Rick
Hi Rick,
I am not sure about how to do in API, but I recall when EC schema is created manually, the split into groups is done using an attribute Category applied to a particular class. So I guess in API you have to query whether Category attribute is defined for every EC class and when it exists, to query its Name and Display Label.
With regards,
Jan
Bentley Accredited Developer: iTwin Platform - AssociateLabyrinth Technology | dev.notes() | cad.point
One more note: When I thought about Category attribute, I have realized it would be probably not applied to the whole class usually, but to individual class properties. In such case one class in EC schema by will be split into several groups in UI when displayed.
Regards,
Jan Šlegr said:In such case one class in EC schema by will be split into several groups in UI
Can you give an example? I searched the delivered ECSchema XML files and found thousands of instances of 'category', but it's not clear which of those thousands would apply to the UI.
It would be helpful if Bentley Systems could provide an overview of ECSchemas, with a description of such details. I heard that Makai Smith was working on such an overview, but nothing has materialised.
Regards, Jon Summers LA Solutions
Hi Jon,
Jon Summers said:Can you give an example?
Very simple example attached. No advanced Category configuration (priorities...) used, only "split EC class properties to UI groups".
Jon Summers said:It would be helpful if Bentley Systems could provide an overview of ECSchemas, with a description of such details.
I agree, but it has never happened. I guess I understand and tested myself about 50% of custom attributes, but not sure whether I use them correctly.
EC UI groupping.zip
thanks Jan and Jon for the reply, I need to get the property category wiht api, so i can group properties on the ecclass instance.
Rick cheng said:I need to get the property category wiht api, so i can group properties on the ecclass instance.
is it a summary of the discussion or a question?
I would take it as a question, and hope somebody can help to get an solution from API perspective. if no api at all, i am ok to close the discussion.
Rick cheng said:somebody can help to get an solution from API perspective
I am very sure there is the solution (despite I don't know the answer), because in fact it's usually not possible to define complex useful schema without using attributes.
Rick cheng said:if no api at all, i am ok to close the discussion
Maybe it's right idea, because your original question "how to obtain group name" was mostly answered: The "group name" is stored as Category attribute. To increase an attention, you now can try to create a new question "How to access attributes (e.g. Category) assigned to EC properties".
Answer Verified By: Rick cheng
Rick cheng said:to get an solution from API perspective
In C++ API documentation I see a method GetCustomAttribute, so maybe you can try to identify similar method in NET API.
good ideal, thanks,