Introduction
With Update 10.16, we introduced groups for selecting items in the Reports->Included Items tab->ItemTypes property.
With Update 10.17, we have extended it for the Condition Editor property picker. When you click on the "Pick property.." drop-down of the "Condition Editor" dialog, a pop-up appears with groups of Items like "Item Types", "Dgn Elements", "File" etc., & the item list belongs to the selected group. You can introduce custom group by extending IClassPickerContentProvider.
Treatment for custom classes
If you have instances of your own ECSchema classes, those will be listed under the "Domain Properties" group. For e.g. I have opened plant model (*.i.dgn) in MicroStation U17, I see all plant EC objects under the "Domain Properties" group. Earlier they were listed in the "Element" group.
Have you encountered a case where you couldn't locate the property but it was available with previous control?
Please report such problems. Also, you can still go back to the previous control by setting "UseNewPropertypicker=0".
SDK Sample
If you want to see your own group, you need to implement IClassPickerContentProvider as mentioned in the blog [MSCE U16 C#] Create custom group for "Include Items" in MicroStation's Report. Once you register an instance of IClassPickerContentProvider, you can see a custom group for both Report and Condition Editor property picker.
Changes in IClassPickerContentProvider wrt U17
There are a few non-breaking changes in the interface.
1. Constructor that takes DgnECHostType. We have introduced a new constructor that accepts DgnECHostType, you can access it via the "HostType" property.
/*-------------------------------------------------------------------------------------------------------+ * Constructor +---------------+---------------+---------------+---------------+---------------+----------------+-------*/ IClassPickerContentProvider (DgnPlatformNET::DgnEC::DgnECHostType hostType): m_includeAbstract(false), m_includeRefBaseClasses (false) /*-------------------------------------------------------------------------------------------------------+ * HostType +---------------+---------------+---------------+---------------+---------------+----------------+-------*/ property DgnPlatformNET::DgnEC::DgnECHostType HostType {virtual DgnPlatformNET::DgnEC::DgnECHostType get () { return m_hostType;}}
2. You can identify system providers via ProviderType property. Your custom provider will return ProviderType as "NonSystem = -1".
/*-------------------------------------------------------------------------------------------------------+ * System providers +---------------+---------------+---------------+---------------+---------------+----------------+-------*/ public enum class SystemContentProvider : int { NonSystem = -1, ItemType = 0, Element = 1, File = 2, Model = 3, Reference = 4, View = 5, Level = 6, DesignLinks = 7, DomainProperties = 8, DgnGeneral = 9 }; /*-------------------------------------------------------------------------------------------------------+ * System Provider Type +---------------+---------------+---------------+---------------+---------------+----------------+-------*/ property SystemContentProvider ProviderType { SystemContentProvider get () { return m_sysProvider; }}
3. If you have a provider that you don't want to see in the display rule condition editor, you can set the protected variable "m_skipDisplayRules" to "True". The default value for this variable is false.
/*-------------------------------------------------------------------------------------------------------+ * If true, this provider will not be listed in display rules +---------------+---------------+---------------+---------------+---------------+----------------+-------*/ property bool SkipDisplayRules { bool get () { return m_skipDisplayRules; }}