Turn off Dialog Boxes for Commands

Turn off Dialog Boxes for Commands

Anonymous
Not applicable
7,103 Views
11 Replies
Message 1 of 12

Turn off Dialog Boxes for Commands

Anonymous
Not applicable

Is it possible to disable dialog boxes / pop-ups for commands?  More specifically, can you disable the dialog box from popping when using the edit surface swap edge command?  It is pretty annoying when cleaning up a huge surface and you accidently click on a contour line instead of just ignoring it a box pops up and says "no edge at picked location".  Autodesk, thanks for pointing out my mistake everytime, you remind me of my mother-in-law...

 

Anybody know if this is possible?

 

Thanks,
Mark

0 Likes
7,104 Views
11 Replies
Replies (11)
Message 2 of 12

Pointdump
Consultant
Consultant

Mark,

 

This one?

 

Edge1.png

 

Dunno. The only thing I can suggest is to turn off your border and everything but triangles.

 

Dave

Dave Stoll
Las Vegas, Nevada

EESignature

64GB DDR4 2400MHz ECC SoDIMM / 1TB SSD
NVIDIA Quadro P5000 16GB
Windows 10 Pro 64 / Civil 3D 2027
0 Likes
Message 3 of 12

Joe-Bouza
Mentor
Mentor
Have you tried FILEDIA=0?
Set Panama to auto hide
Optional- turn auto build off: I know that defeats your purpose, but will eliminate any pop ups until rebuild occurs

Joe Bouza
Did you find this post helpful? Feel free to Like this post.
Did your question get successfully answered? Then click on the ACCEPT SOLUTION button.

EESignature

Message 4 of 12

Pointdump
Consultant
Consultant

Joe,

 

"Set Panama to auto hide"

 

But how will ships find the canal to be able to cross over?

 

Dave

Dave Stoll
Las Vegas, Nevada

EESignature

64GB DDR4 2400MHz ECC SoDIMM / 1TB SSD
NVIDIA Quadro P5000 16GB
Windows 10 Pro 64 / Civil 3D 2027
Message 5 of 12

Joe-Bouza
Mentor
Mentor

Its confusing enought that you have tp head west to get to the Atlantic and East to the pacific

 

canal.PNG

Joe Bouza
Did you find this post helpful? Feel free to Like this post.
Did your question get successfully answered? Then click on the ACCEPT SOLUTION button.

EESignature

Message 6 of 12

jmayo-EE
Mentor
Mentor

If this is the issue Dave then the OP should just be able to use a crossing window selection instead of a single click selection. This will find the triangles under borders and contours.

John Mayo

EESignature

0 Likes
Message 7 of 12

AlmasSuljevic
Autodesk Support
Autodesk Support

Hi Mark,

 

I don't think it's possible to ignore this dialog, but there may be a good way to workaround it. If you select your surface, right-click on it and select "Isolate Selected Objects" you may be able to remove all that noise and just work on your surface triangles. Once done, just repeat the procedure and "End Isolation". Not quite what you are looking for an answer but since it acts as designed this may be useful. 

 

Let me know if it works. 



Almas Suljevic
Product Support Specialist
Autodesk Global Subscription and Support
Autodesk, Inc.

Please click on "Accept as Solution" if post helped you resolve the issue.
0 Likes
Message 8 of 12

Anonymous
Not applicable

Thanks for all of the suggestions.  Pointdump, yes that is the one. 

 

I thought I was on to something with the cmddia variable but that doesn't work either.  Sounds like it can be reduced but not made to go away. 

 

I wish it was more like other commands where if you select the wrong object it just says ".. filtered out.." in the command line.

 

Thanks again.

0 Likes
Message 9 of 12

Jeff_M
Consultant
Consultant

@Anonymous, with a wee bit of .NET programming this can be done. In fact, I have a solution which doesn't force you to actually pick the TIN line to swap, just pick something on the surface and the nearest TIN line will be attempted to swap. If it can't be swapped it is reported at the command line and let's you continue on. If you wish I will share the code, but not a working DLL (it's part of a larger tool set, not a standalone project.

Jeff_M, also a frequent Swamper
EESignature
Message 10 of 12

Anonymous
Not applicable
Jeff,

Sure, I would appreciate that. I do a little .net on the side so I should
be able to get it working.

Thanks
0 Likes
Message 11 of 12

Jeff_M
Consultant
Consultant

OK, here's the c# class:

using Autodesk.AutoCAD.ApplicationServices;
using Autodesk.AutoCAD.DatabaseServices;
using Autodesk.AutoCAD.EditorInput;
using Autodesk.AutoCAD.Runtime;
using Autodesk.Civil;
using Autodesk.Civil.DatabaseServices;
using Autodesk.Civil.DatabaseServices.Styles;
using System;

namespace Civil3D_Misc_Commands.SurfaceTools
{
    public class SwapEdge
    {
        [CommandMethod("SwapEdgeToo")]
        public void swapedgetoo()
        {
            Document doc = Application.DocumentManager.MdiActiveDocument;
            Editor ed = doc.Editor;
            Database db = doc.Database;
            PromptEntityOptions eOpts = new PromptEntityOptions("Select Surface: ");
            eOpts.SetRejectMessage("...not a Tin Surface, try again.");
            eOpts.AddAllowedClass(typeof(TinSurface), true);
            PromptEntityResult eRes = ed.GetEntity(eOpts);
            if (eRes.Status != PromptStatus.OK)
                return;
            eOpts.Message = "\n..Select edge to swap: ";
            var surfId = eRes.ObjectId;
            using (Transaction tr = db.TransactionManager.StartTransaction())
            {
                var s = (TinSurface)surfId.GetObject(OpenMode.ForRead);
                var style = (SurfaceStyle)s.StyleId.GetObject(OpenMode.ForRead);
                var ds = style.GetDisplayStylePlan(SurfaceDisplayStyleType.Triangles);
                if (ds.Visible == false)
                {
                    ed.WriteMessage("\n Surface is not displaying Triangles, exiting...");
                    return;
                }
            }
            eRes = ed.GetEntity(eOpts);
            while (eRes.Status == PromptStatus.OK)
            {
                if (eRes.ObjectId != surfId)
                {
                    ed.WriteMessage("...not the same Surface!");
                    continue;
                }
                using (Transaction tr = db.TransactionManager.StartTransaction())
                {
                    var surf = (TinSurface)eRes.ObjectId.GetObject(OpenMode.ForWrite);
                    var edge = surf.FindEdgeAtXY(eRes.PickedPoint.X, eRes.PickedPoint.Y);
                    try
                    {
                        var surfOp = surf.SwapEdge(edge);
                    }
                    catch (SurfaceException e)
                    {
                        if (e.Message == "CantSwap")
                            ed.WriteMessage("\n Can't swap that edge!");
                    }
                    catch(SystemException e)
                    {
                        ed.WriteMessage("...Something unexpected happened, this is the message:\n {0}", e.Message);
                    }
                    tr.Commit();
                }
                eRes = ed.GetEntity(eOpts);
            }
        }
    }
}
Jeff_M, also a frequent Swamper
EESignature
0 Likes
Message 12 of 12

Anonymous
Not applicable

Thanks Jeff.

 

Mark

0 Likes