<?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: casting ProFeature to ProAsmcomppath ? in Customization</title>
    <link>https://www.ptcusercommunity.com/t5/Customization/casting-ProFeature-to-ProAsmcomppath/m-p/549861#M7090</link>
    <description>&lt;P&gt;You can't cast, would &lt;STRONG&gt;not&lt;/STRONG&gt; make sense. If you have a select structure, extract the path from here and use&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;tk_status = ProAsmcomppathTrfGet (&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;amp;pathPtr,&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;bottom_up,&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;matrixPtr);&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If not, you have to search it, and init a component path, this may fun if the component is assembled more then once.&lt;/P&gt;
&lt;P&gt;&lt;IMG src="https://www.ptcusercommunity.com/t5/image/serverpage/image-id/7576i0025E9F5D95EF17F/image-size/original?v=1.0&amp;amp;px=-1" border="0" alt="neumann001040.png" title="neumann001040.png" /&gt;&lt;/P&gt;
&lt;P&gt;In the sample assembly hierarchy, subassembly C is component identifier 9 within assembly A, Part B is component identifier 2 within assembly C, and so on. The subassembly AB occurs twice (contain same ID's). To refer to the two occurrences of part B, use the following int array:&lt;/P&gt;
&lt;P&gt;9,&amp;nbsp;2 or/or 2, 3, 4, 5, 4&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Good luck &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&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>Tue, 22 May 2018 16:50:31 GMT</pubDate>
    <dc:creator>RPN</dc:creator>
    <dc:date>2018-05-22T16:50:31Z</dc:date>
    <item>
      <title>casting ProFeature to ProAsmcomppath ?</title>
      <link>https://www.ptcusercommunity.com/t5/Customization/casting-ProFeature-to-ProAsmcomppath/m-p/549802#M7087</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I use&amp;nbsp;ProSolidFeatVisit to get the assembly component, the output data type is &amp;lt;&lt;SPAN&gt;ProFeature&amp;gt;&lt;/SPAN&gt;. (i put code below)&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Now, I want to get the t&lt;SPAN&gt;ransformation matrix of two csys,&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;but ,&amp;nbsp;ProAsmcomppathTrfGet need the input &amp;lt;ProAsmcomppath&amp;gt; ,&lt;/SPAN&gt;&lt;SPAN&gt;i don't know how to get it.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;And is possible to change the ProFeature to ProAsmcomppath?&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;hope someone can help me.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;thanks.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;P.S.&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN style="font-family: inherit;"&gt;I&lt;/SPAN&gt;&lt;SPAN style="font-family: inherit;"&gt;&amp;nbsp;don't have the memb_id_tab, so i can't use ProAsmcomppathInit .&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN style="font-family: inherit;"&gt;the&amp;nbsp;code that get all part&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;ProError getAsmFeature( ProMdl asm_mdl,ProFeature** appdata)&lt;BR /&gt;{&lt;BR /&gt; ProError err;&lt;BR /&gt; err = ProArrayAlloc(0, sizeof(ProFeature), 1, (ProArray*)appdata);&lt;/P&gt;
&lt;P&gt;err = ProSolidFeatVisit((ProSolid)asm_mdl,FeatureVisitActionFn,&lt;BR /&gt; FeatureFilterActionFn,(ProAppData)&amp;amp;appdata);&lt;BR /&gt; return err;&lt;BR /&gt;}&lt;/P&gt;
&lt;P&gt;ProError FeatureVisitActionFn(ProFeature *feature,ProError err,ProAppData app_data)&lt;BR /&gt;{&lt;BR /&gt; ProMdl prtMdl;&lt;BR /&gt; ProMdlType p_type;&lt;BR /&gt; ProArray *pArray;&lt;BR /&gt; pArray=(ProArray*)((ProSurface **)app_data)[0];&lt;BR /&gt; err=ProAsmcompMdlGet(feature , &amp;amp;prtMdl);&lt;BR /&gt; err=ProMdlTypeGet(prtMdl,&amp;amp;p_type);&lt;/P&gt;
&lt;P&gt;if (p_type == PRO_MDL_PART)&lt;BR /&gt; {&lt;BR /&gt; err=ProArrayObjectAdd(pArray,PRO_VALUE_UNUSED,1,feature); &lt;BR /&gt; }&lt;BR /&gt; else if (p_type == PRO_MDL_ASSEMBLY)&lt;BR /&gt; {&lt;BR /&gt; err = ProSolidFeatVisit((ProSolid)prtMdl, FeatureVisitActionFn, FeatureFilterActionFn, app_data);&lt;BR /&gt; }&lt;BR /&gt; if (feature != NULL) return(PRO_TK_NO_ERROR);&lt;BR /&gt; return(PRO_TK_CONTINUE);&lt;BR /&gt;}&lt;/P&gt;
&lt;P&gt;ProError FeatureFilterActionFn(ProFeature *feature,ProAppData app_data)&lt;BR /&gt;{&lt;BR /&gt; ProFeattype FeatType;&lt;BR /&gt; ProFeatureTypeGet(feature,&amp;amp;FeatType);&lt;BR /&gt; if (FeatType==PRO_FEAT_COMPONENT)&amp;nbsp;&lt;BR /&gt; return PRO_TK_NO_ERROR;&lt;BR /&gt; else&lt;BR /&gt; return PRO_TK_CONTINUE;&lt;BR /&gt;}&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 22 May 2018 12:33:41 GMT</pubDate>
      <guid>https://www.ptcusercommunity.com/t5/Customization/casting-ProFeature-to-ProAsmcomppath/m-p/549802#M7087</guid>
      <dc:creator>CAD_Jimmy</dc:creator>
      <dc:date>2018-05-22T12:33:41Z</dc:date>
    </item>
    <item>
      <title>Re: casting ProFeature to ProAsmcomppath ?</title>
      <link>https://www.ptcusercommunity.com/t5/Customization/casting-ProFeature-to-ProAsmcomppath/m-p/549861#M7090</link>
      <description>&lt;P&gt;You can't cast, would &lt;STRONG&gt;not&lt;/STRONG&gt; make sense. If you have a select structure, extract the path from here and use&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;tk_status = ProAsmcomppathTrfGet (&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;amp;pathPtr,&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;bottom_up,&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;matrixPtr);&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If not, you have to search it, and init a component path, this may fun if the component is assembled more then once.&lt;/P&gt;
