<?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: Pro/TOOLKIT: how to assign a texture with ProMdlVisibleTexturepropsSet() in Customization</title>
    <link>https://www.ptcusercommunity.com/t5/Customization/Pro-TOOLKIT-how-to-assign-a-texture-with/m-p/481128#M594</link>
    <description>&lt;P&gt;I have done that in pro develop in the past. But there are some stuff that didn't work at the moment, also inside the Coloring / Appearance section (remove color has some bugs). We have written Marc Fischer to that, but he is on vocation atm.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Br,&lt;/P&gt;
&lt;P&gt;Eike&lt;/P&gt;</description>
    <pubDate>Wed, 09 Aug 2017 06:18:53 GMT</pubDate>
    <dc:creator>Eike_Hauptmann</dc:creator>
    <dc:date>2017-08-09T06:18:53Z</dc:date>
    <item>
      <title>Pro/TOOLKIT: how to assign a texture with ProMdlVisibleTexturepropsSet()</title>
      <link>https://www.ptcusercommunity.com/t5/Customization/Pro-TOOLKIT-how-to-assign-a-texture-with/m-p/481093#M592</link>
      <description>&lt;P&gt;Hi to everyone,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;did anyone manage to assign a texture to a surface using Pro/TOOLKIT???&lt;/P&gt;
&lt;P&gt;I managed to use the "new" (starting with Creo2 M140) Toolkit function&amp;nbsp;ProMdlVisibleAppearancepropsGet() and&amp;nbsp;ProMdlVisibleAppearancepropsSet() to assign a color to a comp/surface etc.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;ProMdlVisibleTexturepropsSet() works as expected. But it seems that this isn't enough to display a texture on a surface. I think I must use&amp;nbsp;ProMdlVisibleTextureplacementpropsSet() to define how the texture is placed/projected and so on. This function always returns -2 (INVALID INPUT)....&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Before I paste some code here - WAS ANYONE HERE ABLE TO DO THIS?&lt;/P&gt;
&lt;P&gt;Any tricks on how to define the&amp;nbsp;ProSurfaceTexturePlacementProps object/pointer???&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;THANKS.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Andreas&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;
&lt;P&gt;Andreas&lt;/P&gt;</description>
      <pubDate>Fri, 30 Nov 2018 15:41:05 GMT</pubDate>
      <guid>https://www.ptcusercommunity.com/t5/Customization/Pro-TOOLKIT-how-to-assign-a-texture-with/m-p/481093#M592</guid>
      <dc:creator>AndreasHellmann</dc:creator>
      <dc:date>2018-11-30T15:41:05Z</dc:date>
    </item>
    <item>
      <title>Re: Pro/TOOLKIT: how to assign a texture with ProMdlVisibleTexturepropsSet()</title>
      <link>https://www.ptcusercommunity.com/t5/Customization/Pro-TOOLKIT-how-to-assign-a-texture-with/m-p/481125#M593</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I hope that you asked PTC Support the same question &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 09 Aug 2017 05:26:22 GMT</pubDate>
      <guid>https://www.ptcusercommunity.com/t5/Customization/Pro-TOOLKIT-how-to-assign-a-texture-with/m-p/481125#M593</guid>
      <dc:creator>MartinHanak</dc:creator>
      <dc:date>2017-08-09T05:26:22Z</dc:date>
    </item>
    <item>
      <title>Re: Pro/TOOLKIT: how to assign a texture with ProMdlVisibleTexturepropsSet()</title>
      <link>https://www.ptcusercommunity.com/t5/Customization/Pro-TOOLKIT-how-to-assign-a-texture-with/m-p/481128#M594</link>
      <description>&lt;P&gt;I have done that in pro develop in the past. But there are some stuff that didn't work at the moment, also inside the Coloring / Appearance section (remove color has some bugs). We have written Marc Fischer to that, but he is on vocation atm.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Br,&lt;/P&gt;
&lt;P&gt;Eike&lt;/P&gt;</description>
      <pubDate>Wed, 09 Aug 2017 06:18:53 GMT</pubDate>
      <guid>https://www.ptcusercommunity.com/t5/Customization/Pro-TOOLKIT-how-to-assign-a-texture-with/m-p/481128#M594</guid>
      <dc:creator>Eike_Hauptmann</dc:creator>
      <dc:date>2017-08-09T06:18:53Z</dc:date>
    </item>
    <item>
      <title>Re: Pro/TOOLKIT: how to assign a texture with ProMdlVisibleTexturepropsSet()</title>
      <link>https://www.ptcusercommunity.com/t5/Customization/Pro-TOOLKIT-how-to-assign-a-texture-with/m-p/481485#M595</link>
      <description>&lt;P&gt;Thanks for the replies also when they do not help to solve the problem.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;My problem here in Germany is that I have only one Creo license and one toolkit license. And I am no longer allowed to open a case for PTC's customer support although I am paying 1.000 Euro "maintainance" PER MONTH.................&lt;/P&gt;
