<?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 picking up part volume (Solid 1 only) in Inventor Programming Forum</title>
    <link>https://forums.autodesk.com/t5/inventor-programming-forum/ilogic-picking-up-part-volume-solid-1-only/m-p/9256992#M67726</link>
    <description>&lt;P&gt;Thanks a million Sergio.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I was just playing around with it and was almost there.......... but then it got further away, so your solution is very gratefully accepted!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks again,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Terry&lt;/P&gt;</description>
    <pubDate>Fri, 17 Jan 2020 11:15:19 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2020-01-17T11:15:19Z</dc:date>
    <item>
      <title>iLogic picking up part volume (Solid 1 only)</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-forum/ilogic-picking-up-part-volume-solid-1-only/m-p/9256884#M67721</link>
      <description>&lt;P&gt;Hi.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have a part that I want to keep as an ipt rather than an assembly.&amp;nbsp; The part is a block with a thin plate attached either side.&amp;nbsp; I have created the block as "Solid 1" then offset a workplane 0.1mm from the side and extruded a 2mm plate as "Solid 2 (then mirrored as part of solid 2).&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have a bit of code sending the part volume to a custom iProperty and this is in turn picked up by the idw in a text box.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The volume being picked up is "The Part".&amp;nbsp; What I need to pick up is the volume for "Solid 1" only.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Is there a way I can set this or is there a bit of code that would do it?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Many thanks,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Terry&lt;/P&gt;</description>
      <pubDate>Fri, 17 Jan 2020 10:17:29 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-forum/ilogic-picking-up-part-volume-solid-1-only/m-p/9256884#M67721</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2020-01-17T10:17:29Z</dc:date>
    </item>
    <item>
      <title>Re: iLogic picking up part volume (Solid 1 only)</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-forum/ilogic-picking-up-part-volume-solid-1-only/m-p/9256910#M67722</link>
      <description>&lt;P&gt;Hi&amp;nbsp;@Anonymous&amp;nbsp;,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I can't find a way to do that without Ilogic.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I've done that some time before, (see part attached, Rule1) thanks to &lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/537534"&gt;@MjDeck&lt;/a&gt;&amp;nbsp;from his post here : &lt;A href="https://forums.autodesk.com/t5/inventor-forum/body-volume-to-be-assigned-to-a-parameter/td-p/3634716" target="_blank"&gt;https://forums.autodesk.com/t5/inventor-forum/body-volume-to-be-assigned-to-a-parameter/td-p/3634716&lt;/A&gt;.&lt;/P&gt;&lt;P&gt;once you've had the "SolidFunctions" in your code the rule is quite simple :&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;SPAN&gt;Dim&lt;/SPAN&gt; &lt;SPAN&gt;bodies&lt;/SPAN&gt; &lt;SPAN&gt;As&lt;/SPAN&gt; &lt;SPAN&gt;New&lt;/SPAN&gt; &lt;SPAN&gt;SolidBodies&lt;/SPAN&gt;(&lt;SPAN&gt;ThisDoc&lt;/SPAN&gt;.&lt;SPAN&gt;Document&lt;/SPAN&gt;)
