Disabling DROPGEOM

Disabling DROPGEOM

Kyudos
Collaborator Collaborator
20,568 Views
63 Replies
Message 1 of 64

Disabling DROPGEOM

Kyudos
Collaborator
Collaborator

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)
20,569 Views
63 Replies
Replies (63)
Message 61 of 64

StefanSchwarz
Participant
Participant

AutoCAD 23021 says:

disabledragdrop.arx ist nicht kompatibel mit dieser Version von AutoCAD

0 Likes
Message 62 of 64

StefanSchwarz
Participant
Participant

works!

0 Likes
Message 63 of 64

Swiss31
Observer
Observer

Thanks a lot, great patch!

0 Likes
Message 64 of 64

Kyudos
Collaborator
Collaborator

Just my periodic rebuilds!