<?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: Accessing Inertial Properties using iLogic in Inventor Programming Forum</title>
    <link>https://forums.autodesk.com/t5/inventor-programming-forum/accessing-inertial-properties-using-ilogic/m-p/3194428#M141468</link>
    <description>&lt;P&gt;Hey all. Great forum, it's an excellent resource, and I hope to contribute with some solutions myself sometime &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;I have a question relating to this topic:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Would it be possible, in ilogic to extracts the Ixx, Iyy, COG points etc. for seperate parts within the assembly?&lt;/P&gt;&lt;P&gt;I am familiar with the basics of programming, but new to object oriented. (such as API/VBA in inventor).&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;To me it seems like a small modification of the code above should be enough, but I'm not sure what to write to adress specific parts instead of the whole assembly.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Any ideas or hints would be appreciated!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Mon, 17 Oct 2011 18:54:38 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2011-10-17T18:54:38Z</dc:date>
    <item>
      <title>Accessing Inertial Properties using iLogic</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-forum/accessing-inertial-properties-using-ilogic/m-p/2904630#M141464</link>
      <description>&lt;P&gt;Hi All,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;iLogic has the capabilities to access the physical properties of part files such as mass / area / volume etc. Does anyone know the ilogic syntax to read the inertial properties of the part file such as Global Ixx / Iyy / Izz??&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I can find it in the API help, but i don't really want to write it as separate code, just want to simply access it through iLogic interface.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Any assistance is greatly appreciated!&lt;/P&gt;</description>
      <pubDate>Fri, 04 Feb 2011 00:34:29 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-forum/accessing-inertial-properties-using-ilogic/m-p/2904630#M141464</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2011-02-04T00:34:29Z</dc:date>
    </item>
    <item>
      <title>Re: Accessing Inertial Properties using iLogic</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-forum/accessing-inertial-properties-using-ilogic/m-p/2905198#M141465</link>
      <description>&lt;P&gt;There are no dedicated iLogic functions to get the moment of inertia, but you can use API functions in a rule.&amp;nbsp; Here's sample code:&lt;/P&gt;
&lt;PRE&gt;RuleParametersOutput()
InventorVb.DocumentUpdate()

Dim massProps as MassProperties
Dim partDoc as PartDocument = TryCast(ThisDoc.Document, PartDocument)
If (partDoc IsNot Nothing) Then massProps = partDoc.ComponentDefinition.MassProperties
Dim assemDoc as AssemblyDocument = TryCast(ThisDoc.Document, AssemblyDocument)
If (assemDoc IsNot Nothing) Then massProps = assemDoc.ComponentDefinition.MassProperties

Dim moments(5) As Double
massProps.XYZMomentsOfInertia(moments(0), moments(1), moments(2), moments(3), moments(4), moments(5))

For i = 0 To 5
 moments(i) = ThisDoc.Document.UnitsOfMeasure.ConvertUnits(moments(i), "kg cm^2", "kg mm^2")
Next

