<?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: Dimensions calculator in Inventor Programming - iLogic, Macros, AddIns &amp; Apprentice</title>
    <link>https://forums.autodesk.com/t5/inventor-programming-ilogic/dimensions-calculator/m-p/12033114#M153946</link>
    <description>&lt;P&gt;Thank you, that is what I want. I think about find position of point crossing rectangle and ellipse. Can we add dimensions of the point, as well?&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="pkaminskiG7KX4_0-1686740841710.png" style="width: 600px;"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/1227490i9165F852F57095A1/image-size/medium?v=v2&amp;amp;px=400" role="button" title="pkaminskiG7KX4_0-1686740841710.png" alt="pkaminskiG7KX4_0-1686740841710.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Wed, 14 Jun 2023 11:06:25 GMT</pubDate>
    <dc:creator>p.kaminskiG7KX4</dc:creator>
    <dc:date>2023-06-14T11:06:25Z</dc:date>
    <item>
      <title>Dimensions calculator</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-ilogic/dimensions-calculator/m-p/12032924#M153941</link>
      <description>&lt;P&gt;I am asking you for help. Is it possible to create a calculator that will export, for example, an excel list with the dimensions of a rectangle circumscribed by an ellipse?&amp;nbsp;I have created a layout as shown in the picture below. I have an outlined rectangle on an ellipse. The only controlled value is the angle of the ellipse. I want to be able to get the width and height values ​​of the rectangle for this layout, depending on the inclination of the ellipse. In the range of 0 to 90 degrees. It can be a list in excel, a text file, etc.&lt;/P&gt;&lt;P&gt;Thank you for help.&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="pkaminskiG7KX4_0-1686735439906.png" style="width: 600px;"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/1227454i045A58780A0E1D93/image-size/medium?v=v2&amp;amp;px=400" role="button" title="pkaminskiG7KX4_0-1686735439906.png" alt="pkaminskiG7KX4_0-1686735439906.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 14 Jun 2023 09:43:11 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-ilogic/dimensions-calculator/m-p/12032924#M153941</guid>
      <dc:creator>p.kaminskiG7KX4</dc:creator>
      <dc:date>2023-06-14T09:43:11Z</dc:date>
    </item>
    <item>
      <title>Re: Dimensions calculator</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-ilogic/dimensions-calculator/m-p/12033007#M153943</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/11120788"&gt;@p.kaminskiG7KX4&lt;/a&gt;&amp;nbsp;.&amp;nbsp;Here is an example of code that searches all sketches for ellipses and measures their dimensions along the X and Y axes:&lt;/P&gt;&lt;LI-CODE lang="visual-basic"&gt;Private Sub Main()
	Dim oDoc As Document = ThisApplication.ActiveDocument
	If Not TypeOf oDoc Is PartDocument Then Exit Sub
	Dim oPDoc As PartDocument = oDoc
	Dim oUOfM As UnitsOfMeasure = oPDoc.UnitsOfMeasure
	Dim oSketches As PlanarSketches = oPDoc.ComponentDefinition.Sketches
	Dim dMinX, dMinY, dMaxX, dMaxY As Double
	For Each oSketch As PlanarSketch In oSketches
		If oSketch.SketchEllipses.Count = 1 Then
			Dim oEllipse As SketchEllipse = oSketch.SketchEllipses.Item(1)
			dMinX = oUOfM.ConvertUnits(oEllipse.RangeBox.MinPoint.X, kCentimeterLengthUnits, oUOfM.LengthUnits)
			dMinY = oUOfM.ConvertUnits(oEllipse.RangeBox.MinPoint.Y, kCentimeterLengthUnits, oUOfM.LengthUnits)
			dMaxX = oUOfM.ConvertUnits(oEllipse.RangeBox.MaxPoint.X, kCentimeterLengthUnits, oUOfM.LengthUnits)
			dMaxY = oUOfM.ConvertUnits(oEllipse.RangeBox.MaxPoint.Y, kCentimeterLengthUnits, oUOfM.LengthUnits)
			MessageBox.Show("X = " &amp;amp; Abs(Round(dMaxX - dMinX, 3)), oSketch.Name &amp;amp; ", Size X")
			MessageBox.Show("Y = " &amp;amp; Abs(Round(dMaxY - dMinY, 3)), oSketch.Name &amp;amp; ", Size Y")
		End If
	Next
