Disabling DROPGEOM

Disabling DROPGEOM

Kyudos
Collaborator Collaborator
20,575 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,576 Views
63 Replies
Replies (63)
Message 41 of 64

chungenlin45254
Observer
Observer

Hi Kyudos! Is there any posibility to have a 2012 compatible version? 🙏

0 Likes
Message 42 of 64

Kyudos
Collaborator
Collaborator

I can't build it without the ObjectARX 2012 SDK - and I can't find a working download link. It doesn't appear to be on AutoDesk's servers anymore.

 

If you can find a link I can make it.

0 Likes
Message 43 of 64

Alexander.Rivilis
Mentor
Mentor

https://download.autodesk.com/esd/objectarx/2012/ObjectARX_2012_Win_64_and_32Bit.exe

Відповідь корисна? Клікніть на "ВПОДОБАЙКУ" цім повідомленням! | Do you find the posts helpful? "LIKE" these posts!
Находите сообщения полезными? Поставьте "НРАВИТСЯ" этим сообщениям!
На ваше запитання відповіли? Натисніть кнопку "ПРИЙНЯТИ РІШЕННЯ" | Have your question been answered successfully? Click "ACCEPT SOLUTION" button.
На ваш вопрос успешно ответили? Нажмите кнопку "УТВЕРДИТЬ РЕШЕНИЕ"


Alexander Rivilis / Александр Ривилис / Олександр Рівіліс
Programmer & Teacher & Helper / Программист - Учитель - Помощник / Програміст - вчитель - помічник
Facebook | Twitter | LinkedIn
Expert Elite Member

0 Likes
Message 44 of 64

Kyudos
Collaborator
Collaborator

Thanks Alexander - I tried several of your other links (in other posts) and none of them seemed to be active!

0 Likes
Message 45 of 64

Alexander.Rivilis
Mentor
Mentor

@Kyudos 

Some years ago link begin with http: and now begin with https: 

Відповідь корисна? Клікніть на "ВПОДОБАЙКУ" цім повідомленням! | Do you find the posts helpful? "LIKE" these posts!
Находите сообщения полезными? Поставьте "НРАВИТСЯ" этим сообщениям!
На ваше запитання відповіли? Натисніть кнопку "ПРИЙНЯТИ РІШЕННЯ" | Have your question been answered successfully? Click "ACCEPT SOLUTION" button.
На ваш вопрос успешно ответили? Нажмите кнопку "УТВЕРДИТЬ РЕШЕНИЕ"


Alexander Rivilis / Александр Ривилис / Олександр Рівіліс
Programmer & Teacher & Helper / Программист - Учитель - Помощник / Програміст - вчитель - помічник
Facebook | Twitter | LinkedIn
Expert Elite Member

0 Likes
Message 46 of 64

Kyudos
Collaborator
Collaborator

@chungenlin45254 Untested, but should work.

Message 47 of 64

chungenlin45254
Observer
Observer

sorry for replying so late!

 

I've tried to install it but it says the following,

"disabledragdrop.arx is incompatible with this version of AutoCAD.
AcRxDynamicLinker failed to load "

 

I've found some other versions of ObjectARX SDK provided by Alexander in the link below.

Some of them are also compatible with autocad 2012. I'm not sure if this will help.

 

Thank you so much.

0 Likes
Message 48 of 64

Kyudos
Collaborator
Collaborator
I don't have a 2012 version of AutoCAD, so I can't really test this I'm afraid. Did you try both the debug and release versions?
0 Likes
Message 49 of 64

chungenlin45254
Observer
Observer
I'm afraid so.
I've tried both the debug and release versions and they all failed to load...
0 Likes
Message 50 of 64

CDM2424
Explorer
Explorer
Thanks for doing this! However, it doesn't appear to work. I had used it on 2020, and it worked flawlessly. Now with the 2023 version of CAD and the 2023 version of your arx, it doesn't seem to work at all. No errors in the command line either.
0 Likes
Message 51 of 64

Kyudos
Collaborator
Collaborator

Hmmm...it works fine here (in Version T.181.0.0 AutoCAD 2023.1.4).

 

There's not much that can go wrong with it really, so I'm not sure what to suggest.

 

What do you see on the command line when you APPLOAD it? It should look like this:

 

Command: APPLOAD
Available commands:
DISABLEDD : disable drag and drop
ENABLEDD  : enable drag and drop
ENABLEDO : enable drag override
DISABLEDO  : disable drag override
DisableDragDrop.arx successfully loaded.
0 Likes
Message 52 of 64

CDM2424
Explorer
Explorer

Appreciate the fast response.

I see the same thing.

 

Command: APPLOAD
Available commands:
DISABLEDD : disable drag and drop
ENABLEDD : enable drag and drop
ENABLEDO : enable drag override
DISABLEDO : disable drag override
DisableDragDrop2023.arx successfully loaded.

 

My CAD version.

 

CDM2424_0-1710887076903.png

 

0 Likes
Message 53 of 64

Kyudos
Collaborator
Collaborator

Does it make a difference if you load it into the vanilla AutoCAD that underlies your Civil 3D? (I don't have C3D on my machine ATM so can't test it)

0 Likes
Message 54 of 64

CDM2424
Explorer
Explorer
It doesn't work in vanilla either.
0 Likes
Message 55 of 64

Kyudos
Collaborator
Collaborator

Neither of the functions?

0 Likes
Message 56 of 64

CDM2424
Explorer
Explorer
Ok.... So.... I'm dumb. I forgot that I had previously added the command to "acaddoc.lsp"... I did this a while ago and this made me thing the commands were already enabled on startup straight from the arx.
I added it back as a startup command, and all is well. Thank you so much for your quick replies and for helping me through my own stupidity haha.
0 Likes
Message 57 of 64

Kyudos
Collaborator
Collaborator

Haha! No problem. I find I often use the "ask on the forum" technique to solve problems. That is, you bash your head against something for hours/days, then ask on a forum about it, and subsequently and immediately solve it and have to answer your own forum question 😉 

Message 58 of 64

CDM2424
Explorer
Explorer
Haha, so true. I knew it had to be a simple solution. Sometimes I just get in my own way. Thanks again for all your help!!
0 Likes
Message 59 of 64

jan.bartlomiejczyk
Community Visitor
Community Visitor

Hi, i know that this forum is for AutoCAD users, but in my new work i've got GstarCAD on my computer and very anoying problems with DROPGEOM . Gstar is not working with ARX files but GRX instead. I saw this video https://www.youtube.com/watch?v=HFAHoAOd1YY about changing ARX to GRX and it looks easy to do but not for an Architect who doesnt know anything about programing :D. Could you please help me and post the GRX file by chance?

0 Likes
Message 60 of 64

jan.bartlomiejczyk
Community Visitor
Community Visitor

Hi, i know that this forum is for AutoCAD users, and i used Autocad for years, but now in my new work i've got GstarCAD and anoying problems with DROPGEOM. Gstar is not working with ARX but the GRX instead. I saw this video https://www.youtube.com/watch?v=HFAHoAOd1YY about how to change ARX to GRX and it looks easy but not for an Architect who doesnt know anything about programing :D. Could you please help me and post the GRX file by chance? 

0 Likes