Ixx = moments(0)
Iyy = moments(1)
Izz = moments(2)
&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;Here Ixx, Iyy and Izz are Inventor parameters, with units of&amp;nbsp; kg mm^2&lt;/P&gt;
&lt;P&gt;The moment components are returned from the XYZMomentsOfInertia function in units of kg cm^2&lt;/P&gt;
&lt;P&gt;If you need different units, you can provide a different units string to the third argument of the ConvertUnits function.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;The RuleParametersOutput() statement is only required if this code is part of a larger rule in which you modify some parameters.&lt;/P&gt;</description>
      <pubDate>Fri, 04 Feb 2011 15:55:14 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-forum/accessing-inertial-properties-using-ilogic/m-p/2905198#M141465</guid>
      <dc:creator>MjDeck</dc:creator>
      <dc:date>2011-02-04T15:55:14Z</dc:date>
    </item>
    <item>
      <title>Re: Accessing Inertial Properties using iLogic</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-forum/accessing-inertial-properties-using-ilogic/m-p/3093486#M141466</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;P&gt;Is is possible to obtain "area" moments (vs. mass moments) like the ones from "Region Properties"?&lt;/P&gt;&lt;P&gt;If yes, please provide example code.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;HR /&gt;&lt;P&gt;MjDeck wrote:&lt;/P&gt;&lt;P&gt;There are no dedicated iLogic functions to get the moment of inertia, but you can use API functions in a rule.&amp;nbsp; Here's sample code:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;[snip]&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;Here Ixx, Iyy and Izz are Inventor parameters, with units of&amp;nbsp; kg mm^2&lt;/P&gt;&lt;P&gt;The moment components are returned from the XYZMomentsOfInertia function in units of kg cm^2&lt;/P&gt;&lt;P&gt;If you need different units, you can provide a different units string to the third argument of the ConvertUnits function.&lt;/P&gt;&lt;P&gt;&amp;nbsp;The RuleParametersOutput() statement is only required if this code is part of a larger rule in which you modify some parameters.&lt;/P&gt;&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 15 Jul 2011 17:27:54 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-forum/accessing-inertial-properties-using-ilogic/m-p/3093486#M141466</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2011-07-15T17:27:54Z</dc:date>
    </item>
    <item>
      <title>Re: Accessing Inertial Properties using iLogic</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-forum/accessing-inertial-properties-using-ilogic/m-p/3095660#M141467</link>
      <description>&lt;P&gt;Here's a sample rule to get the region properties of a sketch.&amp;nbsp; It uses the Profiles.AddForSolid function&amp;nbsp;to get the profile.&amp;nbsp;There are options&amp;nbsp;available&amp;nbsp;for this function to give you the exact profile you want.&amp;nbsp; Alternatively, instead of getting the profile from the sketch, you can start from an extrusion (or other feature) and get the profile directly from that.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;The rule uses Trace.WriteLine to show the properties.&amp;nbsp; You can use DebugView from&lt;/P&gt;
