<?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: Dynamic Labels in Python Questions</title>
    <link>https://community.esri.com/t5/python-questions/dynamic-labels/m-p/1587769#M73774</link>
    <description>&lt;P&gt;There's a &lt;A href="https://pro.arcgis.com/en/pro-app/latest/arcpy/mapping/textelement-class.htm" target="_self"&gt;TextElement object&lt;/A&gt; you can access from the Layout object in the Arcpy.mp Python submodule. Is that what you're looking for?&lt;/P&gt;</description>
    <pubDate>Thu, 20 Feb 2025 22:54:53 GMT</pubDate>
    <dc:creator>BlakeTerhune</dc:creator>
    <dc:date>2025-02-20T22:54:53Z</dc:date>
    <item>
      <title>Dynamic Labels</title>
      <link>https://community.esri.com/t5/python-questions/dynamic-labels/m-p/1587738#M73772</link>
      <description>&lt;P&gt;Hello, is there a method to grab a dynamic label from a layout for use in python?&lt;BR /&gt;This is the layout dynamic label:&lt;BR /&gt;&amp;lt;dyn type="project" property="name"/&amp;gt;&lt;/P&gt;&lt;P&gt;I'm building a little script to export my map to PDF and would like it to use the map name as the filename.&lt;/P&gt;&lt;P&gt;Thanks.&lt;/P&gt;</description>
      <pubDate>Thu, 20 Feb 2025 22:19:13 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/dynamic-labels/m-p/1587738#M73772</guid>
      <dc:creator>DanCrawford</dc:creator>
      <dc:date>2025-02-20T22:19:13Z</dc:date>
    </item>
    <item>
      <title>Re: Dynamic Labels</title>
      <link>https://community.esri.com/t5/python-questions/dynamic-labels/m-p/1587757#M73773</link>
      <description>&lt;P&gt;I found a way using the properties of the filepath rather than the dynamic label:&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN class=""&gt;import&lt;/SPAN&gt; arcpy&lt;BR /&gt;&lt;SPAN class=""&gt;import&lt;/SPAN&gt; os&lt;BR /&gt;&lt;SPAN class=""&gt;# Get the current project&lt;/SPAN&gt;&lt;BR /&gt;aprx = arcpy.mp.ArcGISProject(&lt;SPAN class=""&gt;"CURRENT"&lt;/SPAN&gt;)&lt;BR /&gt;&lt;SPAN class=""&gt;# Access the full file path of the project&lt;/SPAN&gt;&lt;BR /&gt;project_path = aprx.filePath&lt;BR /&gt;&lt;SPAN class=""&gt;# Extract the project name from the file path&lt;/SPAN&gt;&lt;BR /&gt;project_name = os.path.basename(project_path)&lt;BR /&gt;&lt;SPAN class=""&gt;print&lt;/SPAN&gt;(&lt;SPAN class=""&gt;"Project Name:"&lt;/SPAN&gt;, project_name)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 20 Feb 2025 22:36:49 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/dynamic-labels/m-p/1587757#M73773</guid>
      <dc:creator>DanCrawford</dc:creator>
      <dc:date>2025-02-20T22:36:49Z</dc:date>
    </item>
    <item>
      <title>Re: Dynamic Labels</title>
      <link>https://community.esri.com/t5/python-questions/dynamic-labels/m-p/1587769#M73774</link>
      <description>&lt;P&gt;There's a &lt;A href="https://pro.arcgis.com/en/pro-app/latest/arcpy/mapping/textelement-class.htm" target="_self"&gt;TextElement object&lt;/A&gt; you can access from the Layout object in the Arcpy.mp Python submodule. Is that what you're looking for?&lt;/P&gt;</description>
      <pubDate>Thu, 20 Feb 2025 22:54:53 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/dynamic-labels/m-p/1587769#M73774</guid>
      <dc:creator>BlakeTerhune</dc:creator>
      <dc:date>2025-02-20T22:54:53Z</dc:date>
    </item>
    <item>
      <title>Re: Dynamic Labels</title>
      <link>https://community.esri.com/t5/python-questions/dynamic-labels/m-p/1587784#M73775</link>
      <description>&lt;P&gt;I'll have a look, thanks.&amp;nbsp; Also thanks for moving this post.&amp;nbsp; I couldn't find this forum thread originally.&lt;/P&gt;</description>
      <pubDate>Thu, 20 Feb 2025 23:51:30 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/dynamic-labels/m-p/1587784#M73775</guid>
      <dc:creator>DanCrawford</dc:creator>
      <dc:date>2025-02-20T23:51:30Z</dc:date>
    </item>
  </channel>
</rss>

