<?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: how to identify WTPart being created using SAVE AS action ? in Windchill Customization</title>
    <link>https://www.ptcusercommunity.com/t5/Windchill-Customization/how-to-identify-WTPart-being-created-using-SAVE-AS-action/m-p/706175#M3743</link>
    <description>&lt;P&gt;It does work.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The following&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="java"&gt;PersistenceHelper.manager.navigate(myPart, "original", MadeFromLink.class, true) &lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;returns the part that has been used to create "myPart".&lt;/P&gt;
&lt;P&gt;So if there is no element in the QueryResult, it means myPart hasn't been created from a save-as.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;But maybe that's not what you're looking for, if so, then elaborate your need.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Wed, 06 Jan 2021 22:15:00 GMT</pubDate>
    <dc:creator>Florent</dc:creator>
    <dc:date>2021-01-06T22:15:00Z</dc:date>
    <item>
      <title>how to identify WTPart being created using SAVE AS action ?</title>
      <link>https://www.ptcusercommunity.com/t5/Windchill-Customization/how-to-identify-WTPart-being-created-using-SAVE-AS-action/m-p/705534#M3740</link>
      <description />
      <pubDate>Fri, 15 Mar 2024 14:19:41 GMT</pubDate>
      <guid>https://www.ptcusercommunity.com/t5/Windchill-Customization/how-to-identify-WTPart-being-created-using-SAVE-AS-action/m-p/705534#M3740</guid>
      <dc:creator>shetakesubhash7</dc:creator>
      <dc:date>2024-03-15T14:19:41Z</dc:date>
    </item>
    <item>
      <title>Re: how to identify WTPart being created using SAVE AS action ?</title>
      <link>https://www.ptcusercommunity.com/t5/Windchill-Customization/how-to-identify-WTPart-being-created-using-SAVE-AS-action/m-p/705689#M3741</link>
      <description>&lt;P&gt;Not sure if there is a dedicated method for this.&lt;/P&gt;
&lt;P&gt;If not, you can still navigate the link "wt.enterprise.MadeFromLink".&lt;/P&gt;</description>
      <pubDate>Mon, 04 Jan 2021 21:09:25 GMT</pubDate>
      <guid>https://www.ptcusercommunity.com/t5/Windchill-Customization/how-to-identify-WTPart-being-created-using-SAVE-AS-action/m-p/705689#M3741</guid>
      <dc:creator>Florent</dc:creator>
      <dc:date>2021-01-04T21:09:25Z</dc:date>
    </item>
    <item>
      <title>Re: how to identify WTPart being created using SAVE AS action ?</title>
      <link>https://www.ptcusercommunity.com/t5/Windchill-Customization/how-to-identify-WTPart-being-created-using-SAVE-AS-action/m-p/706118#M3742</link>
      <description>&lt;P&gt;Thanks but seems its not working on 11.0 windchill version&lt;/P&gt;</description>
      <pubDate>Wed, 06 Jan 2021 18:35:19 GMT</pubDate>
      <guid>https://www.ptcusercommunity.com/t5/Windchill-Customization/how-to-identify-WTPart-being-created-using-SAVE-AS-action/m-p/706118#M3742</guid>
      <dc:creator>shetakesubhash7</dc:creator>
      <dc:date>2021-01-06T18:35:19Z</dc:date>
    </item>
    <item>
      <title>Re: how to identify WTPart being created using SAVE AS action ?</title>
      <link>https://www.ptcusercommunity.com/t5/Windchill-Customization/how-to-identify-WTPart-being-created-using-SAVE-AS-action/m-p/706175#M3743</link>
      <description>&lt;P&gt;It does work.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The following&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="java"&gt;PersistenceHelper.manager.navigate(myPart, "original", MadeFromLink.class, true) &lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;returns the part that has been used to create "myPart".&lt;/P&gt;
