<?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: Is it possible to automatically call a Java function each time when an object is edited? in Windchill Customization</title>
    <link>https://www.ptcusercommunity.com/t5/Windchill-Customization/Is-it-possible-to-automatically-call-a-Java-function-each-time/m-p/927236#M408</link>
    <description>&lt;P&gt;Another option is a listener which can pick up on check in events for Parts. It can do whatever you want. I have a few running. They are well documented in the customers guide.&lt;/P&gt;</description>
    <pubDate>Wed, 31 Jan 2024 13:02:30 GMT</pubDate>
    <dc:creator>avillanueva</dc:creator>
    <dc:date>2024-01-31T13:02:30Z</dc:date>
    <item>
      <title>Is it possible to automatically call a Java function each time when an object is edited?</title>
      <link>https://www.ptcusercommunity.com/t5/Windchill-Customization/Is-it-possible-to-automatically-call-a-Java-function-each-time/m-p/925680#M405</link>
      <description>&lt;P&gt;Hi, I just added a new property called "price" to WTPart. I want to know that,&amp;nbsp;when adding children to a parent WTPart, are there ways to calculate and update the total price of a parent WTPart automatically, by adding the prices of its children WTPart together?&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;For example, A is the final product, B ($5) and C ($10) are children of A. First I create A, leave the price blank. Then I add C to A as a child, I would like to see the "price" property of A automatically updated to $10. Then add B to A as a child, the price of A is updated to $15.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I'm using Windchill 12.1, just wondering if it's possible. I'm new to customization of windchill but have some experiences in Java programming, so if yes, could you please also tell me what are the steps I should do?&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you!&lt;/P&gt;</description>
      <pubDate>Fri, 15 Mar 2024 13:46:57 GMT</pubDate>
      <guid>https://www.ptcusercommunity.com/t5/Windchill-Customization/Is-it-possible-to-automatically-call-a-Java-function-each-time/m-p/925680#M405</guid>
      <dc:creator>TS_10782016</dc:creator>
      <dc:date>2024-03-15T13:46:57Z</dc:date>
    </item>
    <item>
      <title>Re: Is it possible to automatically call a Java function each time when an object is edited?</title>
      <link>https://www.ptcusercommunity.com/t5/Windchill-Customization/Is-it-possible-to-automatically-call-a-Java-function-each-time/m-p/927162#M406</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://www.ptcusercommunity.com/t5/user/viewprofilepage/user-id/784738"&gt;@TS_10782016&lt;/a&gt;,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Write a datautility on price attribute of parent part.&lt;/P&gt;&lt;P&gt;Add a logic to traverse the part structure, calculate the price value of all child parts and return the total value.&lt;/P&gt;&lt;P&gt;In the below article you will find how to resgiter the data utlity.&lt;/P&gt;&lt;P&gt;&lt;A href="https://www.ptc.com/en/support/article/CS368786?source=search" target="_blank"&gt;https://www.ptc.com/en/support/article/CS368786?source=search&lt;/A&gt;&lt;/P&gt;&lt;P&gt;Also, There is a attribute called calculated attribute.&lt;/P&gt;&lt;P&gt;The above use case should also be able to acheive from calculated attribute.&lt;/P&gt;</description>
      <pubDate>Wed, 31 Jan 2024 08:25:52 GMT</pubDate>
      <guid>https://www.ptcusercommunity.com/t5/Windchill-Customization/Is-it-possible-to-automatically-call-a-Java-function-each-time/m-p/927162#M406</guid>
      <dc:creator>TDT</dc:creator>
      <dc:date>2024-01-31T08:25:52Z</dc:date>
    </item>
    <item>
      <title>Re: Is it possible to automatically call a Java function each time when an object is edited?</title>
      <link>https://www.ptcusercommunity.com/t5/Windchill-Customization/Is-it-possible-to-automatically-call-a-Java-function-each-time/m-p/927232#M407</link>
      <description>&lt;P&gt;This sounds like a case for a calculated attribute:&lt;/P&gt;
