<?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: VBnet mass in Inventor Programming Forum</title>
    <link>https://forums.autodesk.com/t5/inventor-programming-forum/vbnet-mass/m-p/10606294#M46100</link>
    <description>&lt;P&gt;Just a passing thought, but if you really need to eliminate the calculation of mass from one separate body in a multi-body part, you may need to convert that body to a surface, instead of a solid, one way or another.&amp;nbsp; It might be possible to do by code if that sounds like a plan that would work for your situation.&lt;/P&gt;</description>
    <pubDate>Tue, 07 Sep 2021 19:00:11 GMT</pubDate>
    <dc:creator>WCrihfield</dc:creator>
    <dc:date>2021-09-07T19:00:11Z</dc:date>
    <item>
      <title>VBnet mass</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-forum/vbnet-mass/m-p/10596229#M46095</link>
      <description>&lt;P&gt;Is there anyway via ilogic or VBnet(Or anything possible) to set the mass of&amp;nbsp;&lt;STRONG&gt;&lt;U&gt; 1&lt;/U&gt; &lt;/STRONG&gt;body of multybody part to zero???&lt;/P&gt;</description>
      <pubDate>Fri, 03 Sep 2021 10:36:47 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-forum/vbnet-mass/m-p/10596229#M46095</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2021-09-03T10:36:47Z</dc:date>
    </item>
    <item>
      <title>Re: VBnet mass</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-forum/vbnet-mass/m-p/10599632#M46096</link>
      <description>&lt;P&gt;Sure.&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Dim&lt;/SPAN&gt;&lt;SPAN&gt;&amp;nbsp;oDoc&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;As&lt;/SPAN&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;AssemblyDocument&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; oDoc = _InvApplication.ActiveDocument&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;Dim&lt;/SPAN&gt;&lt;SPAN&gt;&amp;nbsp;oAssDef&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;As&lt;/SPAN&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;ComponentDefinition&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; oAssDef = oDoc.ComponentDefinition&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;Dim&lt;/SPAN&gt;&lt;SPAN&gt;&amp;nbsp;oMassProperties&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;As&lt;/SPAN&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;MassProperties&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; oMassProperties = oAssDef.MassProperties&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN style="font-family: inherit;"&gt;oMassProperties.Mass ="0"&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Sat, 04 Sep 2021 19:30:37 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-forum/vbnet-mass/m-p/10599632#M46096</guid>
      <dc:creator>bradeneuropeArthur</dc:creator>
      <dc:date>2021-09-04T19:30:37Z</dc:date>
    </item>
    <item>
      <title>Re: VBnet mass</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-forum/vbnet-mass/m-p/10599687#M46097</link>
      <description>&lt;P&gt;I tested the following code. but on further investigation, I discovered that this looks very promising but in fact, it sets the mass property of the complete part...&lt;/P&gt;&lt;LI-CODE lang="general"&gt;Dim doc As PartDocument = ThisDoc.Document
Dim def As PartComponentDefinition = doc.ComponentDefinition

Dim body As SurfaceBody = def.SurfaceBodies.Item(1)

Dim bodyDef As PartComponentDefinition = body.ComponentDefinition
Dim mass As MassProperties = bodyDef.MassProperties

mass.Volume = 1&lt;/LI-CODE&gt;&lt;P&gt;Also, I found &lt;A href="https://forums.autodesk.com/t5/inventor-ilogic-api-vba-forum/surfacebody-properties-via-api/m-p/4857191/highlight/true#M48841" target="_blank" rel="noopener"&gt;this topic&lt;/A&gt;. Here someone wants to get the value (not set it). The Autodesk employee confirms that there is no direct way to get the value. He proposes some alternative ways to get the value but I guess it will not help you set the values. I came to the conclusion that it's not possible to set the mass of a solid body.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sat, 04 Sep 2021 20:16:03 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-forum/vbnet-mass/m-p/10599687#M46097</guid>
      <dc:creator>JelteDeJong</dc:creator>
      <dc:date>2021-09-04T20:16:03Z</dc:date>
    </item>
    <item>
      <title>Re: VBnet mass</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-forum/vbnet-mass/m-p/10602143#M46098</link>
      <description>&lt;P&gt;I konw there is no way with ilogic or VBA. But i am wondering is there a way in VB.net (Like if you want to make an add-in)? I know it's more complicated. I don't want to start learning making add-ins&amp;nbsp;if i don't know if i can set one body mass&amp;nbsp; of multibodypart to zero??????&lt;/P&gt;</description>
      <pubDate>Mon, 06 Sep 2021 07:10:24 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-forum/vbnet-mass/m-p/10602143#M46098</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2021-09-06T07:10:24Z</dc:date>
    </item>
    <item>
      <title>Re: VBnet mass</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-forum/vbnet-mass/m-p/10602684#M46099</link>
      <description>&lt;P&gt;When you write iLogic rules you are writing vb.net code. To interact with Inventor by code in an add-in you need to use the same API as the API you have access to in iLogic. Therefore there is no difference between what you can do with iLogic and an add-in. (I have to note that there are some things that are very hard to do by iLogic rule. Like reacting to events.) So in your case creating an add-in will not help you.&lt;/P&gt;</description>
      <pubDate>Mon, 06 Sep 2021 11:33:21 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-forum/vbnet-mass/m-p/10602684#M46099</guid>
      <dc:creator>JelteDeJong</dc:creator>
      <dc:date>2021-09-06T11:33:21Z</dc:date>
    </item>
    <item>
      <title>Re: VBnet mass</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-forum/vbnet-mass/m-p/10606294#M46100</link>
      <description>&lt;P&gt;Just a passing thought, but if you really need to eliminate the calculation of mass from one separate body in a multi-body part, you may need to convert that body to a surface, instead of a solid, one way or another.&amp;nbsp; It might be possible to do by code if that sounds like a plan that would work for your situation.&lt;/P&gt;</description>
      <pubDate>Tue, 07 Sep 2021 19:00:11 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-forum/vbnet-mass/m-p/10606294#M46100</guid>
      <dc:creator>WCrihfield</dc:creator>
      <dc:date>2021-09-07T19:00:11Z</dc:date>
    </item>
    <item>
      <title>Re: VBnet mass</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-forum/vbnet-mass/m-p/10606315#M46101</link>
      <description>&lt;P&gt;It's a great idea but sadly it doesn't help in my case. Maybe a way to check the changed &lt;STRONG&gt;body&lt;/STRONG&gt; mass or changed &lt;STRONG&gt;body&lt;/STRONG&gt; volume would help in my case?? If i can't change it via ilogic, than i want to in some way check If the changed body mass(or body volume is zeri). Is this maybe possible???&lt;/P&gt;</description>
      <pubDate>Tue, 07 Sep 2021 19:10:10 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-forum/vbnet-mass/m-p/10606315#M46101</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2021-09-07T19:10:10Z</dc:date>
    </item>
  </channel>
</rss>

