<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Suppress map messages in AutoCAD Map 3D Developer Forum</title>
    <link>https://forums.autodesk.com/t5/autocad-map-3d-developer-forum/suppress-map-messages/m-p/8126554#M611</link>
    <description>&lt;P&gt;I'm a little closer.&amp;nbsp; I thought this was working.&lt;/P&gt;&lt;PRE&gt;MapApplication acmapapp = HostMapApplicationServices.Application;
Project.ProjectModel myproj = acmapapp.ActiveProject;&lt;BR /&gt;Query.QueryModel atsq = myproj.CreateQuery();&lt;BR /&gt;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();&lt;BR /&gt;// acmapapp.ErrorStack.EntriesCount = 1 at this point (37 object(s) queried from... 
acmapapp.ErrorStack.Clear();   &amp;lt;-------------------- seems to work 
acmapapp.Dispose();&lt;/PRE&gt;&lt;P&gt;But, if I try an UNDO, the message appears.&amp;nbsp; It is obviously sent somewhere other than ErrorStack.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Thu, 12 Jul 2018 16:32:35 GMT</pubDate>
    <dc:creator>fieldguy</dc:creator>
    <dc:date>2018-07-12T16:32:35Z</dc:date>
    <item>
      <title>Suppress map messages</title>
      <link>https://forums.autodesk.com/t5/autocad-map-3d-developer-forum/suppress-map-messages/m-p/8124664#M610</link>
      <description>&lt;P&gt;I am using civil 3d 2016 x64 and can't get rid of the message shown below.&amp;nbsp; I was hoping that CMDDIA 0 would only show the message on the command line which would be ok&amp;nbsp; if that's the best I can get.&lt;/P&gt;&lt;P&gt;I have tried:&lt;/P&gt;&lt;P&gt;"CMDDIA", 0&lt;BR /&gt;"CMDECHO", 0&lt;BR /&gt;"FILEDIA", 0&lt;BR /&gt;"NOMUTT", 1&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="map_query.PNG" style="width: 285px;"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/521919i20AF304E0E40E82D/image-size/large?v=v2&amp;amp;px=999" role="button" title="map_query.PNG" alt="map_query.PNG" /&gt;&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 11 Jul 2018 22:13:48 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/autocad-map-3d-developer-forum/suppress-map-messages/m-p/8124664#M610</guid>
      <dc:creator>fieldguy</dc:creator>
      <dc:date>2018-07-11T22:13:48Z</dc:date>
    </item>
    <item>
      <title>Re: Suppress map messages</title>
      <link>https://forums.autodesk.com/t5/autocad-map-3d-developer-forum/suppress-map-messages/m-p/8126554#M611</link>
      <description>&lt;P&gt;I'm a little closer.&amp;nbsp; I thought this was working.&lt;/P&gt;&lt;PRE&gt;MapApplication acmapapp = HostMapApplicationServices.Application;
Project.ProjectModel myproj = acmapapp.ActiveProject;&lt;BR /&gt;Query.QueryModel atsq = myproj.CreateQuery();&lt;BR /&gt;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();&lt;BR /&gt;// acmapapp.ErrorStack.EntriesCount = 1 at this point (37 object(s) queried from... 
acmapapp.ErrorStack.Clear();   &amp;lt;-------------------- seems to work 
acmapapp.Dispose();&lt;/PRE&gt;&lt;P&gt;But, if I try an UNDO, the message appears.&amp;nbsp; It is obviously sent somewhere other than ErrorStack.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 12 Jul 2018 16:32:35 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/autocad-map-3d-developer-forum/suppress-map-messages/m-p/8126554#M611</guid>
      <dc:creator>fieldguy</dc:creator>
      <dc:date>2018-07-12T16:32:35Z</dc:date>
    </item>
  </channel>
</rss>