&lt;P&gt;&lt;A href="http://technet.microsoft.com/en-us/sysinternals/bb896647" target="_blank"&gt;http://technet.microsoft.com/en-us/sysinternals/bb896647&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;to view the properties.&amp;nbsp; Or you can assign them to parameters or use them in calculations.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 18 Jul 2011 23:13:46 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-forum/accessing-inertial-properties-using-ilogic/m-p/3095660#M141467</guid>
      <dc:creator>MjDeck</dc:creator>
      <dc:date>2011-07-18T23:13:46Z</dc:date>
    </item>
    <item>
      <title>Re: Accessing Inertial Properties using iLogic</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-forum/accessing-inertial-properties-using-ilogic/m-p/3194428#M141468</link>
      <description>&lt;P&gt;Hey all. Great forum, it's an excellent resource, and I hope to contribute with some solutions myself sometime &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;I have a question relating to this topic:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Would it be possible, in ilogic to extracts the Ixx, Iyy, COG points etc. for seperate parts within the assembly?&lt;/P&gt;&lt;P&gt;I am familiar with the basics of programming, but new to object oriented. (such as API/VBA in inventor).&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;To me it seems like a small modification of the code above should be enough, but I'm not sure what to write to adress specific parts instead of the whole assembly.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Any ideas or hints would be appreciated!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 17 Oct 2011 18:54:38 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-forum/accessing-inertial-properties-using-ilogic/m-p/3194428#M141468</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2011-10-17T18:54:38Z</dc:date>
    </item>
    <item>
      <title>Re: Accessing Inertial Properties using iLogic</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-forum/accessing-inertial-properties-using-ilogic/m-p/8079719#M141469</link>
      <description>&lt;P&gt;hi MJDeck,&lt;/P&gt;&lt;P&gt;can you tel me if the properties of the region area are still the same as when this post was made.&lt;/P&gt;&lt;P&gt;We like to use your code in 2018&amp;nbsp; but we cannot find the term Inertia Tensor&amp;nbsp; in your code which we need.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Danny&lt;/P&gt;</description>
      <pubDate>Wed, 20 Jun 2018 09:15:31 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-forum/accessing-inertial-properties-using-ilogic/m-p/8079719#M141469</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2018-06-20T09:15:31Z</dc:date>
    </item>
    <item>
      <title>Re: Accessing Inertial Properties using iLogic</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-forum/accessing-inertial-properties-using-ilogic/m-p/10383039#M141470</link>
      <description>&lt;P&gt;I'm using Inventor 2019. I'm not able to access Global Mass Moment of Inertia from "MassProperties.XYZMomentsOfInertia" method/function, because it takes reference of COG as observed and mentioned in Help Documentation.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I couldn't find any other method from MassProperties that take reference to Global Co-ordinates (as you know COG and global reference axes need not be the same).&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Manually I could get the information from Part/Assembly Properties tab, but could you direct me through a VBA function?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="aswanabdulrazak_1-1623425578387.png" style="width: 400px;"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/929425iBDEAC66864B96132/image-size/medium?v=v2&amp;amp;px=400" role="button" title="aswanabdulrazak_1-1623425578387.png" alt="aswanabdulrazak_1-1623425578387.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 11 Jun 2021 15:39:45 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-forum/accessing-inertial-properties-using-ilogic/m-p/10383039#M141470</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2021-06-11T15:39:45Z</dc:date>
    </item>
    <item>
      <title>Re: Accessing Inertial Properties using iLogic</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-forum/accessing-inertial-properties-using-ilogic/m-p/10383685#M141471</link>
      <description>&lt;P&gt;@Anonymous&amp;nbsp;, here's a sample rule that uses the parallel axis theorem to calculate the global moments of inertia. This is in iLogic. It should be possible to convert it to VBA if you need it.&lt;BR /&gt;Please add your vote to this &lt;A href="https://forums.autodesk.com/t5/inventor-ideas/expose-global-moments-of-inertia-in-the-api/idi-p/6480430" target="_blank" rel="noopener"&gt;Ideas initiative&lt;/A&gt; to expose this method in the API.&lt;/P&gt;
&lt;P&gt;That post also has a link to another code example.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 11 Jun 2021 20:36:36 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-forum/accessing-inertial-properties-using-ilogic/m-p/10383685#M141471</guid>
      <dc:creator>MjDeck</dc:creator>
      <dc:date>2021-06-11T20:36:36Z</dc:date>
    </item>
    <item>
      <title>Re: Accessing Inertial Properties using iLogic</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-forum/accessing-inertial-properties-using-ilogic/m-p/10415330#M141472</link>
      <description>&lt;P&gt;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/537534"&gt;@MjDeck&lt;/a&gt;&amp;nbsp;, Thank you. I learned something new from this code. Your method of using&amp;nbsp;TransientGeometry is unique.&lt;/P&gt;</description>
      <pubDate>Wed, 23 Jun 2021 17:51:58 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-forum/accessing-inertial-properties-using-ilogic/m-p/10415330#M141472</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2021-06-23T17:51:58Z</dc:date>
    </item>
    <item>
      <title>Re: Accessing Inertial Properties using iLogic</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-forum/accessing-inertial-properties-using-ilogic/m-p/10418844#M141473</link>
      <description>&lt;P&gt;Thanks. I was hoping to use the Matrix object for some of the calculation, but it doesn't support addition of matrices.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I just noticed an error in the code. But it doesn't affect Ixx, Iyy, or Izz. It just affects Ixz. That's why I didn't notice it before. I attached a corrected version of the rule.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 24 Jun 2021 22:01:26 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-forum/accessing-inertial-properties-using-ilogic/m-p/10418844#M141473</guid>
      <dc:creator>MjDeck</dc:creator>
      <dc:date>2021-06-24T22:01:26Z</dc:date>
    </item>
  </channel>
</rss>