&lt;P&gt;So if there is no element in the QueryResult, it means myPart hasn't been created from a save-as.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;But maybe that's not what you're looking for, if so, then elaborate your need.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 06 Jan 2021 22:15:00 GMT</pubDate>
      <guid>https://www.ptcusercommunity.com/t5/Windchill-Customization/how-to-identify-WTPart-being-created-using-SAVE-AS-action/m-p/706175#M3743</guid>
      <dc:creator>Florent</dc:creator>
      <dc:date>2021-01-06T22:15:00Z</dc:date>
    </item>
    <item>
      <title>Re: how to identify WTPart being created using SAVE AS action ?</title>
      <link>https://www.ptcusercommunity.com/t5/Windchill-Customization/how-to-identify-WTPart-being-created-using-SAVE-AS-action/m-p/706292#M3744</link>
      <description>&lt;P&gt;Well, need is to identify whether WTPart being created via SAVE AS action on Create Part action. this need to be identify while creating WTPart e.g. on listener level. Post that rest validation will applied.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Currently am trying this on&amp;nbsp;&lt;EM&gt;&lt;STRONG&gt;PersistenceManagerEvent.PRE_STORE&lt;/STRONG&gt;&lt;/EM&gt; listener service event.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;tried your suggestion as well:&lt;/P&gt;
&lt;P&gt;&lt;EM&gt;&lt;STRONG&gt; QueryResult qr=PersistenceHelper.manager.navigate( wtPart,"original", MadeFromLink.class, false);&lt;/STRONG&gt;&lt;/EM&gt;&lt;/P&gt;
&lt;P&gt;this returns 0 elements.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 07 Jan 2021 14:10:16 GMT</pubDate>
      <guid>https://www.ptcusercommunity.com/t5/Windchill-Customization/how-to-identify-WTPart-being-created-using-SAVE-AS-action/m-p/706292#M3744</guid>
      <dc:creator>shetakesubhash7</dc:creator>
      <dc:date>2021-01-07T14:10:16Z</dc:date>
    </item>
    <item>
      <title>Re: how to identify WTPart being created using SAVE AS action ?</title>
      <link>https://www.ptcusercommunity.com/t5/Windchill-Customization/how-to-identify-WTPart-being-created-using-SAVE-AS-action/m-p/706388#M3745</link>
      <description>&lt;P&gt;This makes sense as the PRE_STORE event is (as its name means) is raised prior anything is stored in the DB, therefore you won't find the link.&lt;/P&gt;
&lt;P&gt;I would rather look into the&amp;nbsp;&lt;STRONG&gt;EnterpriseServiceEvent.PRE_COPY&lt;/STRONG&gt; or&amp;nbsp; &lt;STRONG&gt;VersionControlServiceEvent.NEW_VERSION&lt;/STRONG&gt; or the &lt;STRONG&gt;PersistenceManagerEvent.INSERT&lt;/STRONG&gt; events.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Or even implementing your own custom &lt;STRONG&gt;CopyWTPartDelegate&lt;/STRONG&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 07 Jan 2021 22:21:11 GMT</pubDate>
      <guid>https://www.ptcusercommunity.com/t5/Windchill-Customization/how-to-identify-WTPart-being-created-using-SAVE-AS-action/m-p/706388#M3745</guid>
      <dc:creator>Florent</dc:creator>
      <dc:date>2021-01-07T22:21:11Z</dc:date>
    </item>
    <item>
      <title>Re: how to identify WTPart being created using SAVE AS action ?</title>
      <link>https://www.ptcusercommunity.com/t5/Windchill-Customization/how-to-identify-WTPart-being-created-using-SAVE-AS-action/m-p/706452#M3746</link>
      <description>&lt;P&gt;Hi, you can listen to the event&lt;/P&gt;
