<?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 get specific version of object? in Windchill Customization</title>
    <link>https://community.ptc.com/t5/Windchill-Customization/How-to-get-specific-version-of-object/m-p/805865#M2935</link>
    <description>&lt;P&gt;So you are looking for the code that strips out the iteration part of the version?&lt;/P&gt;
&lt;P&gt;aPart.getVersionIdentifier().getValue();&lt;/P&gt;</description>
    <pubDate>Thu, 07 Jul 2022 11:37:01 GMT</pubDate>
    <dc:creator>avillanueva</dc:creator>
    <dc:date>2022-07-07T11:37:01Z</dc:date>
    <item>
      <title>How to get specific version of object?</title>
      <link>https://community.ptc.com/t5/Windchill-Customization/How-to-get-specific-version-of-object/m-p/805588#M2933</link>
      <description>&lt;P&gt;Hello. I am trying to find the specific revision of an object(WTPart/WTDoc). For instance, if I pass in 0.3 or A.1 can I have an api that returns that specific part revision? I am not looking for the previous version just the specific one in the history&lt;/P&gt;</description>
      <pubDate>Fri, 15 Mar 2024 13:15:56 GMT</pubDate>
      <guid>https://community.ptc.com/t5/Windchill-Customization/How-to-get-specific-version-of-object/m-p/805588#M2933</guid>
      <dc:creator>WM_9965332</dc:creator>
      <dc:date>2024-03-15T13:15:56Z</dc:date>
    </item>
    <item>
      <title>Re: How to get specific version of object?</title>
      <link>https://community.ptc.com/t5/Windchill-Customization/How-to-get-specific-version-of-object/m-p/805828#M2934</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;A href="https://community.ptc.com/t5/user/viewprofilepage/user-id/446940" target="_blank"&gt;@WM_9965332&lt;/A&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;You have to search for it manually.&lt;/P&gt;
&lt;P&gt;So you need to go&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;through&amp;nbsp;&lt;/SPAN&gt;all iterations and control what iteration and revision are.&lt;/P&gt;
&lt;P&gt;PetrH&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 07 Jul 2022 08:08:47 GMT</pubDate>
      <guid>https://community.ptc.com/t5/Windchill-Customization/How-to-get-specific-version-of-object/m-p/805828#M2934</guid>
      <dc:creator>HelesicPetr</dc:creator>
      <dc:date>2022-07-07T08:08:47Z</dc:date>
    </item>
    <item>
      <title>Re: How to get specific version of object?</title>
      <link>https://community.ptc.com/t5/Windchill-Customization/How-to-get-specific-version-of-object/m-p/805865#M2935</link>
      <description>&lt;P&gt;So you are looking for the code that strips out the iteration part of the version?&lt;/P&gt;
&lt;P&gt;aPart.getVersionIdentifier().getValue();&lt;/P&gt;</description>
      <pubDate>Thu, 07 Jul 2022 11:37:01 GMT</pubDate>
      <guid>https://community.ptc.com/t5/Windchill-Customization/How-to-get-specific-version-of-object/m-p/805865#M2935</guid>
      <dc:creator>avillanueva</dc:creator>
      <dc:date>2022-07-07T11:37:01Z</dc:date>
    </item>
    <item>
      <title>Re: How to get specific version of object?</title>
      <link>https://community.ptc.com/t5/Windchill-Customization/How-to-get-specific-version-of-object/m-p/805870#M2936</link>
      <description>&lt;P&gt;I re-read this. If you are supplying the version identifier, you want the object returned. Ok, did something like that for a static URL content retriever JSP page:&lt;/P&gt;
&lt;P&gt;I took in a version letter and looped through the versions to find the one that matched. The VersionControlHelper has other methods to show all iterations.&lt;/P&gt;
&lt;LI-CODE lang="java"&gt;QuerySpec qs = new QuerySpec(WTDocumentMaster.class);
            qs.appendWhere(new SearchCondition(WTDocumentMaster.class,WTDocumentMaster.NUMBER,SearchCondition.EQUAL, number));

            QueryResult qr = PersistenceHelper.manager.find(qs);
            if(qr.hasMoreElements())
            {
                    WTDocumentMaster docm = (WTDocumentMaster) qr.nextElement();
                    QueryResult qrLatest = VersionControlHelper.service.allVersionsOf(docm);
                    while(qrLatest.hasMoreElements()) 
                    {
                        WTDocument doc = (WTDocument) qrLatest.nextElement();
                        if (version!= null)
                        {
                            if (!(doc.getVersionIdentifier().getValue().equals(version)))
                                continue;
                        }
                     }&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 07 Jul 2022 11:44:35 GMT</pubDate>
      <guid>https://community.ptc.com/t5/Windchill-Customization/How-to-get-specific-version-of-object/m-p/805870#M2936</guid>
      <dc:creator>avillanueva</dc:creator>
      <dc:date>2022-07-07T11:44:35Z</dc:date>
    </item>
  </channel>
</rss>

