<?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: Drawing repeat region if-statement does nothing in 3D Part &amp; Assembly Design</title>
    <link>https://www.ptcusercommunity.com/t5/3D-Part-Assembly-Design/Drawing-repeat-region-if-statement-does-nothing/m-p/1046474#M142186</link>
    <description>&lt;P&gt;Hi&lt;BR /&gt;If I understand what you want correctly, try this.&lt;/P&gt;&lt;LI-CODE lang="c"&gt;IF MASS_UNIT == "g"
mass=MDL_GENERIC_PRO_MP_MASS*1000
ELSE
mass=MDL_GENERIC_PRO_MP_MASS
ENDIF&lt;/LI-CODE&gt;&lt;P&gt;&lt;BR /&gt;For automatic g/kg switching, I use this&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="c"&gt;mass=MDL_GENERIC_PRO_MP_MASS
IF mass != 0
  IF mass &amp;lt; 0.1
  massg = MDL_GENERIC_PRO_MP_MASS * 1000
    IF massg &amp;lt; 1
    massg2 = massg * 100
    mass = "0." + rtos(massg2) + " g"
   ELSE
    mass= rtos(massg) + " g"
    ENDIF
ELSE
mass = rtos(MDL_GENERIC_PRO_MP_MASS) + " kg"
  ENDIF
ENDIF&lt;/LI-CODE&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="mass.PNG" style="width: 999px;"&gt;&lt;img src="https://www.ptcusercommunity.com/t5/image/serverpage/image-id/132048i882AE4154F08D836/image-size/large?v=v2&amp;amp;px=999" role="button" title="mass.PNG" alt="mass.PNG" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="mass1.PNG" style="width: 999px;"&gt;&lt;img src="https://www.ptcusercommunity.com/t5/image/serverpage/image-id/132047i2AB22580EB5160A3/image-size/large?v=v2&amp;amp;px=999" role="button" title="mass1.PNG" alt="mass1.PNG" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;DIV class=""&gt;&lt;DIV class=""&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;/DIV&gt;&lt;DIV class=""&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV class=""&gt;&lt;DIV class=""&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV class=""&gt;&amp;nbsp;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;</description>
    <pubDate>Fri, 05 Dec 2025 19:28:52 GMT</pubDate>
    <dc:creator>Voronov</dc:creator>
    <dc:date>2025-12-05T19:28:52Z</dc:date>
    <item>
      <title>Drawing repeat region if-statement does nothing</title>
      <link>https://www.ptcusercommunity.com/t5/3D-Part-Assembly-Design/Drawing-repeat-region-if-statement-does-nothing/m-p/1045950#M142125</link>
      <description>&lt;P&gt;Hi,&lt;BR /&gt;&lt;BR /&gt;is it possible to perform a calculation based on an if-statement in a drawing repeat region relation?&lt;/P&gt;&lt;P&gt;Prerequisite:&lt;/P&gt;&lt;P&gt;Model units: mm Kg s&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I would like to multiply mdl_pro_mp_mass by 1000 if model parameter mass_unit is set to g instead of kg.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Something like this:&lt;/P&gt;&lt;P&gt;mass_display = mdl_pro_mp_mass&lt;BR /&gt;if mass_unit == "g"&lt;BR /&gt;mass_display = mdl_pro_mp_mass * 1000&lt;BR /&gt;endif&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;It's only the IF that doesn't work; the calculation works fine if tested separately.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;It works in a Post Regeneration relation in the model (using pro_mp_mass instead of mdl_pro_mp_mass), but I would like to not add the relation in the model.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Tested on both Creo 9.0.3.0 and 11.0.6.0&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Any suggestions?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks in advance! &lt;span class="lia-unicode-emoji" title=":vulcan_salute:"&gt;🖖&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 03 Dec 2025 10:14:05 GMT</pubDate>
      <guid>https://www.ptcusercommunity.com/t5/3D-Part-Assembly-Design/Drawing-repeat-region-if-statement-does-nothing/m-p/1045950#M142125</guid>
      <dc:creator>C4DG33K</dc:creator>
      <dc:date>2025-12-03T10:14:05Z</dc:date>
    </item>
    <item>
      <title>Re: Drawing repeat region if-statement does nothing</title>
      <link>https://www.ptcusercommunity.com/t5/3D-Part-Assembly-Design/Drawing-repeat-region-if-statement-does-nothing/m-p/1046005#M142128</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;I think you can test parameters mentioned in&amp;nbsp;&lt;A href="https://www.youtube.com/watch?v=qiQvnxVwUqk" target="_blank"&gt;https://www.youtube.com/watch?v=qiQvnxVwUqk&lt;/A&gt;&amp;nbsp;video in Creo 11.0.&lt;/P&gt;
