<?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: iLogic To Create Custom Parameters That Match User Defined Parameters in Inventor Programming Forum</title>
    <link>https://forums.autodesk.com/t5/inventor-programming-forum/ilogic-to-create-custom-parameters-that-match-user-defined/m-p/13150307#M4341</link>
    <description>&lt;P&gt;Thanks Michael, that worked great!&amp;nbsp; I'll be honest, I kind of understand what you did, but where did the kg*cm/s/s come from?&amp;nbsp; I would like to have this same rule done to convert PSI to text as done with the lbforce but I'm lost on to how you started with those units.&amp;nbsp;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Thu, 14 Nov 2024 13:11:35 GMT</pubDate>
    <dc:creator>fsnyderE8767</dc:creator>
    <dc:date>2024-11-14T13:11:35Z</dc:date>
    <item>
      <title>iLogic To Create Custom Parameters That Match User Defined Parameters</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-forum/ilogic-to-create-custom-parameters-that-match-user-defined/m-p/13148897#M4339</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I'm not sure if i am going about this the correct way, but what I am trying to do is create a custom TEXT property that matches the value of a user defined property.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Say I have a property called "Force_Extend" and it's values are 4000 lbforce, but I want to make a custom text property without the underscore called "Force Extend."&amp;nbsp; If I do the following code&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;SPAN&gt;iProperties.Value("Custom", "Force Extend") = Parameter("Force_Extend")&lt;/SPAN&gt;&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;and then open the properties, it created a new property called "Force Extend" but the value is not 4,000 and it is not Text.&amp;nbsp; The value is a crazy number 1544354.3307086611 and the type is Number.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Is there a way to make the "Force Extend" custom property say 4000 as a Text type?&lt;/P&gt;</description>
      <pubDate>Wed, 13 Nov 2024 21:03:41 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-forum/ilogic-to-create-custom-parameters-that-match-user-defined/m-p/13148897#M4339</guid>
      <dc:creator>fsnyderE8767</dc:creator>
      <dc:date>2024-11-13T21:03:41Z</dc:date>
    </item>
    <item>
      <title>Re: iLogic To Create Custom Parameters That Match User Defined Parameters</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-forum/ilogic-to-create-custom-parameters-that-match-user-defined/m-p/13149719#M4340</link>
      <description>&lt;P&gt;If you want to use iLogic for this, you need to convert internal value to the required units.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="visual-basic"&gt;'Get parameter value in internal units
' iLogic
'Dim forceExtendValueInDbUnits = Parameter.Param("Force_Extend").Value
' Standard API
Dim part As PartDocument = ThisDoc.Document
Dim forceExtendValueInDbUnits = part.ComponentDefinition.Parameters("Force_Extend").Value

'Convert value to required units. Internal units for force is "kg*cm/s/s"
Dim forceExtendValueInLbforce = ThisDoc.Document.UnitsOfMeasure.ConvertUnits(forceExtendValueInDbUnits, "kg*cm/s/s", "lbforce")

'Use result
Logger.Debug(forceExtendValueInLbforce)
iProperties.Value("Custom", "ForceExtend") = forceExtendValueInLbforce.ToString()&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 14 Nov 2024 07:18:44 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-forum/ilogic-to-create-custom-parameters-that-match-user-defined/m-p/13149719#M4340</guid>
      <dc:creator>Michael.Navara</dc:creator>
      <dc:date>2024-11-14T07:18:44Z</dc:date>
    </item>
    <item>
      <title>Re: iLogic To Create Custom Parameters That Match User Defined Parameters</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-forum/ilogic-to-create-custom-parameters-that-match-user-defined/m-p/13150307#M4341</link>
      <description>&lt;P&gt;Thanks Michael, that worked great!&amp;nbsp; I'll be honest, I kind of understand what you did, but where did the kg*cm/s/s come from?&amp;nbsp; I would like to have this same rule done to convert PSI to text as done with the lbforce but I'm lost on to how you started with those units.&amp;nbsp;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 14 Nov 2024 13:11:35 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-forum/ilogic-to-create-custom-parameters-that-match-user-defined/m-p/13150307#M4341</guid>
      <dc:creator>fsnyderE8767</dc:creator>
      <dc:date>2024-11-14T13:11:35Z</dc:date>
    </item>
    <item>
      <title>Re: iLogic To Create Custom Parameters That Match User Defined Parameters</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-forum/ilogic-to-create-custom-parameters-that-match-user-defined/m-p/13150464#M4342</link>
      <description>&lt;P&gt;This strange units becomes from definition of basic unit for force &lt;A href="https://en.wikipedia.org/wiki/Newton_(unit)" target="_blank" rel="noopener"&gt;Newton (N)&lt;/A&gt; and &lt;A href="https://help.autodesk.com/view/INVNTOR/2023/ENU/?guid=GUID-60CADB1E-DB85-4A7D-8380-7C4FFFE558D8" target="_blank" rel="noopener"&gt;units used internally in Inventor&lt;/A&gt;.&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&lt;STRONG&gt;N = kg * m * s-2&lt;/STRONG&gt;&lt;/EM&gt; because Inventor uses internal unit for length &lt;EM&gt;&lt;STRONG&gt;centimeter&lt;/STRONG&gt;&lt;/EM&gt;, you can construct the internal unit for force as &lt;EM&gt;&lt;STRONG&gt;kg * cm * s-2&lt;/STRONG&gt;&lt;/EM&gt; and because you can't use power in units definition you get&amp;nbsp;&lt;EM&gt;&lt;STRONG&gt;kg*cm/s/s&lt;/STRONG&gt;&lt;/EM&gt;.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The same you can do for &lt;EM&gt;&lt;STRONG&gt;psi&lt;/STRONG&gt;&lt;/EM&gt;. Pressure is defined as &lt;EM&gt;&lt;STRONG&gt;psi = lbforce/in2&lt;/STRONG&gt;&lt;/EM&gt;. In SI units it is &lt;EM&gt;&lt;STRONG&gt;Pa = N/m2&lt;/STRONG&gt;&lt;/EM&gt; =&amp;gt; internal units for pressure is&amp;nbsp;&lt;EM&gt;&lt;STRONG&gt;kg/cm/s/s&lt;/STRONG&gt;&lt;/EM&gt;.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 14 Nov 2024 14:30:51 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-forum/ilogic-to-create-custom-parameters-that-match-user-defined/m-p/13150464#M4342</guid>
      <dc:creator>Michael.Navara</dc:creator>
      <dc:date>2024-11-14T14:30:51Z</dc:date>
    </item>
  </channel>
</rss>

