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

Disabling DROPGEOM

57 REPLIES 57
SOLVED
Reply
Message 1 of 58
Kyudos
14932 Views, 57 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)
57 REPLIES 57
Message 41 of 58
chungenlin45254
in reply to: Kyudos

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

Message 42 of 58
Kyudos
in reply to: chungenlin45254

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.

Message 43 of 58
Alexander.Rivilis
in reply to: Kyudos

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

Message 44 of 58
Kyudos
in reply to: Alexander.Rivilis

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

Message 45 of 58
Alexander.Rivilis
in reply to: Kyudos

@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

Message 46 of 58
Kyudos
in reply to: Kyudos

@chungenlin45254 Untested, but should work.

Message 47 of 58
chungenlin45254
in reply to: Kyudos

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.

Message 48 of 58
Kyudos
in reply to: chungenlin45254

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?
Message 49 of 58
chungenlin45254
in reply to: Kyudos

I'm afraid so.
I've tried both the debug and release versions and they all failed to load...
Message 50 of 58
CDM2424
in reply to: Kyudos

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.
Message 51 of 58
Kyudos
in reply to: CDM2424

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.
Message 52 of 58
CDM2424
in reply to: Kyudos

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

 

Message 53 of 58
Kyudos
in reply to: Kyudos

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)

Message 54 of 58
CDM2424
in reply to: Kyudos

It doesn't work in vanilla either.
Message 55 of 58
Kyudos
in reply to: CDM2424

Neither of the functions?

Message 56 of 58
CDM2424
in reply to: Kyudos

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.
Message 57 of 58
Kyudos
in reply to: CDM2424

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 58
CDM2424
in reply to: Kyudos

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!!

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

Post to forums  

Autodesk Design & Make Report

”Boost