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
18156 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 21 of 63
Kyudos
in reply to: ArchD

@Anonymous 

 

Due to requests I've rebuilt this for ACAD 2020, including both disabling methods:

 

DISABLEDD : disable drag and drop
ENABLEDD : enable drag and drop
ENABLEDO : enable drag override
DISABLEDO : disable drag override

 

Enjoy!

Message 22 of 63
Anonymous
in reply to: Kyudos

Never have I been so happy to see the "action denied" mouse icon. Thanks so much for this.

 

Regards,

 

Tom

Message 23 of 63
troma
in reply to: Kyudos


@Kyudos wrote:

Well, if you aren't interested in how the code works, you can simply load up one of the included ARX files and use the commands to enable or disable drag and drop as you like.


@Kyudos 

Very well for you to say "simply load up the file".

Not so simple for some of us! 😁 I've had this in the back of my head for four years, wondering how I could get it loaded.

Here's what worked for me, in case I can help anyone else here.

 

I downloaded and unzipped your file. I finally found two files with .arx extension; one in the Debug_Acad folder and one in the Release_Acad folder. I have no idea why there are two versions of this .arx file or why there are so many other random files in the parent directory.

I used the Appload command and selected the .arx file in the Release_Acad folder.

When that loaded, I typed the DISABLEDD command and tested it. Bingo it worked! You're a genius and I will be forever grateful!

 

This is working for me in Civil 3D 2019.

 

Next I am going to test what happens if I move the .arx file out of the location with all the other random stuff to a network drive to share with my coworkers. Then I will add it in to the startup suite.


Mark Green

Working on Civil 3D in Canada

Message 24 of 63
Kyudos
in reply to: troma

The 'random' files are the code and solution files needed to build the ARX files you found from scratch. This is the ObjectARX forum after all! But indeed, the only file you 'need'' for this is the ARX - and I'd say if that is all you are after, use the release version, rather than the debug one. The rest is just for code-monkeys like me 🙂

Message 25 of 63
Anonymous
in reply to: Kyudos


@Kyudos wrote:

The 'random' files are the code and solution files needed to build the ARX files you found from scratch. This is the ObjectARX forum after all! But indeed, the only file you 'need'' for this is the ARX - and I'd say if that is all you are after, use the release version, rather than the debug one. The rest is just for code-monkeys like me 🙂


I've been searching for a solution to this issue for months, and just as I find this thread, I realize that I just upgraded to 2021, rendering your arx outdated. Would you mind explaining how to update this file for new releases? I have a feeling that yours will remain the only solution for a long time and perhaps that info will save you a bit of headache in the years to come. 

Message 26 of 63
Kyudos
in reply to: Anonymous

Assuming nothing related to the calls / methods I've used has changed internally, you would just need to rebuild the ARX against the 2021 ObjectARX SDK.

 

If that makes sense to you, it's a very quick and easy job. If it sounds like gobbledegook...not so much! (i.e., I don't know how much help you need 🙂 )

Message 27 of 63
Anonymous
in reply to: Kyudos

I've never worked with ARX files beyond loading a few. I would need some direction on how to rebuild the file. 

 

I found this article for creating an ARX app from scratch, but I'm not sure which steps would be necessary/ relevant to rebuilding an existing file. I assume I need Visual Studio and the ARX SDK, but I'm not sure where to go from there. 

https://www.digitalcoastsoftware.com/how-to-create-an-arx-app-simple-step-by-step/2018/6/29/how-to-c...

 

If you know of a more relevant tutorial, that would get me pointed in the right direction. 

 

Thank you.

Message 28 of 63
moogalm
in reply to: Anonymous


@Anonymous wrote:

I've never worked with ARX files beyond loading a few. I would need some direction on how to rebuild the file. 

 

I found this article for creating an ARX app from scratch, but I'm not sure which steps would be necessary/ relevant to rebuilding an existing file. I assume I need Visual Studio and the ARX SDK, but I'm not sure where to go from there. 

https://www.digitalcoastsoftware.com/how-to-create-an-arx-app-simple-step-by-step/2018/6/29/how-to-create-an-arx-app-step-by-step

 

If you know of a more relevant tutorial, that would get me pointed in the right direction. 

 

Thank you.


Go through - 
https://www.youtube.com/watch?v=bTgmsp38kQc

 

Message 29 of 63
Kyudos
in reply to: Anonymous

Well, since I'll have to get 2021 sorted soon anyway, I decided to just bite the bullet and rebuild this.

 

Find the 2021 version attached.

 

Acquiring and setting up Visual Studio and the SDKs etc. is a lot of effort and hardly worth it if you aren't a developer or a very keen tinkerer (but don't let me discourage you, if you're interested!)

 

Enjoy!

Message 30 of 63
Anonymous
in reply to: Kyudos

Awesome, this is much appreciated. I was weighing whether or not I could get away with a 20+ GB download on a work computer haha. I still might download Visual Studio at home to push my boundaries, but I'm glad it can be at my leisure now. 

 

Thanks again  👍🏻

Message 31 of 63
codee
in reply to: Anonymous

I would also love this in 2020

Message 32 of 63
Kyudos
in reply to: codee

See message 21 in the thread for 2020 version

 

( Here! )

 

🙂

Message 33 of 63
mzarchtech
in reply to: Kyudos

Hi Kyudos, any chance of a 2013 compatible version?

Message 34 of 63
Kyudos
in reply to: mzarchtech

Well...I can build it, but I can't test it 🙂

 

Hope it works.

 

 

Message 35 of 63
mzarchtech
in reply to: Kyudos

It works perfectly! Awesome! Thanks so much.

Autodesk should have implemented something like this from day 1: a dropgeom toggle, like we can toggle osnaps ortho, selection cycling, etc.

Message 36 of 63
Major_CAD
in reply to: Kyudos

Thank you so much!
Absolutely life saver!

You are a HERO! 😉
Message 37 of 63
shelmer
in reply to: Kyudos

Hi, Thanks for this.  We had a surface in Civil 3D that was accidentally moved with DROPGEOM today.  I may look to incorporate this as a preventative measure.  I have Sincpac, and it gives me a warning if DROPGEOM is run, but prevention is even better.  

Message 38 of 63
aeichnerMBLN5
in reply to: Kyudos

You are a hero. Autodesk should invest in a subscription to you 🙂 it would be the best decision they have made since 2010.

Message 39 of 63
Kyudos
in reply to: Kyudos

Hey AutoDesk guys - this is a perennially popular post....just sayin'...🤔

Message 40 of 63
Kyudos
in reply to: Kyudos

Just in case anyone wants/needs an updated version...

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