<?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: Configuring Popups with Python CIM in Python Questions</title>
    <link>https://community.esri.com/t5/python-questions/configuring-popups-with-python-cim/m-p/1252989#M66712</link>
    <description>&lt;P&gt;PopupInfo has a list of TableMediaInfo objects.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="python"&gt;l_cim = l.getDefinition("V2")

media = arcpy.cim.CIMPopup.CIMTableMediaInfo()
media.fields = ["Field"]
popup = arcpy.cim.CIMPopup.CIMPopupInfo()
popup.mediaInfos = [media]
l_cim.popupInfo = popup

l.setDefinition(l_cim)&lt;/LI-CODE&gt;</description>
    <pubDate>Mon, 30 Jan 2023 17:38:23 GMT</pubDate>
    <dc:creator>JohannesLindner</dc:creator>
    <dc:date>2023-01-30T17:38:23Z</dc:date>
    <item>
      <title>Configuring Popups with Python CIM</title>
      <link>https://community.esri.com/t5/python-questions/configuring-popups-with-python-cim/m-p/1252970#M66711</link>
      <description>&lt;P&gt;I am trying to automate configuring popups with Python CIM for many points in ArcGIS Pro. I only want one field displayed, and not all of them, when I click the point with the info button.&amp;nbsp; That's it.&amp;nbsp; I am new to using Python CIM with arcpy.&lt;/P&gt;&lt;P&gt;I tried the following code and it did not work:&lt;/P&gt;&lt;LI-CODE lang="python"&gt;import arcpy

p = arcpy.mp.ArcGISProject('current')
m = p.listMaps()[0]
l = m.listLayers()[0]
l_cim = l.getDefinition('V2')

for l in m.listLayers():
    l_cim = l.getDefinition('V2')
    MediaObj = arcpy.cim.CreateCIMObjectFromClassName('CIMTableMediaInfo', 'V2')
    MediaObj.fields = ["Field"]
    l_cim.popupInfo = MediaObj
    l.setDefinition(l_cim)&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Please let me know where my understanding has failed.&lt;/P&gt;</description>
      <pubDate>Mon, 30 Jan 2023 17:09:02 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/configuring-popups-with-python-cim/m-p/1252970#M66711</guid>
      <dc:creator>DestinyKelley1</dc:creator>
      <dc:date>2023-01-30T17:09:02Z</dc:date>
    </item>
    <item>
      <title>Re: Configuring Popups with Python CIM</title>
      <link>https://community.esri.com/t5/python-questions/configuring-popups-with-python-cim/m-p/1252989#M66712</link>
      <description>&lt;P&gt;PopupInfo has a list of TableMediaInfo objects.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="python"&gt;l_cim = l.getDefinition("V2")

media = arcpy.cim.CIMPopup.CIMTableMediaInfo()
media.fields = ["Field"]
popup = arcpy.cim.CIMPopup.CIMPopupInfo()
popup.mediaInfos = [media]
l_cim.popupInfo = popup

l.setDefinition(l_cim)&lt;/LI-CODE&gt;</description>
      <pubDate>Mon, 30 Jan 2023 17:38:23 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/configuring-popups-with-python-cim/m-p/1252989#M66712</guid>
      <dc:creator>JohannesLindner</dc:creator>
      <dc:date>2023-01-30T17:38:23Z</dc:date>
    </item>
    <item>
      <title>Re: Configuring Popups with Python CIM</title>
      <link>https://community.esri.com/t5/python-questions/configuring-popups-with-python-cim/m-p/1252995#M66713</link>
      <description>&lt;P&gt;Thank you, Johannes! The code worked!&lt;/P&gt;&lt;P&gt;How do I get the list of TableMediaInfo objects from PopupInfo?&lt;/P&gt;</description>
      <pubDate>Mon, 30 Jan 2023 17:51:28 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/configuring-popups-with-python-cim/m-p/1252995#M66713</guid>
      <dc:creator>DestinyKelley1</dc:creator>
      <dc:date>2023-01-30T17:51:28Z</dc:date>
    </item>
    <item>
      <title>Re: Configuring Popups with Python CIM</title>
      <link>https://community.esri.com/t5/python-questions/configuring-popups-with-python-cim/m-p/1252997#M66714</link>
      <description>&lt;LI-CODE lang="python"&gt;cim.popupInfo.mediaInfos&lt;/LI-CODE&gt;</description>
      <pubDate>Mon, 30 Jan 2023 17:57:59 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/configuring-popups-with-python-cim/m-p/1252997#M66714</guid>
      <dc:creator>JohannesLindner</dc:creator>
      <dc:date>2023-01-30T17:57:59Z</dc:date>
    </item>
    <item>
      <title>Re: Configuring Popups with Python CIM</title>
      <link>https://community.esri.com/t5/python-questions/configuring-popups-with-python-cim/m-p/1325658#M68537</link>
      <description>&lt;P&gt;I have leveraged some of this code to modify the l_cim.popupInfo.fieldDescriptions.&amp;nbsp; &amp;nbsp;This seems to be corrupting my map document.&amp;nbsp; Has this ben observed in similar efforts?&lt;/P&gt;</description>
      <pubDate>Tue, 05 Sep 2023 22:19:24 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/configuring-popups-with-python-cim/m-p/1325658#M68537</guid>
      <dc:creator>John_Medema</dc:creator>
      <dc:date>2023-09-05T22:19:24Z</dc:date>
    </item>
  </channel>
</rss>

