ObjectARX
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

How to hide properties from inherited entity class in property palette (OPM) ?

5 REPLIES 5
Reply
Message 1 of 6
maisoui
585 Views, 5 Replies

How to hide properties from inherited entity class in property palette (OPM) ?

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 

 

--
Jonathan
Tags (3)
5 REPLIES 5
Message 2 of 6
owenwengerd
in reply to: maisoui

You can implement 

IOPMPropertyExtension::ShowProperty()

in your ActiveX wrapper to control visibility of specific properties.

--
Owen Wengerd
ManuSoft
Message 3 of 6
maisoui
in reply to: owenwengerd

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

 

--
Jonathan
Message 4 of 6
owenwengerd
in reply to: maisoui

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.

--
Owen Wengerd
ManuSoft
Message 5 of 6
maisoui
in reply to: owenwengerd

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?

 

--
Jonathan
Message 6 of 6
owenwengerd
in reply to: maisoui

Sorry, I'm out of ideas.

--
Owen Wengerd
ManuSoft

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Autodesk Design & Make Report

”Boost