&lt;SPAN&gt;Volume1&lt;/SPAN&gt; = &lt;SPAN&gt;bodies&lt;/SPAN&gt;.&lt;SPAN&gt;Body&lt;/SPAN&gt;(&lt;SPAN&gt;"Solide1"&lt;/SPAN&gt;).&lt;SPAN&gt;Volume&lt;/SPAN&gt;
&lt;SPAN&gt;Volume2&lt;/SPAN&gt; = &lt;SPAN&gt;bodies&lt;/SPAN&gt;.&lt;SPAN&gt;Body&lt;/SPAN&gt;(&lt;SPAN&gt;"Solide2"&lt;/SPAN&gt;).&lt;SPAN&gt;Volume&lt;/SPAN&gt;&lt;/PRE&gt;&lt;P&gt;Best Regards&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 17 Jan 2020 10:30:13 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-forum/ilogic-picking-up-part-volume-solid-1-only/m-p/9256910#M67722</guid>
      <dc:creator>Fabian_perree</dc:creator>
      <dc:date>2020-01-17T10:30:13Z</dc:date>
    </item>
    <item>
      <title>Re: iLogic picking up part volume (Solid 1 only)</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-forum/ilogic-picking-up-part-volume-solid-1-only/m-p/9256926#M67723</link>
      <description>&lt;P&gt;Hi, here is an ilogic rule that you can place in your multibody file. You can add an event trigger to activate the rule every time you save the document. This rule will take the solid volume highlighted in red and place it in a custom property called "&lt;SPAN&gt;VolSolid1&lt;/SPAN&gt;". Keep in mind that the units are in cm ^ 3. In the end you can specify the decimals you need.&lt;/P&gt;&lt;PRE&gt;&lt;SPAN&gt;Dim&lt;/SPAN&gt; &lt;SPAN&gt;doc&lt;/SPAN&gt; &lt;SPAN&gt;As&lt;/SPAN&gt; &lt;SPAN&gt;PartDocument&lt;/SPAN&gt;= &lt;SPAN&gt;ThisDoc&lt;/SPAN&gt;.&lt;SPAN&gt;Document&lt;/SPAN&gt;
&lt;SPAN&gt;Dim&lt;/SPAN&gt; &lt;SPAN&gt;oCD&lt;/SPAN&gt; &lt;SPAN&gt;As&lt;/SPAN&gt; &lt;SPAN&gt;ComponentDefinition&lt;/SPAN&gt; = &lt;SPAN&gt;doc&lt;/SPAN&gt;.&lt;SPAN&gt;ComponentDefinition&lt;/SPAN&gt;
&lt;SPAN&gt;Dim&lt;/SPAN&gt; &lt;SPAN&gt;oSolid&lt;/SPAN&gt; &lt;SPAN&gt;As&lt;/SPAN&gt; &lt;SPAN&gt;SurfaceBody&lt;/SPAN&gt; = &lt;SPAN&gt;oCD&lt;/SPAN&gt;.&lt;SPAN&gt;SurfaceBodies&lt;/SPAN&gt;(&lt;STRONG&gt;&lt;FONT color="#FF0000"&gt;1&lt;/FONT&gt;&lt;/STRONG&gt;)
&lt;SPAN&gt;Dim&lt;/SPAN&gt; &lt;SPAN&gt;oVol&lt;/SPAN&gt; &lt;SPAN&gt;As&lt;/SPAN&gt; &lt;SPAN&gt;Double&lt;/SPAN&gt; = &lt;SPAN&gt;oSolid&lt;/SPAN&gt;.&lt;SPAN&gt;Volume&lt;/SPAN&gt;(0.01)
&lt;SPAN&gt;'PrecisionPercent Double Input Double that specifies &lt;/SPAN&gt;
&lt;SPAN&gt;'the requested relative accuracy Of the result As a &lt;/SPAN&gt;
&lt;SPAN&gt;'percentage.For example, a value Of 0.01 requests a &lt;/SPAN&gt;
&lt;SPAN&gt;'maximum Error Of one percent.&lt;/SPAN&gt;

