<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title><![CDATA[Relation - Engr]]></title><description><![CDATA[Mechanical and Software Engineering]]></description><link>http://engr.io/</link><generator>Ghost 0.5</generator><lastBuildDate>Sun, 19 Apr 2026 17:58:33 GMT</lastBuildDate><atom:link href="http://engr.io/tag/relation/rss/" rel="self" type="application/rss+xml"/><ttl>60</ttl><item><title><![CDATA[Creo String to Integer or Real Number Relation]]></title><description><![CDATA[<p>I recently needed a method for converting a string parameter to an integer in Creo. So I created a script to generate a (rather long) relation to do the job. <br>
There is the <code>itos</code> function which performs the opposite, so treat this as a <code>stoi</code> function.</p>

<p><strong>Warning:</strong> This is a massive bodge, however i could not see any other method for doing it.</p>

<p>Instructions:</p>

<ul>
<li>Goto <a href="http://bl.ocks.org/veggielane/raw/449293ab850608d73a93/">http://bl.ocks.org/veggielane/raw/449293ab850608d73a93/</a></li>
<li>Change the String Length, String Param and Output Param.
<ul><li>The String Param is the Input parameter name.</li></ul></li>
<li>Copy all the relation text.</li>
<li>Paste it into the relations dialog in Creo.</li>
</ul>

<p>The source can be viewed: <a href="https://gist.github.com/veggielane/449293ab850608d73a93">https://gist.github.com/veggielane/449293ab850608d73a93</a></p>

<p>Caveats:</p>

<ul>
<li>Only works on a known length string.</li>
<li>Only works on whole numbers (but can output to a Real Number parameter).</li>
<li>To output to an Integer create the output parameter before adding the relation (it defaults to real).</li>
<li>For long strings the relation can get quite large, and i am unsure about the performance hit.</li>
</ul>]]></description><link>http://engr.io/creo-string-to-integer-relation/</link><guid isPermaLink="false">d8d5040f-28da-42bb-8c35-c6cf77352dbf</guid><category><![CDATA[Creo]]></category><category><![CDATA[Relation]]></category><dc:creator><![CDATA[veggielane]]></dc:creator><pubDate>Tue, 13 Jan 2015 22:20:17 GMT</pubDate></item></channel></rss>