End Sub&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;You can see how to create an excel file and write information in it &lt;A title="forums.autodesk.com" href="https://forums.autodesk.com/t5/inventor-ilogic-and-vb-net-forum/export-excel-file-with-ilogic/m-p/11961729#M152566" target="_blank" rel="noopener"&gt;here&lt;/A&gt;.&lt;/P&gt;</description>
      <pubDate>Wed, 14 Jun 2023 10:22:43 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-ilogic/dimensions-calculator/m-p/12033007#M153943</guid>
      <dc:creator>Andrii_Humeniuk</dc:creator>
      <dc:date>2023-06-14T10:22:43Z</dc:date>
    </item>
    <item>
      <title>Re: Dimensions calculator</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-ilogic/dimensions-calculator/m-p/12033073#M153944</link>
      <description>&lt;LI-CODE lang="general"&gt;Dim a As Inventor.PartDocument = ThisDoc.Document
Dim b As Inventor.PartComponentDefinition = a.ComponentDefinition
Dim c As Inventor.Sketch = b.Sketches.Item(1)

Dim b2d As Inventor.Box2d = c.SketchEllipses.Item(1).RangeBox

MsgBox(b2d.MinPoint.X)
MsgBox(b2d.MinPoint.Y)
MsgBox(b2d.MaxPoint.X)
MsgBox(b2d.MaxPoint.Y)
Dim dX As Double = b2d.MaxPoint.X - b2d.MinPoint.X
Dim dy As Double = b2d.MaxPoint.Y - b2d.MinPoint.Y

MsgBox(dX * 10 &amp;amp; " " &amp;amp; dy * 10)'

'AND WRITE THESE TO EXCEL??&lt;/LI-CODE&gt;</description>
      <pubDate>Wed, 14 Jun 2023 10:51:11 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-ilogic/dimensions-calculator/m-p/12033073#M153944</guid>
      <dc:creator>bradeneuropeArthur</dc:creator>
      <dc:date>2023-06-14T10:51:11Z</dc:date>
    </item>
    <item>
      <title>Re: Dimensions calculator</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-ilogic/dimensions-calculator/m-p/12033114#M153946</link>
      <description>&lt;P&gt;Thank you, that is what I want. I think about find position of point crossing rectangle and ellipse. Can we add dimensions of the point, as well?&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="pkaminskiG7KX4_0-1686740841710.png" style="width: 600px;"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/1227490i9165F852F57095A1/image-size/medium?v=v2&amp;amp;px=400" role="button" title="pkaminskiG7KX4_0-1686740841710.png" alt="pkaminskiG7KX4_0-1686740841710.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 14 Jun 2023 11:06:25 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-ilogic/dimensions-calculator/m-p/12033114#M153946</guid>
      <dc:creator>p.kaminskiG7KX4</dc:creator>
      <dc:date>2023-06-14T11:06:25Z</dc:date>
    </item>
    <item>
      <title>Re: Dimensions calculator</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-ilogic/dimensions-calculator/m-p/12033116#M153947</link>
      <description>&lt;P&gt;Thank you. Yes,&amp;nbsp; &amp;nbsp;it would be nice to export them to excel file.&lt;/P&gt;</description>
      <pubDate>Wed, 14 Jun 2023 11:07:06 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-ilogic/dimensions-calculator/m-p/12033116#M153947</guid>
      <dc:creator>p.kaminskiG7KX4</dc:creator>
      <dc:date>2023-06-14T11:07:06Z</dc:date>
    </item>
  </channel>
</rss>