&lt;SPAN&gt;iProperties&lt;/SPAN&gt;.&lt;SPAN&gt;Value&lt;/SPAN&gt;(&lt;SPAN&gt;"Custom"&lt;/SPAN&gt;, &lt;SPAN&gt;"VolSolid1"&lt;/SPAN&gt;)= &lt;SPAN&gt;Round&lt;/SPAN&gt;(&lt;SPAN&gt;oVol&lt;/SPAN&gt;,3) &amp;amp; &lt;SPAN&gt;" cm^3"&lt;/SPAN&gt;&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;I hope this helps with your work. Grettings!!&lt;/P&gt;</description>
      <pubDate>Fri, 17 Jan 2020 10:36:41 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-forum/ilogic-picking-up-part-volume-solid-1-only/m-p/9256926#M67723</guid>
      <dc:creator>Sergio.D.Suárez</dc:creator>
      <dc:date>2020-01-17T10:36:41Z</dc:date>
    </item>
    <item>
      <title>Re: iLogic picking up part volume (Solid 1 only)</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-forum/ilogic-picking-up-part-volume-solid-1-only/m-p/9256954#M67724</link>
      <description>&lt;P&gt;Thanks very much for both replies.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;This is my existing code which picks up the part volume, converts it to dm3 and then ensures that it displays the first zero if the volume is &amp;lt; 1.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;SPAN&gt;Dim&lt;/SPAN&gt; &lt;SPAN&gt;oValue&lt;/SPAN&gt; &lt;SPAN&gt;As&lt;/SPAN&gt; &lt;SPAN&gt;String&lt;/SPAN&gt; = (&lt;SPAN&gt;Format&lt;/SPAN&gt;(&lt;SPAN&gt;Round&lt;/SPAN&gt;(&lt;SPAN&gt;iProperties&lt;/SPAN&gt;.&lt;SPAN&gt;Volume&lt;/SPAN&gt; / 1000000, 3), &lt;SPAN&gt;".000"&lt;/SPAN&gt;))
		&lt;SPAN&gt;If&lt;/SPAN&gt; &lt;SPAN&gt;oValue&lt;/SPAN&gt; &amp;lt; 1 &lt;SPAN&gt;Then&lt;/SPAN&gt; 
			&lt;SPAN&gt;iProperties&lt;/SPAN&gt;.&lt;SPAN&gt;Value&lt;/SPAN&gt;(&lt;SPAN&gt;"Custom"&lt;/SPAN&gt;, &lt;SPAN&gt;"Vol (dm3)"&lt;/SPAN&gt;) = &lt;SPAN&gt;"0"&lt;/SPAN&gt; &amp;amp; &lt;SPAN&gt;oValue&lt;/SPAN&gt;
		&lt;SPAN&gt;Else&lt;/SPAN&gt;
			&lt;SPAN&gt;iProperties&lt;/SPAN&gt;.&lt;SPAN&gt;Value&lt;/SPAN&gt;(&lt;SPAN&gt;"Custom"&lt;/SPAN&gt;, &lt;SPAN&gt;"Vol (dm3)"&lt;/SPAN&gt;) = &lt;SPAN&gt;oValue&lt;/SPAN&gt;
		&lt;SPAN&gt;End&lt;/SPAN&gt; &lt;SPAN&gt;If&lt;/SPAN&gt;&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I guess the above suggested will need to be augmented with the existing bit of code (which is beyond my knowledge!).&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Any help would be greatly appreciated.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Terry&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 17 Jan 2020 10:51:57 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-forum/ilogic-picking-up-part-volume-solid-1-only/m-p/9256954#M67724</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2020-01-17T10:51:57Z</dc:date>
    </item>
    <item>
      <title>Re: iLogic picking up part volume (Solid 1 only)</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-forum/ilogic-picking-up-part-volume-solid-1-only/m-p/9256984#M67725</link>
      <description>&lt;P&gt;Try the following. regards&lt;/P&gt;&lt;PRE&gt;&lt;SPAN&gt;Dim&lt;/SPAN&gt; &lt;SPAN&gt;doc&lt;/SPAN&gt; &lt;SPAN&gt;As&lt;/SPAN&gt; &lt;SPAN&gt;PartDocument&lt;/SPAN&gt;= &lt;SPAN&gt;ThisDoc&lt;/SPAN&gt;.&lt;SPAN&gt;Document&lt;/SPAN&gt;
&lt;SPAN&gt;Dim&lt;/SPAN&gt; &lt;SPAN&gt;oCD&lt;/SPAN&gt; &lt;SPAN&gt;As&lt;/SPAN&gt; &lt;SPAN&gt;ComponentDefinition&lt;/SPAN&gt; = &lt;SPAN&gt;doc&lt;/SPAN&gt;.&lt;SPAN&gt;ComponentDefinition&lt;/SPAN&gt;
&lt;SPAN&gt;Dim&lt;/SPAN&gt; &lt;SPAN&gt;oSolid&lt;/SPAN&gt; &lt;SPAN&gt;As&lt;/SPAN&gt; &lt;SPAN&gt;SurfaceBody&lt;/SPAN&gt; = &lt;SPAN&gt;oCD&lt;/SPAN&gt;.&lt;SPAN&gt;SurfaceBodies&lt;/SPAN&gt;(1)
&lt;SPAN&gt;Dim&lt;/SPAN&gt; &lt;SPAN&gt;oVol&lt;/SPAN&gt; &lt;SPAN&gt;As&lt;/SPAN&gt; &lt;SPAN&gt;Double&lt;/SPAN&gt; = &lt;SPAN&gt;oSolid&lt;/SPAN&gt;.&lt;SPAN&gt;Volume&lt;/SPAN&gt;(0.01) * 0.001 &lt;SPAN&gt;' *0.001 is for dm^3&lt;/SPAN&gt;

