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

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

maisoui
Advocate Advocate
797 Views
4 Replies
Message 1 of 5

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

maisoui
Advocate
Advocate

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
0 Likes
Accepted solutions (1)
798 Views
4 Replies
Replies (4)
Message 2 of 5

Anonymous
Not applicable
0 Likes
Message 3 of 5

maisoui
Advocate
Advocate

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

--
Jonathan
0 Likes
Message 4 of 5

Balaji_Ram
Alumni
Alumni
Accepted solution

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

0 Likes
Message 5 of 5

maisoui
Advocate
Advocate

Hi Balaji,

 

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

 

Regards,

Jonathan

 

--
Jonathan
0 Likes