&lt;P&gt;Note: I have never done such test,&lt;/P&gt;
&lt;P&gt;Note: I got the link when I asked Google ...&amp;nbsp;creo model parameter for units&lt;/P&gt;</description>
      <pubDate>Wed, 03 Dec 2025 15:08:00 GMT</pubDate>
      <guid>https://www.ptcusercommunity.com/t5/3D-Part-Assembly-Design/Drawing-repeat-region-if-statement-does-nothing/m-p/1046005#M142128</guid>
      <dc:creator>MartinHanak</dc:creator>
      <dc:date>2025-12-03T15:08:00Z</dc:date>
    </item>
    <item>
      <title>Re: Drawing repeat region if-statement does nothing</title>
      <link>https://www.ptcusercommunity.com/t5/3D-Part-Assembly-Design/Drawing-repeat-region-if-statement-does-nothing/m-p/1046344#M142169</link>
      <description>&lt;P&gt;Hi Martin.&lt;BR /&gt;That's nifty but not what I'm looking for.&lt;BR /&gt;We don't want to change the model units, just choose a different presented unit on the drawing if the model is very small or have a low mass.&lt;/P&gt;&lt;P&gt;Our models span between parts of a gram (small injection molded polymers) to tens of kilograms (casted and/or turned/milled metal) and would like to present the mass accordingly.&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;Thanks for the suggestion, will look at it when we update to Creo 11!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-unicode-emoji" title=":vulcan_salute:"&gt;🖖&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 05 Dec 2025 09:57:41 GMT</pubDate>
      <guid>https://www.ptcusercommunity.com/t5/3D-Part-Assembly-Design/Drawing-repeat-region-if-statement-does-nothing/m-p/1046344#M142169</guid>
      <dc:creator>C4DG33K</dc:creator>
      <dc:date>2025-12-05T09:57:41Z</dc:date>
    </item>
    <item>
      <title>Re: Drawing repeat region if-statement does nothing</title>
      <link>https://www.ptcusercommunity.com/t5/3D-Part-Assembly-Design/Drawing-repeat-region-if-statement-does-nothing/m-p/1046368#M142172</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://www.ptcusercommunity.com/t5/user/viewprofilepage/user-id/197962"&gt;@C4DG33K&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;Hi Martin.&lt;BR /&gt;That's nifty but not what I'm looking for.&lt;BR /&gt;We don't want to change the model units, just choose a different presented unit on the drawing if the model is very small or have a low mass.&lt;/P&gt;
&lt;P&gt;Our models span between parts of a gram (small injection molded polymers) to tens of kilograms (casted and/or turned/milled metal) and would like to present the mass accordingly.&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;
&lt;P&gt;Thanks for the suggestion, will look at it when we update to Creo 11!&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-unicode-emoji" title=":vulcan_salute:"&gt;🖖&lt;/span&gt;&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;after little Google searching I found following link&lt;/P&gt;
&lt;P&gt;&lt;A href="https://community.ptc.com/t5/3D-Part-Assembly-Design/Reporting-Model-Unit-Information-in-a-Repeat-Region/td-p/447126" target="_blank"&gt;https://community.ptc.com/t5/3D-Part-Assembly-Design/Reporting-Model-Unit-Information-in-a-Repeat-Region/td-p/447126&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Unfortunately this solution requires modification of existing models.&lt;/P&gt;</description>
      <pubDate>Fri, 05 Dec 2025 11:43:43 GMT</pubDate>
      <guid>https://www.ptcusercommunity.com/t5/3D-Part-Assembly-Design/Drawing-repeat-region-if-statement-does-nothing/m-p/1046368#M142172</guid>
      <dc:creator>MartinHanak</dc:creator>
      <dc:date>2025-12-05T11:43:43Z</dc:date>
    </item>
    <item>
      <title>Re: Drawing repeat region if-statement does nothing</title>
      <link>https://www.ptcusercommunity.com/t5/3D-Part-Assembly-Design/Drawing-repeat-region-if-statement-does-nothing/m-p/1046474#M142186</link>
      <description>&lt;P&gt;Hi&lt;BR /&gt;If I understand what you want correctly, try this.&lt;/P&gt;&lt;LI-CODE lang="c"&gt;IF MASS_UNIT == "g"
