<?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: Filtering a Map Service in ArcGIS for AutoCAD Questions</title>
    <link>https://community.esri.com/t5/arcgis-for-autocad-questions/filtering-a-map-service/m-p/1335833#M885</link>
    <description>&lt;P&gt;Hello Steve,&lt;/P&gt;&lt;P&gt;Based on my understanding of your request a few things come to mind.&lt;/P&gt;&lt;P&gt;You can use the &lt;A href="https://doc.arcgis.com/en/arcgis-for-autocad/latest/manage/select-features-by-attributes.htm" target="_self"&gt;Select features by attributes&lt;/A&gt; tool which is just like the tool in ArcGIS Pro. Now this tool only allows the user to select features of a given "query".&lt;/P&gt;&lt;P&gt;Since you want to display certain features based on this work order number I think what we want here is to add the feature layer based on a query. This is going to work as long as the work order number is a field in the attribute table of the layer. There are two ways to do this. The first is through the AutoLISP function &lt;A href="https://doc.arcgis.com/en/arcgis-for-autocad/latest/commands-api/esri-webfeaturelayer-add.htm" target="_self"&gt;esri_webfeaturelayer_add (AutoLISP)&lt;/A&gt;. This function takes the REST endpoint URL or the URL with the portal ItemID as well as a definition query as arguments so that only features matching the query are added to the drawing. If you would rather perform this task using a dialog then you can do the same with the up and coming update to the "&lt;A href="https://doc.arcgis.com/en/arcgis-for-autocad/latest/manage/add-a-web-feature-layer.htm#ESRI_SECTION1_6F7095CA37E84D5B94F5A8003E1DB1C6" target="_self"&gt;Add data by URL&lt;/A&gt;" dialog.&lt;/P&gt;&lt;P&gt;If you want to "ask" the CAD user what the work order is then I suspect you will prefer the AutoLISP method and you can ask the user for the URL as well and have the programmatic aspect you are looking for.&lt;/P&gt;&lt;P&gt;Thanks for using ArcGIS for AutoCAD!&lt;/P&gt;</description>
    <pubDate>Fri, 06 Oct 2023 16:31:48 GMT</pubDate>
    <dc:creator>DanWade</dc:creator>
    <dc:date>2023-10-06T16:31:48Z</dc:date>
    <item>
      <title>Filtering a Map Service</title>
      <link>https://community.esri.com/t5/arcgis-for-autocad-questions/filtering-a-map-service/m-p/1334804#M884</link>
      <description>&lt;P&gt;I am looking to be able to filter the features that I bring into AutoCAD. I would like to be able to do this programatically, but I did not see anything in the AutoLISP references that would allow this. For example, I would like to be able to prompt the the user to enter in a work order and show only the features with that work order.&lt;/P&gt;&lt;P&gt;Is this possible?&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;</description>
      <pubDate>Tue, 03 Oct 2023 23:13:49 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-for-autocad-questions/filtering-a-map-service/m-p/1334804#M884</guid>
      <dc:creator>SteveMilligan</dc:creator>
      <dc:date>2023-10-03T23:13:49Z</dc:date>
    </item>
    <item>
      <title>Re: Filtering a Map Service</title>
      <link>https://community.esri.com/t5/arcgis-for-autocad-questions/filtering-a-map-service/m-p/1335833#M885</link>
      <description>&lt;P&gt;Hello Steve,&lt;/P&gt;&lt;P&gt;Based on my understanding of your request a few things come to mind.&lt;/P&gt;&lt;P&gt;You can use the &lt;A href="https://doc.arcgis.com/en/arcgis-for-autocad/latest/manage/select-features-by-attributes.htm" target="_self"&gt;Select features by attributes&lt;/A&gt; tool which is just like the tool in ArcGIS Pro. Now this tool only allows the user to select features of a given "query".&lt;/P&gt;&lt;P&gt;Since you want to display certain features based on this work order number I think what we want here is to add the feature layer based on a query. This is going to work as long as the work order number is a field in the attribute table of the layer. There are two ways to do this. The first is through the AutoLISP function &lt;A href="https://doc.arcgis.com/en/arcgis-for-autocad/latest/commands-api/esri-webfeaturelayer-add.htm" target="_self"&gt;esri_webfeaturelayer_add (AutoLISP)&lt;/A&gt;. This function takes the REST endpoint URL or the URL with the portal ItemID as well as a definition query as arguments so that only features matching the query are added to the drawing. If you would rather perform this task using a dialog then you can do the same with the up and coming update to the "&lt;A href="https://doc.arcgis.com/en/arcgis-for-autocad/latest/manage/add-a-web-feature-layer.htm#ESRI_SECTION1_6F7095CA37E84D5B94F5A8003E1DB1C6" target="_self"&gt;Add data by URL&lt;/A&gt;" dialog.&lt;/P&gt;&lt;P&gt;If you want to "ask" the CAD user what the work order is then I suspect you will prefer the AutoLISP method and you can ask the user for the URL as well and have the programmatic aspect you are looking for.&lt;/P&gt;&lt;P&gt;Thanks for using ArcGIS for AutoCAD!&lt;/P&gt;</description>
      <pubDate>Fri, 06 Oct 2023 16:31:48 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-for-autocad-questions/filtering-a-map-service/m-p/1335833#M885</guid>
      <dc:creator>DanWade</dc:creator>
      <dc:date>2023-10-06T16:31:48Z</dc:date>
    </item>
  </channel>
</rss>