&lt;P&gt;&lt;A href="https://www.ptc.com/en/support/article/CS361192?source=search" target="_blank"&gt;https://www.ptc.com/en/support/article/CS361192?source=search&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;Maybe a customization is needed. I am not sure of when its invoke but the scenario you are describing is that the parent attribute can keep changing without the parent object being iterated.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 31 Jan 2024 12:59:17 GMT</pubDate>
      <guid>https://www.ptcusercommunity.com/t5/Windchill-Customization/Is-it-possible-to-automatically-call-a-Java-function-each-time/m-p/927232#M407</guid>
      <dc:creator>avillanueva</dc:creator>
      <dc:date>2024-01-31T12:59:17Z</dc:date>
    </item>
    <item>
      <title>Re: Is it possible to automatically call a Java function each time when an object is edited?</title>
      <link>https://www.ptcusercommunity.com/t5/Windchill-Customization/Is-it-possible-to-automatically-call-a-Java-function-each-time/m-p/927236#M408</link>
      <description>&lt;P&gt;Another option is a listener which can pick up on check in events for Parts. It can do whatever you want. I have a few running. They are well documented in the customers guide.&lt;/P&gt;</description>
      <pubDate>Wed, 31 Jan 2024 13:02:30 GMT</pubDate>
      <guid>https://www.ptcusercommunity.com/t5/Windchill-Customization/Is-it-possible-to-automatically-call-a-Java-function-each-time/m-p/927236#M408</guid>
      <dc:creator>avillanueva</dc:creator>
      <dc:date>2024-01-31T13:02:30Z</dc:date>
    </item>
    <item>
      <title>Re: Is it possible to automatically call a Java function each time when an object is edited?</title>
      <link>https://www.ptcusercommunity.com/t5/Windchill-Customization/Is-it-possible-to-automatically-call-a-Java-function-each-time/m-p/927371#M409</link>
      <description>&lt;P&gt;Hi Avillanueva,&lt;/P&gt;&lt;P&gt;I just finished the customization using listener and it works well! Thank you&lt;/P&gt;</description>
      <pubDate>Thu, 01 Feb 2024 01:31:00 GMT</pubDate>
      <guid>https://www.ptcusercommunity.com/t5/Windchill-Customization/Is-it-possible-to-automatically-call-a-Java-function-each-time/m-p/927371#M409</guid>
      <dc:creator>TS_10782016</dc:creator>
      <dc:date>2024-02-01T01:31:00Z</dc:date>
    </item>
    <item>
      <title>Re: Is it possible to automatically call a Java function each time when an object is edited?</title>
      <link>https://www.ptcusercommunity.com/t5/Windchill-Customization/Is-it-possible-to-automatically-call-a-Java-function-each-time/m-p/974802#M8782</link>
      <description>&lt;P&gt;Thats the exact example they have in the help for "Using a BusinessAlgorithm in a Calculated Attribute".&amp;nbsp; &amp;nbsp;In that example, all you do is define an attribute that hold the value of the individual object (say "Price") and a calculated attribute that holes the totals (say "Total Price") with the calculated field filled in as:&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;execute("FloatCarambolaAttributeSumBusinessAlgorithm","Price")&lt;/EM&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;A href="https://support.ptc.com/help/windchill/r12.1.2.0/en/index.html#page/Windchill_Help_Center/customization/WCCG_BusLogicCust_TypeManager_CalculatedAttribute_SampleCode.html" target="_blank"&gt;https://support.ptc.com/help/windchill/r12.1.2.0/en/index.html#page/Windchill_Help_Center/customization/WCCG_BusLogicCust_TypeManager_CalculatedAttribute_SampleCode.html&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 30 Sep 2024 16:17:03 GMT</pubDate>
      <guid>https://www.ptcusercommunity.com/t5/Windchill-Customization/Is-it-possible-to-automatically-call-a-Java-function-each-time/m-p/974802#M8782</guid>
      <dc:creator>DM_ertz</dc:creator>
      <dc:date>2024-09-30T16:17:03Z</dc:date>
    </item>
  </channel>
</rss>

