<?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: Remove old ProjectItem in ArcGIS Pro SDK Questions</title>
    <link>https://community.esri.com/t5/arcgis-pro-sdk-questions/remove-old-projectitem/m-p/822582#M2895</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi&lt;/P&gt;&lt;P&gt;Looks like&amp;nbsp;&lt;SPAN style="color: #24292e; background-color: #ffffff;"&gt;Layout.SourceModifiedTime is not providing the correct info. The Layout development team is looking at this issue. I will update this post when there is a fix.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #24292e; background-color: #ffffff;"&gt;Thank you!&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #24292e; background-color: #ffffff;"&gt;Uma&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 10 Dec 2019 21:33:32 GMT</pubDate>
    <dc:creator>UmaHarano</dc:creator>
    <dc:date>2019-12-10T21:33:32Z</dc:date>
    <item>
      <title>Remove old ProjectItem</title>
      <link>https://community.esri.com/t5/arcgis-pro-sdk-questions/remove-old-projectitem/m-p/822581#M2894</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I need to find a way to remove old Layouts from my project if they were added before a certain date.&amp;nbsp; I create layout templates and add them to my addin.&amp;nbsp; These templates are then used to print a map, however, after it is loaded I stays with the project.&amp;nbsp; I do want the layout to stay with the project (as load times are much faster), but when I update the Layout I want to remove the existing template if it is before a certain date that I maintain.&amp;nbsp; I need to be able to get the date the existing Layout was added to the Projects catalog, then I will remove it based on this date if it is old.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;&lt;CODE&gt;&lt;SPAN class="comment token"&gt;//Remove the old templates that might be out of date&lt;/SPAN&gt;
                    &lt;SPAN class="keyword token"&gt;foreach&lt;/SPAN&gt; &lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;LayoutProjectItem layoutTemplate &lt;SPAN class="keyword token"&gt;in&lt;/SPAN&gt; Project&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;Current&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;GetItems&lt;SPAN class="operator token"&gt;&amp;lt;&lt;/SPAN&gt;LayoutProjectItem&lt;SPAN class="operator token"&gt;&amp;gt;&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;
                    &lt;SPAN class="punctuation token"&gt;{&lt;/SPAN&gt;
&lt;SPAN class="comment token"&gt;//NEED LOGIC HERE TO SEE IF THE layoutTemplate IS BEFORE a DATE&lt;/SPAN&gt;
                        Project&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;Current&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;&lt;SPAN class="token function"&gt;RemoveItem&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;layoutTemplate &lt;SPAN class="keyword token"&gt;as&lt;/SPAN&gt; IProjectItem&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt;
                    &lt;SPAN class="punctuation token"&gt;}&lt;/SPAN&gt;&lt;SPAN class="line-numbers-rows"&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 12 Dec 2021 09:46:38 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-sdk-questions/remove-old-projectitem/m-p/822581#M2894</guid>
      <dc:creator>MKa</dc:creator>
      <dc:date>2021-12-12T09:46:38Z</dc:date>
    </item>
    <item>
      <title>Re: Remove old ProjectItem</title>
      <link>https://community.esri.com/t5/arcgis-pro-sdk-questions/remove-old-projectitem/m-p/822582#M2895</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi&lt;/P&gt;&lt;P&gt;Looks like&amp;nbsp;&lt;SPAN style="color: #24292e; background-color: #ffffff;"&gt;Layout.SourceModifiedTime is not providing the correct info. The Layout development team is looking at this issue. I will update this post when there is a fix.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #24292e; background-color: #ffffff;"&gt;Thank you!&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #24292e; background-color: #ffffff;"&gt;Uma&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 10 Dec 2019 21:33:32 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-sdk-questions/remove-old-projectitem/m-p/822582#M2895</guid>
      <dc:creator>UmaHarano</dc:creator>
      <dc:date>2019-12-10T21:33:32Z</dc:date>
    </item>
    <item>
      <title>Re: Remove old ProjectItem</title>
      <link>https://community.esri.com/t5/arcgis-pro-sdk-questions/remove-old-projectitem/m-p/822583#M2896</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;A possible work around (I didn't try this yet): Maybe until the problem is resolved you can add the 'layout added' date as part of the LayoutProjectItem's Summary property and then parse the Summary string for the 'layout added' date as part of your removal logic.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 10 Dec 2019 23:29:51 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-sdk-questions/remove-old-projectitem/m-p/822583#M2896</guid>
      <dc:creator>Wolf</dc:creator>
      <dc:date>2019-12-10T23:29:51Z</dc:date>
    </item>
    <item>
      <title>Re: Remove old ProjectItem</title>
      <link>https://community.esri.com/t5/arcgis-pro-sdk-questions/remove-old-projectitem/m-p/822584#M2897</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thank you for bringing this requirement to our attention.&amp;nbsp; The SourceModifiedTime property is only used for project items that were added from a portal.&amp;nbsp; The documentation will be updated to reflect its purpose more clearly.&amp;nbsp; The development team will strongly consider this requirement and possibly add a new property&amp;nbsp;specific to this use case (e.g., LastModified).&amp;nbsp; The final solution goes beyond just Layout project items.&amp;nbsp; We do not have a time frame since there are details to be worked out. In the meantime,&amp;nbsp;Wolfgang's suggestion is hopefully a viable solution.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Jeff&lt;/P&gt;&lt;P&gt;Layout Team&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 11 Dec 2019 16:55:51 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-sdk-questions/remove-old-projectitem/m-p/822584#M2897</guid>
      <dc:creator>JeffBarrette</dc:creator>
      <dc:date>2019-12-11T16:55:51Z</dc:date>
    </item>
  </channel>
</rss>

