Hi,
I have a custom entity deriving from an AcDbEntity and I created a COM wrapper to add custom properties in the property palette (OPM). My question is how to hide properties from the parent class? Per example, if my custom entity is deriving from AcDbText, I don't want the property palette display the "Text height" property. Is there a way to define that in my wrapper? Or maybe it's possible to hide an entire category of properties?
Best regards,
Jonathan
You can implement
IOPMPropertyExtension::ShowProperty()
in your ActiveX wrapper to control visibility of specific properties.
Hi Owen,
Thank you for your reply. I already tried to implement this method, but it seems it's possible to control the visibility of my custom properties and all properties of General category (except Color, Layer and Visible). When I put a breakpoint in the showProperty method, the DISPID I received are
"mine" and followings numbers : 1302, 1281, 1282, 1283, 1299, 1300, 1301, 1399.
What I'm doing wrong? (I want to control visibility of AcDbText properties)
Regards,
Jonathan
It sounds like you derived your interface from IAcadText. If you don't want to expose text properties at all, you should derive from IAcadEntity instead.
No, I check one more time and I don't derived my interface from IAcadText. Here is the declaration of my interface:
: public CComObjectRootEx<CComSingleThreadModel> , public CComCoClass<...> , public ISupportErrorInfo , public IAcadEntityDispatchImpl<...> , public IOPMPropertyExtensionImpl<...> , public ICategorizeProperties2Impl<...> , public IOPMPropertyExpander , public IPerPropertyDisplayImpl<...>
In my idl file I have:
interface IMyCustomEntity : IAcadEntity
I search for IAcadText in my entire solution and no results were found.
Any idea?