&lt;SPAN&gt;Dim&lt;/SPAN&gt; &lt;SPAN&gt;oValue&lt;/SPAN&gt; &lt;SPAN&gt;As&lt;/SPAN&gt; &lt;SPAN&gt;String&lt;/SPAN&gt; = (&lt;SPAN&gt;Format&lt;/SPAN&gt;(&lt;SPAN&gt;Round&lt;/SPAN&gt;(&lt;SPAN&gt;oVol&lt;/SPAN&gt;, 3), &lt;SPAN&gt;".000"&lt;/SPAN&gt;))

&lt;SPAN&gt;If&lt;/SPAN&gt; &lt;SPAN&gt;oValue&lt;/SPAN&gt; &amp;lt; 1 &lt;SPAN&gt;Then&lt;/SPAN&gt; 
	&lt;SPAN&gt;iProperties&lt;/SPAN&gt;.&lt;SPAN&gt;Value&lt;/SPAN&gt;(&lt;SPAN&gt;"Custom"&lt;/SPAN&gt;, &lt;SPAN&gt;"Vol (dm3)"&lt;/SPAN&gt;) = &lt;SPAN&gt;"0"&lt;/SPAN&gt; &amp;amp; &lt;SPAN&gt;oValue&lt;/SPAN&gt;
&lt;SPAN&gt;Else&lt;/SPAN&gt;
	&lt;SPAN&gt;iProperties&lt;/SPAN&gt;.&lt;SPAN&gt;Value&lt;/SPAN&gt;(&lt;SPAN&gt;"Custom"&lt;/SPAN&gt;, &lt;SPAN&gt;"Vol (dm3)"&lt;/SPAN&gt;) = &lt;SPAN&gt;oValue&lt;/SPAN&gt;
&lt;SPAN&gt;End&lt;/SPAN&gt; &lt;SPAN&gt;If&lt;/SPAN&gt;&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 17 Jan 2020 11:09:16 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-forum/ilogic-picking-up-part-volume-solid-1-only/m-p/9256984#M67725</guid>
      <dc:creator>Sergio.D.Suárez</dc:creator>
      <dc:date>2020-01-17T11:09:16Z</dc:date>
    </item>
    <item>
      <title>Re: iLogic picking up part volume (Solid 1 only)</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-forum/ilogic-picking-up-part-volume-solid-1-only/m-p/9256992#M67726</link>
      <description>&lt;P&gt;Thanks a million Sergio.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I was just playing around with it and was almost there.......... but then it got further away, so your solution is very gratefully accepted!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks again,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Terry&lt;/P&gt;</description>
      <pubDate>Fri, 17 Jan 2020 11:15:19 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-forum/ilogic-picking-up-part-volume-solid-1-only/m-p/9256992#M67726</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2020-01-17T11:15:19Z</dc:date>
    </item>
    <item>
      <title>Re: iLogic picking up part volume (Solid 1 only)</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-forum/ilogic-picking-up-part-volume-solid-1-only/m-p/13389566#M67727</link>
      <description>&lt;P&gt;Thank you for posting this. Was struggling to find a way to measure to measure the volume of a body in a specific part.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have 2 bodies inside of a part, the first body I vary with parameters, and the second body is associated with the first. I can&amp;nbsp; now run a loop for the parameters of the first body until the desired volume is achieved on the second body.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Appreciate it again!&lt;/P&gt;</description>
      <pubDate>Tue, 25 Mar 2025 14:01:13 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-forum/ilogic-picking-up-part-volume-solid-1-only/m-p/13389566#M67727</guid>
      <dc:creator>mglockel</dc:creator>
      <dc:date>2025-03-25T14:01:13Z</dc:date>
    </item>
  </channel>
</rss>

