<?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: Setting Linear Units or Field as the input parameter for Python Tool in ArcGIS Pro Questions</title>
    <link>https://community.esri.com/t5/arcgis-pro-questions/setting-linear-units-or-field-as-the-input/m-p/1633946#M97314</link>
    <description>&lt;P&gt;So, it turns out there was a way after all and I didn't know how to look for it at the time.&lt;/P&gt;&lt;P&gt;Make a composite parameter:&lt;/P&gt;&lt;LI-CODE lang="python"&gt;        zField = arcpy.Parameter(displayName='Param0',
                                 name='zField',
                                 datatype=['GPLinearUnit', 'Field'],
                                 parameterType='Required',
                                 #multiValue = True,
                                 direction='Input')&lt;/LI-CODE&gt;</description>
    <pubDate>Thu, 17 Jul 2025 15:58:14 GMT</pubDate>
    <dc:creator>AlfredBaldenweck</dc:creator>
    <dc:date>2025-07-17T15:58:14Z</dc:date>
    <item>
      <title>Setting Linear Units or Field as the input parameter for Python Tool</title>
      <link>https://community.esri.com/t5/arcgis-pro-questions/setting-linear-units-or-field-as-the-input/m-p/1301196#M70421</link>
      <description>&lt;P&gt;I am creating a python tool and am trying to create a similar parameter to the input in the Buffer Tool for Distance [value or field]. I would like a drop down that has the options for Linear Unit or Field.&lt;BR /&gt;&lt;BR /&gt;I have replicated the parameter data types the same way the Buffer Tool has them but it still does not work the way I want inside of my own tools GUI. Any recommendations as to how to accomplish this?&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 20 Jun 2023 19:16:03 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-questions/setting-linear-units-or-field-as-the-input/m-p/1301196#M70421</guid>
      <dc:creator>dalvon</dc:creator>
      <dc:date>2023-06-20T19:16:03Z</dc:date>
    </item>
    <item>
      <title>Re: Setting Linear Units or Field as the input parameter for Python Tool</title>
      <link>https://community.esri.com/t5/arcgis-pro-questions/setting-linear-units-or-field-as-the-input/m-p/1301248#M70425</link>
      <description>&lt;P&gt;I think you may have to set up a field parameter, a unit parameter, and a toggle parameter, then use the tool validation page to set up the toggle to work correctly.&lt;/P&gt;&lt;P&gt;Then, within your tool, you can just check the toggle to choose which parameter to use.&lt;/P&gt;</description>
      <pubDate>Tue, 20 Jun 2023 19:53:29 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-questions/setting-linear-units-or-field-as-the-input/m-p/1301248#M70425</guid>
      <dc:creator>AlfredBaldenweck</dc:creator>
      <dc:date>2023-06-20T19:53:29Z</dc:date>
    </item>
    <item>
      <title>Re: Setting Linear Units or Field as the input parameter for Python Tool</title>
      <link>https://community.esri.com/t5/arcgis-pro-questions/setting-linear-units-or-field-as-the-input/m-p/1301253#M70426</link>
      <description>&lt;P&gt;Thats what I was thinking, but I was hoping there was another way. I tried dynamically modifying the .datatype in Tool Validation but that's not possible.&amp;nbsp;&lt;/P&gt;&lt;P&gt;I was hoping to get the GUI to look exactly like the Buffer Distance parameter but I guess that isn't possible with python tools.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 20 Jun 2023 20:02:57 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-questions/setting-linear-units-or-field-as-the-input/m-p/1301253#M70426</guid>
      <dc:creator>dalvon</dc:creator>
      <dc:date>2023-06-20T20:02:57Z</dc:date>
    </item>
    <item>
      <title>Re: Setting Linear Units or Field as the input parameter for Python Tool</title>
      <link>https://community.esri.com/t5/arcgis-pro-questions/setting-linear-units-or-field-as-the-input/m-p/1633946#M97314</link>
      <description>&lt;P&gt;So, it turns out there was a way after all and I didn't know how to look for it at the time.&lt;/P&gt;&lt;P&gt;Make a composite parameter:&lt;/P&gt;&lt;LI-CODE lang="python"&gt;        zField = arcpy.Parameter(displayName='Param0',
                                 name='zField',
                                 datatype=['GPLinearUnit', 'Field'],
                                 parameterType='Required',
                                 #multiValue = True,
                                 direction='Input')&lt;/LI-CODE&gt;</description>
      <pubDate>Thu, 17 Jul 2025 15:58:14 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-questions/setting-linear-units-or-field-as-the-input/m-p/1633946#M97314</guid>
      <dc:creator>AlfredBaldenweck</dc:creator>
      <dc:date>2025-07-17T15:58:14Z</dc:date>
    </item>
  </channel>
</rss>

