<?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 apply option filter for a WTPart structure programmatically? in Windchill Customization</title>
    <link>https://community.ptc.com/t5/Windchill-Customization/How-to-apply-option-filter-for-a-WTPart-structure/m-p/111535#M4650</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Finally got a way to achieve this, Below is the approach and not the exact code.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;// Create a New filter or get a existing Filter as below &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;NavigationCriteria &lt;/SPAN&gt;&lt;SPAN style="color: #6a3e3e; font-size: 10pt;"&gt;nc&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt;"&gt; = NavigationCriteriaHelper.&lt;/SPAN&gt;&lt;STRONG style=": ; color: #0000c0; font-size: 10pt;"&gt;&lt;EM&gt;service&lt;/EM&gt;&lt;/STRONG&gt;&lt;SPAN style="font-size: 10pt;"&gt;.getNavigationCriteria(&lt;/SPAN&gt;&lt;SPAN style="color: #6a3e3e; font-size: 10pt;"&gt;"FilterName"&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt;"&gt;);&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;//Get the Option and Choice linked to the part container&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;Map&amp;lt;String, Set&amp;lt;String&amp;gt;&amp;gt; &lt;/SPAN&gt;&lt;SPAN style="color: #6a3e3e; font-size: 10pt;"&gt;optionToChoiceMap&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt;"&gt; = &lt;/SPAN&gt;&lt;SPAN style="; color: #7f0055; font-size: 10pt;"&gt;&lt;STRONG&gt;new&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt;"&gt; HashMap&amp;lt;String, Set&amp;lt;String&amp;gt;&amp;gt;();&amp;nbsp; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3f7f5f; font-size: 10pt;"&gt;// Op1 : Ch1 &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt; Set&amp;lt;String&amp;gt; &lt;/SPAN&gt;&lt;SPAN style="color: #6a3e3e; font-size: 10pt;"&gt;choiceSet&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt;"&gt; = &lt;/SPAN&gt;&lt;SPAN style="; color: #7f0055; font-size: 10pt;"&gt;&lt;STRONG&gt;new&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt;"&gt; HashSet&amp;lt;String&amp;gt;();&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt; &lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt;"&gt;Option &lt;/SPAN&gt;&lt;SPAN style="color: #6a3e3e; font-size: 10pt;"&gt;option1&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt;"&gt; = OptionHelper.&lt;/SPAN&gt;&lt;STRONG style=": ; color: #0000c0; font-size: 10pt;"&gt;&lt;EM&gt;service&lt;/EM&gt;&lt;/STRONG&gt;&lt;SPAN style="font-size: 10pt;"&gt;.getOptionByName (&lt;/SPAN&gt;&lt;SPAN style="color: #6a3e3e; font-size: 10pt;"&gt;op1&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt;"&gt;, &lt;/SPAN&gt;&lt;SPAN style="color: #6a3e3e; font-size: 10pt;"&gt;part&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt;"&gt;.getContainerReference()); &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;Choice &lt;/SPAN&gt;&lt;SPAN style="color: #6a3e3e; font-size: 10pt;"&gt;choiceOp1&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt;"&gt; = OptionHelper.&lt;/SPAN&gt;&lt;STRONG style=": ; color: #0000c0; font-size: 10pt;"&gt;&lt;EM&gt;service&lt;/EM&gt;&lt;/STRONG&gt;&lt;SPAN style="font-size: 10pt;"&gt;.getChoice(&lt;/SPAN&gt;&lt;SPAN style="color: #6a3e3e; font-size: 10pt;"&gt;ch1&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt;"&gt;, &lt;/SPAN&gt;&lt;SPAN style="color: #6a3e3e; font-size: 10pt;"&gt;op1&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt;"&gt;, &lt;/SPAN&gt;&lt;SPAN style="color: #6a3e3e; font-size: 10pt;"&gt;part&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt;"&gt;.getContainerReference());&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #6a3e3e; font-size: 10pt;"&gt;choiceSet&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt;"&gt;.add(&lt;/SPAN&gt;&lt;SPAN style="color: #6a3e3e; font-size: 10pt;"&gt;choiceOp1&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt;"&gt;.getPersistInfo().getObjectIdentifier().toString()); &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #6a3e3e; font-size: 10pt;"&gt;optionToChoiceMap&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt;"&gt;.put(&lt;/SPAN&gt;&lt;SPAN style="color: #6a3e3e; font-size: 10pt;"&gt;option1&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt;"&gt;.getPersistInfo().getObjectIdentifier().toString(), &lt;/SPAN&gt;&lt;SPAN style="color: #6a3e3e; font-size: 10pt;"&gt;choiceSet&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt;"&gt;); &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;&amp;nbsp; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #3f7f5f; font-size: 10pt;"&gt;//Create a New ATOFilter to apply the option and choices to the Navigation Criteria. Set the Option &amp;amp; Choice to the ATOFilter&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3f7f5f; font-size: 10pt;"&gt; &lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt;"&gt;ATONavigationFilter &lt;/SPAN&gt;&lt;SPAN style="color: #6a3e3e; font-size: 10pt;"&gt;filter&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt;"&gt; = ATONavigationFilter.&lt;EM&gt;newATONavigationFilter&lt;/EM&gt;(); &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #6a3e3e; font-size: 10pt;"&gt;filter&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt;"&gt;.setFilterMode(1); &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #6a3e3e; font-size: 10pt;"&gt;filter&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt;"&gt;.setOptionSet(&lt;/SPAN&gt;&lt;SPAN style="color: #6a3e3e; font-size: 10pt;"&gt;optionSet&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt;"&gt;); &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #6a3e3e; font-size: 10pt;"&gt;filter&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt;"&gt;.setChoiceMap(&lt;/SPAN&gt;&lt;SPAN style="color: #6a3e3e; font-size: 10pt;"&gt;optionToChoiceMap&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt;"&gt;);&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #6a3e3e; font-size: 10pt;"&gt;filter&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt;"&gt;.setRuleCheckingDisabled(&lt;/SPAN&gt;&lt;SPAN style="; color: #7f0055; font-size: 10pt;"&gt;&lt;STRONG&gt;true&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt;"&gt;); &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;&amp;nbsp; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #3f7f5f; font-size: 10pt;"&gt;// Applying the latest ConfigSpec&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt; List &amp;lt;ATORuleConfigSpec&amp;gt; &lt;/SPAN&gt;&lt;SPAN style="color: #6a3e3e; font-size: 10pt;"&gt;atoRuleConfigs&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt;"&gt; = &lt;/SPAN&gt;&lt;SPAN style="; color: #7f0055; font-size: 10pt;"&gt;&lt;STRONG&gt;new&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt;"&gt; ArrayList&amp;lt;ATORuleConfigSpec&amp;gt;(); &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;ATORuleConfigSpec &lt;/SPAN&gt;&lt;SPAN style="color: #6a3e3e; font-size: 10pt;"&gt;atoRuleConfigSpec&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt;"&gt; =ATORuleConfigSpec.&lt;EM&gt;newATORuleConfigSpec&lt;/EM&gt;(); &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #6a3e3e; font-size: 10pt;"&gt;atoRuleConfigSpec&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt;"&gt;.setEffActive(&lt;/SPAN&gt;&lt;SPAN style="; color: #7f0055; font-size: 10pt;"&gt;&lt;STRONG&gt;false&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt;"&gt;);&amp;nbsp; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #6a3e3e; font-size: 10pt;"&gt;atoRuleConfigSpec&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt;"&gt;.setLatestActive(&lt;/SPAN&gt;&lt;SPAN style="; color: #7f0055; font-size: 10pt;"&gt;&lt;STRONG&gt;true&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt;"&gt;);&amp;nbsp; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #6a3e3e; font-size: 10pt;"&gt;atoRuleConfigSpec&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt;"&gt;.setLifeCycleActive(&lt;/SPAN&gt;&lt;SPAN style="; color: #7f0055; font-size: 10pt;"&gt;&lt;STRONG&gt;false&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt;"&gt;); &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #6a3e3e; font-size: 10pt;"&gt;atoRuleConfigSpec&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt;"&gt; = (ATORuleConfigSpec)PersistenceHelper.&lt;/SPAN&gt;&lt;STRONG style=": ; color: #0000c0; font-size: 10pt;"&gt;&lt;EM&gt;manager&lt;/EM&gt;&lt;/STRONG&gt;&lt;SPAN style="font-size: 10pt;"&gt;.store(&lt;/SPAN&gt;&lt;SPAN style="color: #6a3e3e; font-size: 10pt;"&gt;atoRuleConfigSpec&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt;"&gt;); &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #6a3e3e; font-size: 10pt;"&gt;atoRuleConfigs&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt;"&gt;.add(&lt;/SPAN&gt;&lt;SPAN style="color: #6a3e3e; font-size: 10pt;"&gt;atoRuleConfigSpec&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt;"&gt;); &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #6a3e3e; font-size: 10pt;"&gt;filter&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt;"&gt;.setConfigSpecs(&lt;/SPAN&gt;&lt;SPAN style="color: #6a3e3e; font-size: 10pt;"&gt;atoRuleConfigs&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt;"&gt;);&amp;nbsp; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;&amp;nbsp; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #3f7f5f; font-size: 10pt;"&gt;// Now add the filter to the navigation criteria &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt; ArrayList&amp;lt;NavigationFilter2&amp;gt; &lt;/SPAN&gt;&lt;SPAN style="color: #6a3e3e; font-size: 10pt;"&gt;filterList&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt;"&gt; = &lt;/SPAN&gt;&lt;SPAN style="; color: #7f0055; font-size: 10pt;"&gt;&lt;STRONG&gt;new&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt;"&gt; ArrayList&amp;lt;NavigationFilter2&amp;gt;(1); &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;f&lt;/SPAN&gt;&lt;SPAN style="color: #6a3e3e; font-size: 10pt;"&gt;ilterList&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt;"&gt;.add(&lt;/SPAN&gt;&lt;SPAN style="color: #6a3e3e; font-size: 10pt;"&gt;filter&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt;"&gt;); &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #6a3e3e; font-size: 10pt;"&gt;nc&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt;"&gt;.setFilters(&lt;/SPAN&gt;&lt;SPAN style="color: #6a3e3e; font-size: 10pt;"&gt;filterList&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt;"&gt;); &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt; &lt;SPAN style="color: #3f7f5f; font-size: 10pt;"&gt;// Persist the navigation criteria &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt; NavigationCriteriaHelper.&lt;/SPAN&gt;&lt;STRONG style=": ; color: #0000c0; font-size: 10pt;"&gt;&lt;EM&gt;service&lt;/EM&gt;&lt;/STRONG&gt;&lt;SPAN style="font-size: 10pt;"&gt;.saveNavigationCriteria(&lt;/SPAN&gt;&lt;SPAN style="color: #6a3e3e; font-size: 10pt;"&gt;nc&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt;"&gt;);&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;Regards,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;Thiagarajan&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 06 Apr 2017 06:35:21 GMT</pubDate>
    <dc:creator>tm-4</dc:creator>
    <dc:date>2017-04-06T06:35:21Z</dc:date>
    <item>
      <title>How to apply option filter for a WTPart structure programmatically?</title>
      <link>https://community.ptc.com/t5/Windchill-Customization/How-to-apply-option-filter-for-a-WTPart-structure/m-p/111534#M4649</link>
      <description>Need to apply option filter on the WTPart structure programmatically. What API's to be used ?</description>
      <pubDate>Fri, 15 Mar 2024 14:54:01 GMT</pubDate>
      <guid>https://community.ptc.com/t5/Windchill-Customization/How-to-apply-option-filter-for-a-WTPart-structure/m-p/111534#M4649</guid>
      <dc:creator>tm-4</dc:creator>
      <dc:date>2024-03-15T14:54:01Z</dc:date>
    </item>
    <item>
      <title>Re: How to apply option filter for a WTPart structure programmatically?</title>
      <link>https://community.ptc.com/t5/Windchill-Customization/How-to-apply-option-filter-for-a-WTPart-structure/m-p/111535#M4650</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Finally got a way to achieve this, Below is the approach and not the exact code.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;// Create a New filter or get a existing Filter as below &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;NavigationCriteria &lt;/SPAN&gt;&lt;SPAN style="color: #6a3e3e; font-size: 10pt;"&gt;nc&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt;"&gt; = NavigationCriteriaHelper.&lt;/SPAN&gt;&lt;STRONG style=": ; color: #0000c0; font-size: 10pt;"&gt;&lt;EM&gt;service&lt;/EM&gt;&lt;/STRONG&gt;&lt;SPAN style="font-size: 10pt;"&gt;.getNavigationCriteria(&lt;/SPAN&gt;&lt;SPAN style="color: #6a3e3e; font-size: 10pt;"&gt;"FilterName"&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt;"&gt;);&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;//Get the Option and Choice linked to the part container&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;Map&amp;lt;String, Set&amp;lt;String&amp;gt;&amp;gt; &lt;/SPAN&gt;&lt;SPAN style="color: #6a3e3e; font-size: 10pt;"&gt;optionToChoiceMap&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt;"&gt; = &lt;/SPAN&gt;&lt;SPAN style="; color: #7f0055; font-size: 10pt;"&gt;&lt;STRONG&gt;new&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt;"&gt; HashMap&amp;lt;String, Set&amp;lt;String&amp;gt;&amp;gt;();&amp;nbsp; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3f7f5f; font-size: 10pt;"&gt;// Op1 : Ch1 &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt; Set&amp;lt;String&amp;gt; &lt;/SPAN&gt;&lt;SPAN style="color: #6a3e3e; font-size: 10pt;"&gt;choiceSet&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt;"&gt; = &lt;/SPAN&gt;&lt;SPAN style="; color: #7f0055; font-size: 10pt;"&gt;&lt;STRONG&gt;new&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt;"&gt; HashSet&amp;lt;String&amp;gt;();&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt; &lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt;"&gt;Option &lt;/SPAN&gt;&lt;SPAN style="color: #6a3e3e; font-size: 10pt;"&gt;option1&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt;"&gt; = OptionHelper.&lt;/SPAN&gt;&lt;STRONG style=": ; color: #0000c0; font-size: 10pt;"&gt;&lt;EM&gt;service&lt;/EM&gt;&lt;/STRONG&gt;&lt;SPAN style="font-size: 10pt;"&gt;.getOptionByName (&lt;/SPAN&gt;&lt;SPAN style="color: #6a3e3e; font-size: 10pt;"&gt;op1&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt;"&gt;, &lt;/SPAN&gt;&lt;SPAN style="color: #6a3e3e; font-size: 10pt;"&gt;part&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt;"&gt;.getContainerReference()); &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;Choice &lt;/SPAN&gt;&lt;SPAN style="color: #6a3e3e; font-size: 10pt;"&gt;choiceOp1&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt;"&gt; = OptionHelper.&lt;/SPAN&gt;&lt;STRONG style=": ; color: #0000c0; font-size: 10pt;"&gt;&lt;EM&gt;service&lt;/EM&gt;&lt;/STRONG&gt;&lt;SPAN style="font-size: 10pt;"&gt;.getChoice(&lt;/SPAN&gt;&lt;SPAN style="color: #6a3e3e; font-size: 10pt;"&gt;ch1&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt;"&gt;, &lt;/SPAN&gt;&lt;SPAN style="color: #6a3e3e; font-size: 10pt;"&gt;op1&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt;"&gt;, &lt;/SPAN&gt;&lt;SPAN style="color: #6a3e3e; font-size: 10pt;"&gt;part&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt;"&gt;.getContainerReference());&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #6a3e3e; font-size: 10pt;"&gt;choiceSet&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt;"&gt;.add(&lt;/SPAN&gt;&lt;SPAN style="color: #6a3e3e; font-size: 10pt;"&gt;choiceOp1&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt;"&gt;.getPersistInfo().getObjectIdentifier().toString()); &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #6a3e3e; font-size: 10pt;"&gt;optionToChoiceMap&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt;"&gt;.put(&lt;/SPAN&gt;&lt;SPAN style="color: #6a3e3e; font-size: 10pt;"&gt;option1&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt;"&gt;.getPersistInfo().getObjectIdentifier().toString(), &lt;/SPAN&gt;&lt;SPAN style="color: #6a3e3e; font-size: 10pt;"&gt;choiceSet&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt;"&gt;); &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;&amp;nbsp; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #3f7f5f; font-size: 10pt;"&gt;//Create a New ATOFilter to apply the option and choices to the Navigation Criteria. Set the Option &amp;amp; Choice to the ATOFilter&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3f7f5f; font-size: 10pt;"&gt; &lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt;"&gt;ATONavigationFilter &lt;/SPAN&gt;&lt;SPAN style="color: #6a3e3e; font-size: 10pt;"&gt;filter&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt;"&gt; = ATONavigationFilter.&lt;EM&gt;newATONavigationFilter&lt;/EM&gt;(); &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #6a3e3e; font-size: 10pt;"&gt;filter&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt;"&gt;.setFilterMode(1); &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #6a3e3e; font-size: 10pt;"&gt;filter&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt;"&gt;.setOptionSet(&lt;/SPAN&gt;&lt;SPAN style="color: #6a3e3e; font-size: 10pt;"&gt;optionSet&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt;"&gt;); &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #6a3e3e; font-size: 10pt;"&gt;filter&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt;"&gt;.setChoiceMap(&lt;/SPAN&gt;&lt;SPAN style="color: #6a3e3e; font-size: 10pt;"&gt;optionToChoiceMap&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt;"&gt;);&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #6a3e3e; font-size: 10pt;"&gt;filter&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt;"&gt;.setRuleCheckingDisabled(&lt;/SPAN&gt;&lt;SPAN style="; color: #7f0055; font-size: 10pt;"&gt;&lt;STRONG&gt;true&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt;"&gt;); &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;&amp;nbsp; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #3f7f5f; font-size: 10pt;"&gt;// Applying the latest ConfigSpec&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt; List &amp;lt;ATORuleConfigSpec&amp;gt; &lt;/SPAN&gt;&lt;SPAN style="color: #6a3e3e; font-size: 10pt;"&gt;atoRuleConfigs&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt;"&gt; = &lt;/SPAN&gt;&lt;SPAN style="; color: #7f0055; font-size: 10pt;"&gt;&lt;STRONG&gt;new&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt;"&gt; ArrayList&amp;lt;ATORuleConfigSpec&amp;gt;(); &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;ATORuleConfigSpec &lt;/SPAN&gt;&lt;SPAN style="color: #6a3e3e; font-size: 10pt;"&gt;atoRuleConfigSpec&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt;"&gt; =ATORuleConfigSpec.&lt;EM&gt;newATORuleConfigSpec&lt;/EM&gt;(); &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #6a3e3e; font-size: 10pt;"&gt;atoRuleConfigSpec&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt;"&gt;.setEffActive(&lt;/SPAN&gt;&lt;SPAN style="; color: #7f0055; font-size: 10pt;"&gt;&lt;STRONG&gt;false&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt;"&gt;);&amp;nbsp; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #6a3e3e; font-size: 10pt;"&gt;atoRuleConfigSpec&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt;"&gt;.setLatestActive(&lt;/SPAN&gt;&lt;SPAN style="; color: #7f0055; font-size: 10pt;"&gt;&lt;STRONG&gt;true&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt;"&gt;);&amp;nbsp; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #6a3e3e; font-size: 10pt;"&gt;atoRuleConfigSpec&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt;"&gt;.setLifeCycleActive(&lt;/SPAN&gt;&lt;SPAN style="; color: #7f0055; font-size: 10pt;"&gt;&lt;STRONG&gt;false&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt;"&gt;); &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #6a3e3e; font-size: 10pt;"&gt;atoRuleConfigSpec&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt;"&gt; = (ATORuleConfigSpec)PersistenceHelper.&lt;/SPAN&gt;&lt;STRONG style=": ; color: #0000c0; font-size: 10pt;"&gt;&lt;EM&gt;manager&lt;/EM&gt;&lt;/STRONG&gt;&lt;SPAN style="font-size: 10pt;"&gt;.store(&lt;/SPAN&gt;&lt;SPAN style="color: #6a3e3e; font-size: 10pt;"&gt;atoRuleConfigSpec&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt;"&gt;); &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #6a3e3e; font-size: 10pt;"&gt;atoRuleConfigs&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt;"&gt;.add(&lt;/SPAN&gt;&lt;SPAN style="color: #6a3e3e; font-size: 10pt;"&gt;atoRuleConfigSpec&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt;"&gt;); &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #6a3e3e; font-size: 10pt;"&gt;filter&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt;"&gt;.setConfigSpecs(&lt;/SPAN&gt;&lt;SPAN style="color: #6a3e3e; font-size: 10pt;"&gt;atoRuleConfigs&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt;"&gt;);&amp;nbsp; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;&amp;nbsp; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #3f7f5f; font-size: 10pt;"&gt;// Now add the filter to the navigation criteria &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt; ArrayList&amp;lt;NavigationFilter2&amp;gt; &lt;/SPAN&gt;&lt;SPAN style="color: #6a3e3e; font-size: 10pt;"&gt;filterList&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt;"&gt; = &lt;/SPAN&gt;&lt;SPAN style="; color: #7f0055; font-size: 10pt;"&gt;&lt;STRONG&gt;new&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt;"&gt; ArrayList&amp;lt;NavigationFilter2&amp;gt;(1); &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;f&lt;/SPAN&gt;&lt;SPAN style="color: #6a3e3e; font-size: 10pt;"&gt;ilterList&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt;"&gt;.add(&lt;/SPAN&gt;&lt;SPAN style="color: #6a3e3e; font-size: 10pt;"&gt;filter&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt;"&gt;); &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #6a3e3e; font-size: 10pt;"&gt;nc&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt;"&gt;.setFilters(&lt;/SPAN&gt;&lt;SPAN style="color: #6a3e3e; font-size: 10pt;"&gt;filterList&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt;"&gt;); &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt; &lt;SPAN style="color: #3f7f5f; font-size: 10pt;"&gt;// Persist the navigation criteria &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt; NavigationCriteriaHelper.&lt;/SPAN&gt;&lt;STRONG style=": ; color: #0000c0; font-size: 10pt;"&gt;&lt;EM&gt;service&lt;/EM&gt;&lt;/STRONG&gt;&lt;SPAN style="font-size: 10pt;"&gt;.saveNavigationCriteria(&lt;/SPAN&gt;&lt;SPAN style="color: #6a3e3e; font-size: 10pt;"&gt;nc&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt;"&gt;);&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;Regards,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;Thiagarajan&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 06 Apr 2017 06:35:21 GMT</pubDate>
      <guid>https://community.ptc.com/t5/Windchill-Customization/How-to-apply-option-filter-for-a-WTPart-structure/m-p/111535#M4650</guid>
      <dc:creator>tm-4</dc:creator>
      <dc:date>2017-04-06T06:35:21Z</dc:date>
    </item>
    <item>
      <title>Re: How to apply option filter for a WTPart structure programmatically?</title>
      <link>https://community.ptc.com/t5/Windchill-Customization/How-to-apply-option-filter-for-a-WTPart-structure/m-p/634109#M4651</link>
      <description>&lt;P&gt;Hi, Can you please provide me exact code like how have you fetch the WTPart with given option and Choice? it will be so healpful. Thanks. My Mail ID is Siddharth.sinha@ltts.com&lt;/P&gt;</description>
      <pubDate>Thu, 31 Oct 2019 03:33:04 GMT</pubDate>
      <guid>https://community.ptc.com/t5/Windchill-Customization/How-to-apply-option-filter-for-a-WTPart-structure/m-p/634109#M4651</guid>
      <dc:creator>sidsinha16</dc:creator>
      <dc:date>2019-10-31T03:33:04Z</dc:date>
    </item>
  </channel>
</rss>