&lt;P&gt;&lt;IMG src="https://www.ptcusercommunity.com/t5/image/serverpage/image-id/7576i0025E9F5D95EF17F/image-size/original?v=1.0&amp;amp;px=-1" border="0" alt="neumann001040.png" title="neumann001040.png" /&gt;&lt;/P&gt;
&lt;P&gt;In the sample assembly hierarchy, subassembly C is component identifier 9 within assembly A, Part B is component identifier 2 within assembly C, and so on. The subassembly AB occurs twice (contain same ID's). To refer to the two occurrences of part B, use the following int array:&lt;/P&gt;
&lt;P&gt;9,&amp;nbsp;2 or/or 2, 3, 4, 5, 4&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Good luck &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&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>Tue, 22 May 2018 16:50:31 GMT</pubDate>
      <guid>https://www.ptcusercommunity.com/t5/Customization/casting-ProFeature-to-ProAsmcomppath/m-p/549861#M7090</guid>
      <dc:creator>RPN</dc:creator>
      <dc:date>2018-05-22T16:50:31Z</dc:date>
    </item>
    <item>
      <title>Re: casting ProFeature to ProAsmcomppath ?</title>
      <link>https://www.ptcusercommunity.com/t5/Customization/casting-ProFeature-to-ProAsmcomppath/m-p/550227#M7106</link>
      <description>Just a thought...!!&lt;BR /&gt;&lt;BR /&gt;Are you trying to find t matrix for two different components of assembly?? If so, do use comppath visit (I can say exact API if you wish) instead of feature visit.</description>
      <pubDate>Thu, 24 May 2018 18:07:32 GMT</pubDate>
      <guid>https://www.ptcusercommunity.com/t5/Customization/casting-ProFeature-to-ProAsmcomppath/m-p/550227#M7106</guid>
      <dc:creator>Ketan_Lalcheta</dc:creator>
      <dc:date>2018-05-24T18:07:32Z</dc:date>
    </item>
    <item>
      <title>Re: casting ProFeature to ProAsmcomppath ?</title>
      <link>https://www.ptcusercommunity.com/t5/Customization/casting-ProFeature-to-ProAsmcomppath/m-p/550506#M7119</link>
      <description>&lt;P&gt;&lt;SPAN&gt;Thank you for the reply.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Finally, i use the function &amp;lt;ProSolidDispCompVisit&amp;gt; instead of &amp;lt;&amp;nbsp;ProSolidFeatVisit&amp;nbsp;&amp;gt;.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;The visit function can get the part handle and the assembly component path.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;So,&amp;nbsp;i can also use &amp;lt;ProAsmcomppathTrfGet&amp;gt; to get the&amp;nbsp;&amp;nbsp;transformation matrix of two csys.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 28 May 2018 03:37:44 GMT</pubDate>
      <guid>https://www.ptcusercommunity.com/t5/Customization/casting-ProFeature-to-ProAsmcomppath/m-p/550506#M7119</guid>
      <dc:creator>CAD_Jimmy</dc:creator>
      <dc:date>2018-05-28T03:37:44Z</dc:date>
    </item>
  </channel>
</rss>

