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

Disabling DROPGEOM

62 REPLIES 62
SOLVED
Reply
Message 1 of 63
Kyudos
18273 Views, 62 Replies

Disabling DROPGEOM

I've found that dealing with OLEDRAGDROP / DROPGEOM as well as grip editing makes the handling for my custom objects unnecessarily complicated.

 

Hence I'm posting my solution to disabling this function for my objects, I don't know if its the best way, but it works.

 

In your AcApDocManagerReactor::documentLockModeChanged handler you can use something like this:

 

if (_tcsicmp(pGlobalCmdName, _T("OLEDRAGDROP")) == 0 || 
_tcsicmp(pGlobalCmdName, _T("DROPGEOM")) == 0 ||
_tcsicmp(pGlobalCmdName, _T("DRAGENTER")) == 0)
{
    // Prevent objects from being dragged
    for (int i = 0; i < aLastSelectionArray.length(); i++)
    {
        AcDbObjectId objId = aLastSelectionArray[i];
	MyObject* pObj = IsMyObject(objId);

        if (pObj != NULL)
        {
            this->veto();
            break;
        }
    }
}
Tags (3)
62 REPLIES 62
Message 61 of 63
StefanSchwarz
in reply to: Kyudos

AutoCAD 23021 says:

disabledragdrop.arx ist nicht kompatibel mit dieser Version von AutoCAD

Message 62 of 63
StefanSchwarz
in reply to: Kyudos

works!

Message 63 of 63
Swiss31
in reply to: Kyudos

Thanks a lot, great patch!

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

Post to forums  

AutoCAD Inside the Factory


Autodesk Design & Make Report