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

OPM IDynamicEnumProperty strange behavior in Acad

3 REPLIES 3
SOLVED
Reply
Message 1 of 4
igor.ivanov
759 Views, 3 Replies

OPM IDynamicEnumProperty strange behavior in Acad

Hi again!

 

My last problem was solved very quikly 🙂 Im continuing migrating my project to ObjectArx 2014. The next problem is in this same custom entity derived from AcDbline. I have some properties for this entity exposed to object property manager in Autocad trough COM, its done using wizrds of ObjectArx2011.

Now I have converted them to work in 2014 and its working except 1 strange behaviour in my combo box custom property. When I move my cursor on the combobox and dropdownlist is displayed and item is preselected (mouse LL button is not pressed down) the  

STDMETHODIMP CConductorConditionEnum2::SetCurrentValueData (IUnknown *pUnk, const VARIANT varData)

is called. I have other code which displays changed values  of this entity in my own Paletteset based on values from OPM and it take some time to calculate them. Now when this function is called every time mouse go over OPM dropdown list it is very slow and it should not be called at all(selection is not done yet). So any solutions?

 

Below is the class def for property:

class ATL_NO_VTABLE CConductorConditionEnum2 :

public CComObjectRootEx<CComSingleThreadModel>,

public CComCoClass<CConductorConditionEnum2, &CLSID_ConductorConditionEnum2>,

public ISupportErrorInfo,

public IDispatchImpl<IConductorConditionEnum2, &IID_IConductorConditionEnum2, &LIBID_BPBPSVLSDYNPROPLib, /*wMajor =*/ 1, /*wMinor =*/ 0>,

public IDynamicEnumProperty,

public ICategorizeProperties,

public IDynamicProperty2

{

 .....

 

igor

 

3 REPLIES 3
Message 2 of 4
Balaji_Ram
in reply to: igor.ivanov

Hi Igor,

 

AutoCAD now has the property preview feature, so the user knows what the change will be for the selection even before it is selected.

 

If you do not want your custom entity to provide such property preview, you can use the "acedIsLivePreviewStarted" method in the "SetCurrentValueData" method and return E_FAIL if the live preview has begun. 

 

Regards,

Balaji



Balaji
Developer Technical Services
Autodesk Developer Network

Message 3 of 4
igor.ivanov
in reply to: Balaji_Ram

What is header and lib for this function, can not find anything in help or oarx headers? Should I use import dll, which dll?

 

thank you

Igor

Message 4 of 4
owenwengerd
in reply to: igor.ivanov

The function is exported from accore.dll, and included in the accore.lib export library. You can declare it as follows:

bool acedIsLivePreviewStarted (void);

 

--
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