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

How to display values other than double in OPM when using element grouping?

4 REPLIES 4
SOLVED
Reply
Message 1 of 5
maisoui
605 Views, 4 Replies

How to display values other than double in OPM when using element grouping?

Hi,

 

I created a COM wrapper to display properties of my custom entity property palette. My entity contains several points and for each point, you can define a string. So I use GetGroupCount and GetElementGrouping to display a property with a spin control to go to previous or next point (similar to vertex property of AcDbPolyline). So for each point, it will display X, Y and Z values of the position and normally the text. But, it seems like when I'm using element grouping, only double values are understood. I tried to display string or bool, but it doesn't work:

 

varOut->vt = VT_BOOL;
varOut->boolVal = TRUE;

or

varOut->vt = VT_BSTR;
varOut->bstrVal = ::SysAllocString(_T("TEST"));

or

BSTR str = T2BSTR(_T("TEST"));
*varOut = CComVariant(str);

 Does anyone have a suggestion?

 

Regards,

--
Jonathan
4 REPLIES 4
Message 2 of 5
LE3
Advocate
in reply to: maisoui
Message 3 of 5
maisoui
in reply to: LE3

Yes, it could have been. Problem, this sample only displays double values...

--
Jonathan
Message 4 of 5
Balaji_Ram
in reply to: maisoui

Hi Jonathan,

 

Sorry, the "IOPMPropertyExpander" is only capable of handling doubles.

 

You will find this in the documentation on "IOPMPropertyExpander" :

 

<<<

Note As of this writing, this interface is used only for point properties whose type is a VARIANT that contains a SAFEARRAY of doubles.

>>>

 

Regards,

Balaji



Balaji
Developer Technical Services
Autodesk Developer Network

Message 5 of 5
maisoui
in reply to: Balaji_Ram

Hi Balaji,

 

Sorry, I missed that. Situation is now clear (I will try to find a workaround). Thank you.

 

Regards,

Jonathan

 

--
Jonathan

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

Post to forums  

Autodesk Design & Make Report

”Boost