<?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 how to convert model to relationmodelowner in Customization</title>
    <link>https://www.ptcusercommunity.com/t5/Customization/how-to-convert-model-to-relationmodelowner/m-p/716338#M10177</link>
    <description>&lt;P&gt;Hi&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I have model object and want to convert it to relation owner object for weblink. How to get the same?&lt;/P&gt;</description>
    <pubDate>Tue, 02 Mar 2021 14:04:16 GMT</pubDate>
    <dc:creator>Ketan_Lalcheta</dc:creator>
    <dc:date>2021-03-02T14:04:16Z</dc:date>
    <item>
      <title>how to convert model to relationmodelowner</title>
      <link>https://www.ptcusercommunity.com/t5/Customization/how-to-convert-model-to-relationmodelowner/m-p/716338#M10177</link>
      <description>&lt;P&gt;Hi&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I have model object and want to convert it to relation owner object for weblink. How to get the same?&lt;/P&gt;</description>
      <pubDate>Tue, 02 Mar 2021 14:04:16 GMT</pubDate>
      <guid>https://www.ptcusercommunity.com/t5/Customization/how-to-convert-model-to-relationmodelowner/m-p/716338#M10177</guid>
      <dc:creator>Ketan_Lalcheta</dc:creator>
      <dc:date>2021-03-02T14:04:16Z</dc:date>
    </item>
    <item>
      <title>Re: how to convert model to relationmodelowner</title>
      <link>https://www.ptcusercommunity.com/t5/Customization/how-to-convert-model-to-relationmodelowner/m-p/716596#M10180</link>
      <description>&lt;P&gt;Model is already RealtionOwner because Model extends RelationOwner .. I have not used weblink but in Jlink I would do this:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Model model = session.GetCurrentModel();&lt;/P&gt;
&lt;P&gt;RelationOwner relOwner = (RelationOwner) model; //casting model to relation owner, but I suppose you do not have to cast it in javascript because it is dynamically typed language so it will automatically handle inheritence&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;However I do not have to cast it in Jlink because it already have RelationOwner methods so both of theese is valid:&lt;/P&gt;
&lt;P&gt;model.GetRelations();&lt;/P&gt;
&lt;P&gt;relOwner.GetRelations();&lt;/P&gt;</description>
      <pubDate>Wed, 03 Mar 2021 10:49:49 GMT</pubDate>
      <guid>https://www.ptcusercommunity.com/t5/Customization/how-to-convert-model-to-relationmodelowner/m-p/716596#M10180</guid>
      <dc:creator>sjuraj</dc:creator>
      <dc:date>2021-03-03T10:49:49Z</dc:date>
    </item>
  </channel>
</rss>

