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
Rick cheng said:I need to know the property belongs to which group or category, "General", "Geometry", "Extended", "Raw Data" , "Groups"?
"General", "Geometry", "Extended" and so on, they are just categories of the customAttribute in Microstation.
you can utilize the following code to retrive CategoryInformation, and check its displayLabel.1. First of all, you should reference Bentley.ECObjects3.dll.2. Common PropertyCategories are listed below:
{ Miscellaneous = 0, General = 1, Extended = 2, RawData = 4, Geometry = 8, Groups = 16, Material = 32, Relationships = 64, All = -1, }
3. Retrive CategoryInformation:
string displayLabel; int categoryPriority; bool categoryDefaultExpand; string categoryInformation = ECPropertyPane.GetCategoryInformation(out displayLabel, out categoryPriority, out categoryDefaultExpand, property, property.ClassDefinition);
4. That's all, hope it can be of some help.
Answer Verified By: Rick cheng
Frank Zeng said:you can utilize the following code
Thanks for sharing this!
As I can see in the assembly, GetCategoryInformation is single-purpose wrapper around general GetCustomAttributes method.
Regards,
Jan
Bentley Accredited Developer: iTwin Platform - AssociateLabyrinth Technology | dev.notes() | cad.point
thanks Frank for your help,that's what i am looking for.