Suppress map messages

Suppress map messages

fieldguy
Advisor Advisor
651 Views
1 Reply
Message 1 of 2

Suppress map messages

fieldguy
Advisor
Advisor

I am using civil 3d 2016 x64 and can't get rid of the message shown below.  I was hoping that CMDDIA 0 would only show the message on the command line which would be ok  if that's the best I can get.

I have tried:

"CMDDIA", 0
"CMDECHO", 0
"FILEDIA", 0
"NOMUTT", 1

map_query.PNG

0 Likes
652 Views
1 Reply
Reply (1)
Message 2 of 2

fieldguy
Advisor
Advisor

I'm a little closer.  I thought this was working.

MapApplication acmapapp = HostMapApplicationServices.Application;
Project.ProjectModel myproj = acmapapp.ActiveProject;
Query.QueryModel atsq = myproj.CreateQuery();
atsq.Clear(); atsq.Mode = Constants.QueryType.QueryDraw; // query root Query.QueryBranch qroot = acgis.Query.QueryBranch.Create(); Query.LocationCondition loccond = new acgis.Query.LocationCondition(); loccond.LocationType = Constants.LocationType.LocationCrossing; Point3dCollection atspts = new Point3dCollection(); // window pts in utm atspts.Add(new Point3d(_br_utm.X, _br_utm.Y, 0)); atspts.Add(new Point3d(_br_utm.X, _tl_utm.Y, 0)); atspts.Add(new Point3d(_tl_utm.X, _tl_utm.Y, 0)); atspts.Add(new Point3d(_tl_utm.X, _br_utm.Y, 0)); // boundary Query.PolygonBoundary pb = new Query.PolygonBoundary(atspts); loccond.Boundary = pb; // branch Query.QueryBranch qloc = Query.QueryBranch.Create(); qloc.AppendOperand(loccond); // append branch to root qroot.AppendOperand(qloc); Project.DrawingSet ds = myproj.DrawingSet; ds.AttachDrawing("some dwg file"); atsq.Define(qroot); ObjectIdCollection atslines = new ObjectIdCollection(); atslines = atsq.Execute(ds); ds.DetachDrawing("same dwg file as above"); qroot.Clear(); qloc.Clear(); atsq.Clear(); myproj.Dispose();
// acmapapp.ErrorStack.EntriesCount = 1 at this point (37 object(s) queried from... acmapapp.ErrorStack.Clear(); <-------------------- seems to work acmapapp.Dispose();

But, if I try an UNDO, the message appears.  It is obviously sent somewhere other than ErrorStack. 

  

0 Likes