&lt;P&gt;I have to ask a reseller and that's usually a complete waste of time; I could also ask my neighbor's dog.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Andreas&lt;/P&gt;</description>
      <pubDate>Sat, 12 Aug 2017 11:13:11 GMT</pubDate>
      <guid>https://www.ptcusercommunity.com/t5/Customization/Pro-TOOLKIT-how-to-assign-a-texture-with/m-p/481485#M595</guid>
      <dc:creator>AndreasHellmann</dc:creator>
      <dc:date>2017-08-12T11:13:11Z</dc:date>
    </item>
    <item>
      <title>Re: Pro/TOOLKIT: how to assign a texture with ProMdlVisibleTexturepropsSet()</title>
      <link>https://www.ptcusercommunity.com/t5/Customization/Pro-TOOLKIT-how-to-assign-a-texture-with/m-p/481489#M596</link>
      <description>&lt;P&gt;I understand the reseller problem, so I working for one. Such calls costs much of time so you need to help PTC to understand, prove it and check if it solved, ... . So it's cost effective for a reseller too. Fast you're spending a day of work and so we everytime check if it's a showstopper, or can we life with a workaround.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;So I'm not able atm to check your problem and also not able to open a case for you (so I don't have the time atm). We have just push in the set appeareance problems as a bug and I try to add this, but didn't think they will fix it if it's a bug because we didn't program out the case and push in the code, ... .&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Sorry&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Br,&lt;/P&gt;
&lt;P&gt;Eike&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sat, 12 Aug 2017 15:43:08 GMT</pubDate>
      <guid>https://www.ptcusercommunity.com/t5/Customization/Pro-TOOLKIT-how-to-assign-a-texture-with/m-p/481489#M596</guid>
      <dc:creator>Eike_Hauptmann</dc:creator>
      <dc:date>2017-08-12T15:43:08Z</dc:date>
    </item>
    <item>
      <title>Re: Pro/TOOLKIT: how to assign a texture with ProMdlVisibleTexturepropsSet()</title>
      <link>https://www.ptcusercommunity.com/t5/Customization/Pro-TOOLKIT-how-to-assign-a-texture-with/m-p/481736#M597</link>
      <description>Hi all,
Andreas, 
The first step is to verify that config.pro 'texture' option is 'yes'.

The tricky part of the function is ProAsmitem - the usual initialization:
ProAsmitem item;
memset( &amp;amp;item, '\0', sizeof(item));

Setting the ProAsmitem, assuming that the part's ProMdl is mdl and it was initialized somehow (ProMdlCurrentGet or ProAsmcomppathMdlGet or ProMdlInit) ...

ProMdlToModelitem( mdl, &amp;amp;item.item);
item.name[0] = '\0';//redundant
ProAsmcomppathInit( mdl, NULL, 0, &amp;amp;item.path); //for part or
//ProSelectionAsmcomppathGet( sel, &amp;amp;item.path); //for a selected component in case of an assembly...

The rest is straightforward - for testing - you should assign an existing texture to a model via UI,
retrieve the texture with ProMdlVisibleTexturepropsGet(&amp;amp;item, &amp;amp;props);
modify props.texture_map member with another bitmap - try to use one from the default library:
strcpy( props.texture_map, "limestone-bump.jpg"); // for example
and assign the modified texture to the model with :
ProMdlVisibleTexturepropsSet(&amp;amp;item, &amp;amp;props);
repaint window.

HIH.
Feliks.</description>
      <pubDate>Wed, 16 Aug 2017 16:29:16 GMT</pubDate>
      <guid>https://www.ptcusercommunity.com/t5/Customization/Pro-TOOLKIT-how-to-assign-a-texture-with/m-p/481736#M597</guid>
      <dc:creator>FV</dc:creator>
      <dc:date>2017-08-16T16:29:16Z</dc:date>
    </item>
    <item>
      <title>Re: Pro/TOOLKIT: how to assign a texture with ProMdlVisibleTexturepropsSet()</title>
      <link>https://www.ptcusercommunity.com/t5/Customization/Pro-TOOLKIT-how-to-assign-a-texture-with/m-p/573277#M7784</link>
      <description>&lt;P&gt;hi all,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I get same problem in&amp;nbsp;ProSurfaceTextureplacementpropsSet(),&lt;/P&gt;
&lt;P&gt;the function always return PRO_TK_BAD_INPUTS.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I can use the ProSurfaceTexturepropsSet() set the surface texture image,&lt;/P&gt;
&lt;P&gt;the part view also show the image,but actually the UI dialog -&amp;gt;color texture option is "off"&lt;/P&gt;
&lt;P&gt;this problem make the part view&amp;nbsp;blurred,&lt;/P&gt;
&lt;P&gt;so i want to use the&amp;nbsp;&lt;SPAN&gt;ProSurfaceTextureplacementpropsSet() improve the view,&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;but it's always return&amp;nbsp;PRO_TK_BAD_INPUTS.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;anyone know how to change the&amp;nbsp;color texture option&amp;nbsp;to image?&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;or&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;&amp;nbsp;know how to use&amp;nbsp;ProSurfaceTextureplacementpropsSet()?&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;thanks!!!&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 25 Sep 2018 05:23:09 GMT</pubDate>
      <guid>https://www.ptcusercommunity.com/t5/Customization/Pro-TOOLKIT-how-to-assign-a-texture-with/m-p/573277#M7784</guid>
      <dc:creator>CAD_Jimmy</dc:creator>
      <dc:date>2018-09-25T05:23:09Z</dc:date>
    </item>
  </channel>
</rss>

