Message 1 of 3
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
I try to redefine action for double click to entity, but only for some entity types. Eg. for attribute I want to run standard Autodesk dialog. But I am not able to run th acedCommand function inside beginDoubleClick reactor function.
This code doesnot work, and error is -5001 (other error).
class CMajAcEditorReactor : public AcEditorReactor
{......}
void CMajAcEditorReactor::beginDoubleClick(const AcGePoint3d &clickPoint)
{
CMajAc::SetVarInt(L"DBLCLKEDIT", 0);
acutPrintf(L"\nBegin Double click");
ads_name vybrEntity;
double *ptPick = asDblArray(clickPoint);
if(acedSSGet(L"_:n", ptPick, NULL, NULL, vybrEntity) == RTNORM) //:n - umožní výběr subentity
{
ads_name entita;
acedSSName(vybrEntity, 0, entita);
acedSSFree(vybrEntity);
int err = acedCommandS(RTSTR, _T("EATTEDIT"), RTENAME, entita, RTNONE);
return;
}
}
If I normally select the attribut (or block) it work properly (almost identical code):
void Pokus()
{
ads_name vybrEntity;
if(acedSSGet(L"_:n", NULL, NULL, NULL, vybrEntity) != RTNORM) //:n - umožní výběr subentity
{
acedSSFree(vybrEntity);
return;
}
ads_name entita;
acedSSName(vybrEntity, 0, entita);
acedSSFree(vybrEntity);
acedCommandS(RTSTR, _T("EATTEDIT"), RTENAME, entita, RTNONE);
}
Solved! Go to Solution.