&lt;PRE&gt;&lt;SPAN&gt;PersistenceManagerEvent.PRE_STORE&lt;/SPAN&gt;&lt;/PRE&gt;
&lt;P&gt;and then look for the MadeFromLink objects like:&lt;/P&gt;
&lt;PRE&gt;&lt;SPAN&gt;@Override&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN&gt;public void &lt;/SPAN&gt;&lt;SPAN&gt;notifyVetoableMultiObjectEvent&lt;/SPAN&gt;(&lt;SPAN&gt;Object &lt;/SPAN&gt;obj) &lt;SPAN&gt;throws &lt;/SPAN&gt;&lt;SPAN&gt;WTException &lt;/SPAN&gt;{&lt;BR /&gt;  &lt;SPAN&gt;if &lt;/SPAN&gt;(((&lt;SPAN&gt;KeyedEvent&lt;/SPAN&gt;) obj).getEventType().equals(&lt;SPAN&gt;PersistenceManagerEvent&lt;/SPAN&gt;.&lt;SPAN&gt;PRE_STORE&lt;/SPAN&gt;)) {&lt;BR /&gt;    &lt;SPAN&gt;WTCollection wtCollection &lt;/SPAN&gt;= (&lt;SPAN&gt;WTCollection&lt;/SPAN&gt;) ((&lt;SPAN&gt;PersistenceManagerEvent&lt;/SPAN&gt;) obj).getEventTarget();&lt;BR /&gt;    &lt;SPAN&gt;WTCollection madeFromLinkCollection &lt;/SPAN&gt;= &lt;SPAN&gt;wtCollection&lt;/SPAN&gt;.subCollection(&lt;SPAN&gt;MadeFromLink&lt;/SPAN&gt;.&lt;SPAN&gt;class&lt;/SPAN&gt;, &lt;SPAN&gt;true&lt;/SPAN&gt;);&lt;BR /&gt;    &lt;SPAN&gt;if &lt;/SPAN&gt;(!&lt;SPAN&gt;madeFromLinkCollection&lt;/SPAN&gt;.isEmpty()) {&lt;BR /&gt;      &lt;SPAN&gt;log&lt;/SPAN&gt;.debug(&lt;SPAN&gt;"madeFromLinkCollection.size() = {}"&lt;/SPAN&gt;, &lt;SPAN&gt;madeFromLinkCollection&lt;/SPAN&gt;.size());&lt;BR /&gt;      &lt;SPAN&gt;Iterator iterator &lt;/SPAN&gt;= &lt;SPAN&gt;madeFromLinkCollection&lt;/SPAN&gt;.persistableIterator();&lt;BR /&gt;      &lt;SPAN&gt;while &lt;/SPAN&gt;(&lt;SPAN&gt;iterator&lt;/SPAN&gt;.hasNext()) {&lt;BR /&gt;        &lt;SPAN&gt;MadeFromLink madeFromLink &lt;/SPAN&gt;= (&lt;SPAN&gt;MadeFromLink&lt;/SPAN&gt;) &lt;SPAN&gt;iterator&lt;/SPAN&gt;.next();&lt;BR /&gt;        &lt;SPAN&gt;Persistable targetPersistable &lt;/SPAN&gt;= &lt;SPAN&gt;madeFromLink&lt;/SPAN&gt;.getCopy();&lt;BR /&gt;        &lt;SPAN&gt;Persistable sourcePersistable &lt;/SPAN&gt;= &lt;SPAN&gt;madeFromLink&lt;/SPAN&gt;.getRoleBObject();&lt;BR /&gt;        ...&lt;BR /&gt;      }&lt;BR /&gt;    }&lt;BR /&gt;  }&lt;BR /&gt;}&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 08 Jan 2021 21:15:19 GMT</pubDate>
      <guid>https://www.ptcusercommunity.com/t5/Windchill-Customization/how-to-identify-WTPart-being-created-using-SAVE-AS-action/m-p/706452#M3746</guid>
      <dc:creator>BjoernRueegg</dc:creator>
      <dc:date>2021-01-08T21:15:19Z</dc:date>
    </item>
    <item>
      <title>Re: how to identify WTPart being created using SAVE AS action ?</title>
      <link>https://www.ptcusercommunity.com/t5/Windchill-Customization/how-to-identify-WTPart-being-created-using-SAVE-AS-action/m-p/722159#M3747</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I'm tying to use the PRE_COPY event to clear an IBA before the OIR so the IBA is set in the OIR even if it is a copy. This works fine when I do a Save As but for some reason it does not work for a Copy/Paste. The event is still fired but the OIR somehow picks upp the old value anyway. Just wanted to check if you had any insight to why this might be the case?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;BR&lt;/P&gt;
&lt;P&gt;Anders&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 01 Apr 2021 07:01:15 GMT</pubDate>
      <guid>https://www.ptcusercommunity.com/t5/Windchill-Customization/how-to-identify-WTPart-being-created-using-SAVE-AS-action/m-p/722159#M3747</guid>
      <dc:creator>AndersKullenber</dc:creator>
      <dc:date>2021-04-01T07:01:15Z</dc:date>
    </item>
  </channel>
</rss>