mass=MDL_GENERIC_PRO_MP_MASS*1000
ELSE
mass=MDL_GENERIC_PRO_MP_MASS
ENDIF&lt;/LI-CODE&gt;&lt;P&gt;&lt;BR /&gt;For automatic g/kg switching, I use this&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="c"&gt;mass=MDL_GENERIC_PRO_MP_MASS
IF mass != 0
  IF mass &amp;lt; 0.1
  massg = MDL_GENERIC_PRO_MP_MASS * 1000
    IF massg &amp;lt; 1
    massg2 = massg * 100
    mass = "0." + rtos(massg2) + " g"
   ELSE
    mass= rtos(massg) + " g"
    ENDIF
ELSE
mass = rtos(MDL_GENERIC_PRO_MP_MASS) + " kg"
  ENDIF
ENDIF&lt;/LI-CODE&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="mass.PNG" style="width: 999px;"&gt;&lt;img src="https://www.ptcusercommunity.com/t5/image/serverpage/image-id/132048i882AE4154F08D836/image-size/large?v=v2&amp;amp;px=999" role="button" title="mass.PNG" alt="mass.PNG" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="mass1.PNG" style="width: 999px;"&gt;&lt;img src="https://www.ptcusercommunity.com/t5/image/serverpage/image-id/132047i2AB22580EB5160A3/image-size/large?v=v2&amp;amp;px=999" role="button" title="mass1.PNG" alt="mass1.PNG" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;DIV class=""&gt;&lt;DIV class=""&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;/DIV&gt;&lt;DIV class=""&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV class=""&gt;&lt;DIV class=""&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV class=""&gt;&amp;nbsp;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;</description>
      <pubDate>Fri, 05 Dec 2025 19:28:52 GMT</pubDate>
      <guid>https://www.ptcusercommunity.com/t5/3D-Part-Assembly-Design/Drawing-repeat-region-if-statement-does-nothing/m-p/1046474#M142186</guid>
      <dc:creator>Voronov</dc:creator>
      <dc:date>2025-12-05T19:28:52Z</dc:date>
    </item>
    <item>
      <title>Re: Drawing repeat region if-statement does nothing</title>
      <link>https://www.ptcusercommunity.com/t5/3D-Part-Assembly-Design/Drawing-repeat-region-if-statement-does-nothing/m-p/1046527#M142194</link>
      <description>&lt;P data-unlink="true"&gt;If you read this &lt;A title="Drawing Repeat Relation" href="https://community.ptc.com/t5/3D-Part-Assembly-Design/Upper-level-assembly-name-on-repeat-region/m-p/861943#M128339" target="_blank" rel="noopener"&gt;Repeat Region Relation&lt;/A&gt;&amp;nbsp; , it may help you, but it looks like to have both values in the table, maybe you can hide one column.&lt;/P&gt;
&lt;P data-unlink="true"&gt;&amp;nbsp;&lt;/P&gt;
&lt;P data-unlink="true"&gt;Note: Check to display with units, because this is just a unit issue!&lt;/P&gt;</description>
      <pubDate>Sat, 06 Dec 2025 10:00:10 GMT</pubDate>
      <guid>https://www.ptcusercommunity.com/t5/3D-Part-Assembly-Design/Drawing-repeat-region-if-statement-does-nothing/m-p/1046527#M142194</guid>
      <dc:creator>RPN</dc:creator>
      <dc:date>2025-12-06T10:00:10Z</dc:date>
    </item>
    <item>
      <title>Re: Drawing repeat region if-statement does nothing</title>
      <link>https://www.ptcusercommunity.com/t5/3D-Part-Assembly-Design/Drawing-repeat-region-if-statement-does-nothing/m-p/1046614#M142205</link>
      <description>&lt;P&gt;Thanks Voronov,&lt;/P&gt;&lt;P&gt;I got it to work with just minor changes to your relation.&lt;BR /&gt;I want to use MDL_PRO_MP_MASS instead of the GENERIC.&lt;/P&gt;&lt;P&gt;The weird thing is that I initially started exactly as your first suggestion, but it didn't work.&lt;/P&gt;&lt;P&gt;Now when I pasted your suggestion it worked...&amp;nbsp;Inscrutable are the ways of Creo! &lt;span class="lia-unicode-emoji" title=":winking_face_with_tongue:"&gt;😜&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-unicode-emoji" title=":vulcan_salute:"&gt;🖖&lt;/span&gt; /C4DG33K&lt;/P&gt;</description>
      <pubDate>Mon, 08 Dec 2025 09:34:02 GMT</pubDate>
      <guid>https://www.ptcusercommunity.com/t5/3D-Part-Assembly-Design/Drawing-repeat-region-if-statement-does-nothing/m-p/1046614#M142205</guid>
      <dc:creator>C4DG33K</dc:creator>
      <dc:date>2025-12-08T09:34:02Z</dc:date>
    </item>
  </channel>
</rss>

