Disabling DROPGEOM

Disabling DROPGEOM

Kyudos
Advisor Advisor
23,309 Views
64 Replies
Message 1 of 65

Disabling DROPGEOM

Kyudos
Advisor
Advisor

EDIT: For convenience I'm just adding the latest builds to this first post 🙂

 

********

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

 

Accepted solutions (3)
23,310 Views
64 Replies
Replies (64)
Message 61 of 65

StefanSchwarz
Participant
Participant

AutoCAD 23021 says:

disabledragdrop.arx ist nicht kompatibel mit dieser Version von AutoCAD

0 Likes
Message 62 of 65

StefanSchwarz
Participant
Participant

works!

0 Likes
Message 63 of 65

Swiss31
Observer
Observer

Thanks a lot, great patch!

0 Likes
Message 64 of 65

Kyudos
Advisor
Advisor

Just my periodic rebuilds!

 

 

Message 65 of 65

Swiss31
Observer
Observer

THANK YOU VERY MUCH ! VERY HELPFUL 🙂

0 Likes