<?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: RangeBox - Rotated Part in Inventor Programming Forum</title>
    <link>https://forums.autodesk.com/t5/inventor-programming-forum/rangebox-rotated-part/m-p/2654591#M144295</link>
    <description>Thank you Brian.</description>
    <pubDate>Thu, 01 Apr 2010 11:50:00 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2010-04-01T11:50:00Z</dc:date>
    <item>
      <title>RangeBox - Rotated Part</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-forum/rangebox-rotated-part/m-p/2654581#M144285</link>
      <description>I'm getting the rangebox of my assembly, but am having problems getting exactly what I need.  Basically, if a part in my assembly is rotated, it's like it's getting the rangebox of the part's rangebox in its new orientation.  I have included pictures to show what I am getting and what I would hope to get.  In the last screenshot, I have drawn a red box to show what I would like to achieve.  The black box being drawn from the rangebox was created from some code I downloaded (I think from this forum, but I couldn't find it via search, here is another link http://ww3.cad.de/foren/ubb/Forum258/HTML/001081.shtml)&lt;BR /&gt;
Is there anyway to do what I am needing to do?&lt;BR /&gt;
&lt;BR /&gt;
Thanks!</description>
      <pubDate>Thu, 25 Mar 2010 06:33:56 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-forum/rangebox-rotated-part/m-p/2654581#M144285</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2010-03-25T06:33:56Z</dc:date>
    </item>
    <item>
      <title>Re: RangeBox - Rotated Part</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-forum/rangebox-rotated-part/m-p/2654582#M144286</link>
      <description>Here is another screenshot of my problem.&lt;BR /&gt;
The black box is what I'm getting.&lt;BR /&gt;
The red box is what's causing the black box to be so large.&lt;BR /&gt;
The green box is what I want.&lt;BR /&gt;
&lt;BR /&gt;
Thanks again!</description>
      <pubDate>Thu, 25 Mar 2010 15:20:21 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-forum/rangebox-rotated-part/m-p/2654582#M144286</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2010-03-25T15:20:21Z</dc:date>
    </item>
    <item>
      <title>Re: RangeBox - Rotated Part</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-forum/rangebox-rotated-part/m-p/2654583#M144287</link>
      <description>Attached is a modified version of the range box sample that's delivered as &lt;BR /&gt;
part of Inventor's online help.  As you've found, the range box of the &lt;BR /&gt;
occurrence is computed by fitting a box around the range box of the part. &lt;BR /&gt;
This can result in a larger than necessary box.  The only thing guaranteed &lt;BR /&gt;
by the range box is that the occurrence is completely enclosed within the &lt;BR /&gt;
box.  In the attached sample I create a temporary part (using transient &lt;BR /&gt;
B-Rep functionality) that's oriented based on the occurrence orientation and &lt;BR /&gt;
get the range box from this part.  Hopefully the sample makes sense.&lt;BR /&gt;
-- &lt;BR /&gt;
Brian Ekins&lt;BR /&gt;
Inventor API Product Designer&lt;BR /&gt;
http://blogs.autodesk.com/modthemachine</description>
      <pubDate>Mon, 29 Mar 2010 21:49:12 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-forum/rangebox-rotated-part/m-p/2654583#M144287</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2010-03-29T21:49:12Z</dc:date>
    </item>
    <item>
      <title>Re: RangeBox - Rotated Part</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-forum/rangebox-rotated-part/m-p/2654584#M144288</link>
      <description>Thanks Brian!&lt;BR /&gt;
&lt;BR /&gt;
Very nice work, that was exactly what I hoped for.</description>
      <pubDate>Mon, 29 Mar 2010 23:09:18 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-forum/rangebox-rotated-part/m-p/2654584#M144288</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2010-03-29T23:09:18Z</dc:date>
    </item>
    <item>
      <title>Re: RangeBox - Rotated Part</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-forum/rangebox-rotated-part/m-p/2654585#M144289</link>
      <description>Hello&lt;BR /&gt;
&lt;BR /&gt;
As author of the linked thread in german forum, I wasn't able to find a solution to the described problem until now. We worked around by placing the part temporarly in a new assembly. The first part is always placed in the assembly with fitting workplanes, so that the assembly rangebox can be used to get the wanted dimensions.&lt;BR /&gt;
&lt;BR /&gt;
Your solution is a bit smarter and works fine for one selected part. Is creating BRep by copying an existing part a new function in Inventor 2011?&lt;BR /&gt;
&lt;BR /&gt;
The real problem comes up, when there's more then one (rotated) part in the assembly and you want the dimensions of the assembly. There's no way to get around the "wided" rangebox.</description>
      <pubDate>Tue, 30 Mar 2010 12:13:59 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-forum/rangebox-rotated-part/m-p/2654585#M144289</guid>
      <dc:creator>Ralf_Krieg</dc:creator>
      <dc:date>2010-03-30T12:13:59Z</dc:date>
    </item>
    <item>
      <title>Re: RangeBox - Rotated Part</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-forum/rangebox-rotated-part/m-p/2654586#M144290</link>
      <description>Just for fun I create some TextGraphics displayed at all the of the corners of the box (middle justified).  My part and assembly are both in centimeters so there no conversion (rounding) issues.  Also, the parts only sketch is constrained to 0,0 and the part is constrained to the origin workplanes in the assembly so the coordinate system of both the part file and the part wthin the assembly, are the same.  Why isn't the TextGraphics.Text show 0 for those that lies along the X, Y &amp;amp; Z axis?  See the attached graphic&lt;BR /&gt;
&lt;BR /&gt;
{code}&lt;BR /&gt;
Dim oTransientGeometry As TransientGeometry&lt;BR /&gt;
Dim oPoint As Point&lt;BR /&gt;
&lt;BR /&gt;
'Draws a bounding box of a part (occurrence) in the context of the assembly.&lt;BR /&gt;
Public Sub DrawOccurrenceRangeBox()&lt;BR /&gt;
    Dim oAssemblyDocument As AssemblyDocument&lt;BR /&gt;
    Dim oComponentOccurrence As ComponentOccurrence&lt;BR /&gt;
    Dim oGraphicsDataSets As GraphicsDataSets&lt;BR /&gt;
    Dim oClientGraphics As ClientGraphics&lt;BR /&gt;
    Dim oSurfaceBody As SurfaceBody&lt;BR /&gt;
    Dim oBox As Box&lt;BR /&gt;
    Dim oGraphicsNode As GraphicsNode&lt;BR /&gt;
    Dim oLineGraphics As LineGraphics&lt;BR /&gt;
    Dim oGraphicsCoordinateSet As GraphicsCoordinateSet&lt;BR /&gt;
    Dim adBoxLines(1 To 12 * 6) As Double&lt;BR /&gt;
    Dim adMinPoint(1 To 3) As Double&lt;BR /&gt;
    Dim adMaxPoint(1 To 3) As Double&lt;BR /&gt;
    &lt;BR /&gt;
    Dim oTextGraphics_Pnt1 As TextGraphics&lt;BR /&gt;
    Dim oTextGraphics_Pnt2 As TextGraphics&lt;BR /&gt;
    Dim oTextGraphics_Pnt3 As TextGraphics&lt;BR /&gt;
    Dim oTextGraphics_Pnt4 As TextGraphics&lt;BR /&gt;
    Dim oTextGraphics_Pnt5 As TextGraphics&lt;BR /&gt;
    Dim oTextGraphics_Pnt6 As TextGraphics&lt;BR /&gt;
    Dim oTextGraphics_Pnt7 As TextGraphics&lt;BR /&gt;
    Dim oTextGraphics_Pnt8 As TextGraphics&lt;BR /&gt;
    Dim oTextGraphics_xLen As TextGraphics&lt;BR /&gt;
    Dim oTextGraphics_yLen As TextGraphics&lt;BR /&gt;
    Dim oTextGraphics_zLen As TextGraphics&lt;BR /&gt;
    'create Transient Geometry for text anchor point&lt;BR /&gt;
    Set oTransientGeometry = ThisApplication.TransientGeometry&lt;BR /&gt;
    &lt;BR /&gt;
    ' Set a reference to the active assembly.&lt;BR /&gt;
    Set oAssemblyDocument = ThisApplication.ActiveDocument&lt;BR /&gt;
    ' Make sure an occurrence is selected.&lt;BR /&gt;
    On Error Resume Next&lt;BR /&gt;
    Set oComponentOccurrence = oAssemblyDocument.SelectSet.Item(1)&lt;BR /&gt;
    If Err.Number &amp;lt;&amp;gt; 0 Then&lt;BR /&gt;
        MsgBox "You must select an occurrence to display the range box."&lt;BR /&gt;
        ' Delete any graphics, if they exist.&lt;BR /&gt;
        On Error Resume Next&lt;BR /&gt;
        Set oGraphicsDataSets = oAssemblyDocument.GraphicsDataSetsCollection.Item("RangeBoxGraphics")&lt;BR /&gt;
        If Err.Number = 0 Then&lt;BR /&gt;
            On Error GoTo 0&lt;BR /&gt;
            Set oClientGraphics = oAssemblyDocument.ComponentDefinition. _&lt;BR /&gt;
                ClientGraphicsCollection.Item("RangeBoxGraphics")&lt;BR /&gt;
            oClientGraphics.Delete&lt;BR /&gt;
            oGraphicsDataSets.Delete&lt;BR /&gt;
            ThisApplication.ActiveView.Update&lt;BR /&gt;
        End If&lt;BR /&gt;
        Exit Sub&lt;BR /&gt;
    Else&lt;BR /&gt;
        ' Check to make sure it 's a leaf level component.&lt;BR /&gt;
        If oComponentOccurrence.DefinitionDocumentType &amp;lt;&amp;gt; kPartDocumentObject Then&lt;BR /&gt;
            MsgBox "A leaf component (Part) must be selected."&lt;BR /&gt;
            Exit Sub&lt;BR /&gt;
        End If&lt;BR /&gt;
    End If&lt;BR /&gt;
    &lt;BR /&gt;
    ' Create a transient body of the selected part.  Transform the body =to&lt;BR /&gt;
    ' match the transform in the assembly.&lt;BR /&gt;
    Set oSurfaceBody = ThisApplication.TransientBRep.Copy(oComponentOccurrence.Definition.SurfaceBodies.Item(1))&lt;BR /&gt;
    Call ThisApplication.TransientBRep.Transform(oSurfaceBody, oComponentOccurrence.Transformation)&lt;BR /&gt;
    ' Get the range box of the transformed body.&lt;BR /&gt;
    Set oBox = oSurfaceBody.RangeBox&lt;BR /&gt;
    ' Check to see if range box graphics information already exists.&lt;BR /&gt;
    On Error Resume Next&lt;BR /&gt;
    Set oGraphicsDataSets = oAssemblyDocument.GraphicsDataSetsCollection.Item("RangeBoxGraphics")&lt;BR /&gt;
    &lt;BR /&gt;
    If Err Then&lt;BR /&gt;
        Err.Clear&lt;BR /&gt;
        On Error GoTo 0&lt;BR /&gt;
        ' Set a reference to the transient geometry object for user =later.&lt;BR /&gt;
        Set oTransientGeometry = ThisApplication.TransientGeometry&lt;BR /&gt;
        ' Create a graphics data set object. This object contains all of =the&lt;BR /&gt;
        ' information used to define the graphics.&lt;BR /&gt;
        Set oGraphicsDataSets = oAssemblyDocument.GraphicsDataSetsCollection.Add("RangeBoxGraphics")&lt;BR /&gt;
        ' Create a coordinate set.&lt;BR /&gt;
        Set oGraphicsCoordinateSet = oGraphicsDataSets.CreateCoordinateSet(1)&lt;BR /&gt;
        ' Create the client graphics for this compdef.&lt;BR /&gt;
        Set oClientGraphics = oAssemblyDocument.ComponentDefinition.ClientGraphicsCollection.Add( _&lt;BR /&gt;
            "RangeBoxGraphics")&lt;BR /&gt;
        ' Create a graphics node.&lt;BR /&gt;
        Set oGraphicsNode = oClientGraphics.AddNode(1)&lt;BR /&gt;
        oGraphicsNode.Selectable = False&lt;BR /&gt;
        ' Create line graphics.&lt;BR /&gt;
        Set oLineGraphics = oGraphicsNode.AddLineGraphics&lt;BR /&gt;
        oLineGraphics.CoordinateSet = oGraphicsCoordinateSet&lt;BR /&gt;
        &lt;BR /&gt;
        'add Text Graphics to node&lt;BR /&gt;
        Set oTextGraphics_Pnt1 = oGraphicsNode.AddScalableTextGraphics&lt;BR /&gt;
        Set oTextGraphics_Pnt2 = oGraphicsNode.AddScalableTextGraphics&lt;BR /&gt;
        Set oTextGraphics_Pnt3 = oGraphicsNode.AddScalableTextGraphics&lt;BR /&gt;
        Set oTextGraphics_Pnt4 = oGraphicsNode.AddScalableTextGraphics&lt;BR /&gt;
        Set oTextGraphics_Pnt5 = oGraphicsNode.AddScalableTextGraphics&lt;BR /&gt;
        Set oTextGraphics_Pnt6 = oGraphicsNode.AddScalableTextGraphics&lt;BR /&gt;
        Set oTextGraphics_Pnt7 = oGraphicsNode.AddScalableTextGraphics&lt;BR /&gt;
        Set oTextGraphics_Pnt8 = oGraphicsNode.AddScalableTextGraphics&lt;BR /&gt;
        &lt;BR /&gt;
        Set oTextGraphics_xLen = oGraphicsNode.AddScalableTextGraphics&lt;BR /&gt;
        Set oTextGraphics_yLen = oGraphicsNode.AddScalableTextGraphics&lt;BR /&gt;
        Set oTextGraphics_zLen = oGraphicsNode.AddScalableTextGraphics&lt;BR /&gt;
    Else&lt;BR /&gt;
        Set oGraphicsCoordinateSet = oGraphicsDataSets.ItemById(1)&lt;BR /&gt;
        Set oGraphicsNode = oAssemblyDocument.ComponentDefinition.ClientGraphicsCollection.Item( _&lt;BR /&gt;
            "RangeBoxGraphics").ItemById(1)&lt;BR /&gt;
        Set oTextGraphics_Pnt1 = oGraphicsNode.Item(2)&lt;BR /&gt;
        Set oTextGraphics_Pnt2 = oGraphicsNode.Item(3)&lt;BR /&gt;
        Set oTextGraphics_Pnt3 = oGraphicsNode.Item(4)&lt;BR /&gt;
        Set oTextGraphics_Pnt4 = oGraphicsNode.Item(5)&lt;BR /&gt;
        Set oTextGraphics_Pnt5 = oGraphicsNode.Item(6)&lt;BR /&gt;
        Set oTextGraphics_Pnt6 = oGraphicsNode.Item(7)&lt;BR /&gt;
        Set oTextGraphics_Pnt7 = oGraphicsNode.Item(8)&lt;BR /&gt;
        Set oTextGraphics_Pnt8 = oGraphicsNode.Item(9)&lt;BR /&gt;
        &lt;BR /&gt;
        Set oTextGraphics_xLen = oGraphicsNode.Item(10)&lt;BR /&gt;
        Set oTextGraphics_yLen = oGraphicsNode.Item(11)&lt;BR /&gt;
        Set oTextGraphics_zLen = oGraphicsNode.Item(12)&lt;BR /&gt;
    End If&lt;BR /&gt;
    &lt;BR /&gt;
    Call oBox.GetBoxData(adMinPoint, adMaxPoint)&lt;BR /&gt;
    &lt;BR /&gt;
    ' Line 1 -------------------------------------------------------------------&lt;BR /&gt;
    adBoxLines(1) = adMinPoint(1)&lt;BR /&gt;
    adBoxLines(2) = adMinPoint(2)&lt;BR /&gt;
    adBoxLines(3) = adMinPoint(3)&lt;BR /&gt;
    adBoxLines(4) = adMaxPoint(1)&lt;BR /&gt;
    adBoxLines(5) = adMinPoint(2)&lt;BR /&gt;
    adBoxLines(6) = adMinPoint(3)&lt;BR /&gt;
    'Debug.Print "Line 1: " &amp;amp; C(adMinPoint(1)) &amp;amp; "," &amp;amp; C(adMinPoint(2)) &amp;amp; "," &amp;amp; C(adMinPoint(3)) &amp;amp; " : " &amp;amp; C(adMaxPoint(1)) &amp;amp; "," &amp;amp; C(adMinPoint(2)) &amp;amp; "," &amp;amp; C(adMinPoint(3))&lt;BR /&gt;
    'Point 1&lt;BR /&gt;
    DrawingCoord_Pnt oTextGraphics_Pnt1, "1", adMinPoint(1), adMinPoint(2), adMinPoint(3)&lt;BR /&gt;
    'Point 2&lt;BR /&gt;
    DrawingCoord_Pnt oTextGraphics_Pnt2, "2", adMaxPoint(1), adMinPoint(2), adMinPoint(3)&lt;BR /&gt;
    &lt;BR /&gt;
    &lt;BR /&gt;
    ' Line 2 ---------------------------------------------------------------------&lt;BR /&gt;
    adBoxLines(7) = adMinPoint(1)&lt;BR /&gt;
    adBoxLines(8) = adMinPoint(2)&lt;BR /&gt;
    adBoxLines(9) = adMinPoint(3)&lt;BR /&gt;
    adBoxLines(10) = adMinPoint(1)&lt;BR /&gt;
    adBoxLines(11) = adMaxPoint(2)&lt;BR /&gt;
    adBoxLines(12) = adMinPoint(3)&lt;BR /&gt;
    'Debug.Print "Line 2: " &amp;amp; C(adMaxPoint(1)) &amp;amp; "," &amp;amp; C(adMinPoint(2)) &amp;amp; "," &amp;amp; C(adMinPoint(3)) &amp;amp; " : " &amp;amp; C(adMinPoint(1)) &amp;amp; "," &amp;amp; C(adMaxPoint(2)) &amp;amp; "," &amp;amp; C(adMinPoint(3))&lt;BR /&gt;
    &lt;BR /&gt;
    'Point 3&lt;BR /&gt;
    DrawingCoord_Pnt oTextGraphics_Pnt3, "3", adMinPoint(1), adMaxPoint(2), adMinPoint(3)&lt;BR /&gt;
    &lt;BR /&gt;
    ' Line 3 --------------------------------------------------------------------&lt;BR /&gt;
    adBoxLines(13) = adMinPoint(1)&lt;BR /&gt;
    adBoxLines(14) = adMinPoint(2)&lt;BR /&gt;
    adBoxLines(15) = adMinPoint(3)&lt;BR /&gt;
    adBoxLines(16) = adMinPoint(1)&lt;BR /&gt;
    adBoxLines(17) = adMinPoint(2)&lt;BR /&gt;
    adBoxLines(18) = adMaxPoint(3)&lt;BR /&gt;
    'Debug.Print "Line 3: " &amp;amp; C(adMinPoint(1)) &amp;amp; "," &amp;amp; C(adMinPoint(2)) &amp;amp; "," &amp;amp; C(adMinPoint(3)) &amp;amp; " : " &amp;amp; C(adMinPoint(1)) &amp;amp; "," &amp;amp; C(adMinPoint(2)) &amp;amp; "," &amp;amp; C(adMaxPoint(3))&lt;BR /&gt;
    &lt;BR /&gt;
    'Point 4&lt;BR /&gt;
    DrawingCoord_Pnt oTextGraphics_Pnt4, "4", adMinPoint(1), adMinPoint(2), adMaxPoint(3)&lt;BR /&gt;
    &lt;BR /&gt;
    ' Line 4&lt;BR /&gt;
    adBoxLines(19) = adMaxPoint(1)&lt;BR /&gt;
    adBoxLines(20) = adMaxPoint(2)&lt;BR /&gt;
    adBoxLines(21) = adMaxPoint(3)&lt;BR /&gt;
    adBoxLines(22) = adMinPoint(1)&lt;BR /&gt;
    adBoxLines(23) = adMaxPoint(2)&lt;BR /&gt;
    adBoxLines(24) = adMaxPoint(3)&lt;BR /&gt;
    'Debug.Print "Line 4: " &amp;amp; C(adMaxPoint(1)) &amp;amp; "," &amp;amp; C(adMaxPoint(2)) &amp;amp; "," &amp;amp; C(adMaxPoint(3)) &amp;amp; " : " &amp;amp; C(adMinPoint(1)) &amp;amp; "," &amp;amp; C(adMaxPoint(2)) &amp;amp; "," &amp;amp; C(adMaxPoint(3))&lt;BR /&gt;
    &lt;BR /&gt;
    'Point 5&lt;BR /&gt;
    DrawingCoord_Pnt oTextGraphics_Pnt5, "5", adMaxPoint(1), adMaxPoint(2), adMaxPoint(3)&lt;BR /&gt;
    'Point 6&lt;BR /&gt;
    DrawingCoord_Pnt oTextGraphics_Pnt6, "6", adMinPoint(1), adMaxPoint(2), adMaxPoint(3)&lt;BR /&gt;
    &lt;BR /&gt;
    ' Line 5&lt;BR /&gt;
    adBoxLines(25) = adMaxPoint(1)&lt;BR /&gt;
    adBoxLines(26) = adMaxPoint(2)&lt;BR /&gt;
    adBoxLines(27) = adMaxPoint(3)&lt;BR /&gt;
    adBoxLines(28) = adMaxPoint(1)&lt;BR /&gt;
    adBoxLines(29) = adMinPoint(2)&lt;BR /&gt;
    adBoxLines(30) = adMaxPoint(3)&lt;BR /&gt;
    'Debug.Print "Line 5: " &amp;amp; C(adMaxPoint(1)) &amp;amp; "," &amp;amp; C(adMaxPoint(2)) &amp;amp; "," &amp;amp; C(adMaxPoint(3)) &amp;amp; " : " &amp;amp; C(adMaxPoint(1)) &amp;amp; "," &amp;amp; C(adMinPoint(2)) &amp;amp; "," &amp;amp; C(adMaxPoint(3))&lt;BR /&gt;
    &lt;BR /&gt;
    'Point 7&lt;BR /&gt;
    DrawingCoord_Pnt oTextGraphics_Pnt7, "7", adMaxPoint(1), adMinPoint(2), adMaxPoint(3)&lt;BR /&gt;
    &lt;BR /&gt;
    ' Line 6&lt;BR /&gt;
    adBoxLines(31) = adMaxPoint(1)&lt;BR /&gt;
    adBoxLines(32) = adMaxPoint(2)&lt;BR /&gt;
    adBoxLines(33) = adMaxPoint(3)&lt;BR /&gt;
    adBoxLines(34) = adMaxPoint(1)&lt;BR /&gt;
    adBoxLines(35) = adMaxPoint(2)&lt;BR /&gt;
    adBoxLines(36) = adMinPoint(3)&lt;BR /&gt;
    'Debug.Print "Line 6: " &amp;amp; C(adMaxPoint(1)) &amp;amp; "," &amp;amp; C(adMaxPoint(2)) &amp;amp; "," &amp;amp; C(adMaxPoint(3)) &amp;amp; " : " &amp;amp; C(adMaxPoint(1)) &amp;amp; "," &amp;amp; C(adMaxPoint(2)) &amp;amp; "," &amp;amp; C(adMinPoint(3))&lt;BR /&gt;
    &lt;BR /&gt;
    'Point 8&lt;BR /&gt;
    DrawingCoord_Pnt oTextGraphics_Pnt8, "8", adMaxPoint(1), adMaxPoint(2), adMinPoint(3)&lt;BR /&gt;
    &lt;BR /&gt;
    ' Line 7&lt;BR /&gt;
    adBoxLines(37) = adMinPoint(1)&lt;BR /&gt;
    adBoxLines(38) = adMaxPoint(2)&lt;BR /&gt;
    adBoxLines(39) = adMinPoint(3)&lt;BR /&gt;
    adBoxLines(40) = adMaxPoint(1)&lt;BR /&gt;
    adBoxLines(41) = adMaxPoint(2)&lt;BR /&gt;
    adBoxLines(42) = adMinPoint(3)&lt;BR /&gt;
    'Debug.Print "Line 7: " &amp;amp; C(adMinPoint(1)) &amp;amp; "," &amp;amp; C(adMaxPoint(2)) &amp;amp; "," &amp;amp; C(adMinPoint(3)) &amp;amp; " : " &amp;amp; C(adMaxPoint(1)) &amp;amp; "," &amp;amp; C(adMaxPoint(2)) &amp;amp; "," &amp;amp; C(adMinPoint(3))&lt;BR /&gt;
    &lt;BR /&gt;
    ' Line 8&lt;BR /&gt;
    adBoxLines(43) = adMinPoint(1)&lt;BR /&gt;
    adBoxLines(44) = adMaxPoint(2)&lt;BR /&gt;
    adBoxLines(45) = adMinPoint(3)&lt;BR /&gt;
    adBoxLines(46) = adMinPoint(1)&lt;BR /&gt;
    adBoxLines(47) = adMaxPoint(2)&lt;BR /&gt;
    adBoxLines(48) = adMaxPoint(3)&lt;BR /&gt;
    'Debug.Print "Line 8: " &amp;amp; C(adMinPoint(1)) &amp;amp; "," &amp;amp; C(adMaxPoint(2)) &amp;amp; "," &amp;amp; C(adMinPoint(3)) &amp;amp; " : " &amp;amp; C(adMinPoint(1)) &amp;amp; "," &amp;amp; C(adMaxPoint(2)) &amp;amp; "," &amp;amp; C(adMaxPoint(3))&lt;BR /&gt;
    &lt;BR /&gt;
    ' Line 9&lt;BR /&gt;
    adBoxLines(49) = adMaxPoint(1)&lt;BR /&gt;
    adBoxLines(50) = adMinPoint(2)&lt;BR /&gt;
    adBoxLines(51) = adMaxPoint(3)&lt;BR /&gt;
    adBoxLines(52) = adMaxPoint(1)&lt;BR /&gt;
    adBoxLines(53) = adMinPoint(2)&lt;BR /&gt;
    adBoxLines(54) = adMinPoint(3)&lt;BR /&gt;
    'Debug.Print "Line 9: " &amp;amp; C(adMaxPoint(1)) &amp;amp; "," &amp;amp; C(adMinPoint(2)) &amp;amp; "," &amp;amp; C(adMaxPoint(3)) &amp;amp; " : " &amp;amp; C(adMaxPoint(1)) &amp;amp; "," &amp;amp; C(adMinPoint(2)) &amp;amp; "," &amp;amp; C(adMinPoint(3))&lt;BR /&gt;
    &lt;BR /&gt;
    ' Line 10&lt;BR /&gt;
    adBoxLines(55) = adMaxPoint(1)&lt;BR /&gt;
    adBoxLines(56) = adMinPoint(2)&lt;BR /&gt;
    adBoxLines(57) = adMaxPoint(3)&lt;BR /&gt;
    adBoxLines(58) = adMinPoint(1)&lt;BR /&gt;
    adBoxLines(59) = adMinPoint(2)&lt;BR /&gt;
    adBoxLines(60) = adMaxPoint(3)&lt;BR /&gt;
    'Debug.Print "Line 10: " &amp;amp; C(adMaxPoint(1)) &amp;amp; "," &amp;amp; C(adMinPoint(2)) &amp;amp; "," &amp;amp; C(adMaxPoint(3)) &amp;amp; " : " &amp;amp; C(adMinPoint(1)) &amp;amp; "," &amp;amp; C(adMinPoint(2)) &amp;amp; "," &amp;amp; C(adMaxPoint(3))&lt;BR /&gt;
    &lt;BR /&gt;
    ' Line 11&lt;BR /&gt;
    adBoxLines(61) = adMinPoint(1)&lt;BR /&gt;
    adBoxLines(62) = adMinPoint(2)&lt;BR /&gt;
    adBoxLines(63) = adMaxPoint(3)&lt;BR /&gt;
    adBoxLines(64) = adMinPoint(1)&lt;BR /&gt;
    adBoxLines(65) = adMaxPoint(2)&lt;BR /&gt;
    adBoxLines(66) = adMaxPoint(3)&lt;BR /&gt;
    'Debug.Print "Line 11: " &amp;amp; C(adMinPoint(1)) &amp;amp; "," &amp;amp; C(adMinPoint(2)) &amp;amp; "," &amp;amp; C(adMaxPoint(3)) &amp;amp; " : " &amp;amp; C(adMinPoint(1)) &amp;amp; "," &amp;amp; C(adMaxPoint(2)) &amp;amp; "," &amp;amp; C(adMaxPoint(3))&lt;BR /&gt;
    &lt;BR /&gt;
    ' Line 12&lt;BR /&gt;
    adBoxLines(67) = adMaxPoint(1)&lt;BR /&gt;
    adBoxLines(68) = adMinPoint(2)&lt;BR /&gt;
    adBoxLines(69) = adMinPoint(3)&lt;BR /&gt;
    adBoxLines(70) = adMaxPoint(1)&lt;BR /&gt;
    adBoxLines(71) = adMaxPoint(2)&lt;BR /&gt;
    adBoxLines(72) = adMinPoint(3)&lt;BR /&gt;
    'Debug.Print "Line 12: " &amp;amp; C(adMaxPoint(1)) &amp;amp; "," &amp;amp; C(adMinPoint(2)) &amp;amp; "," &amp;amp; C(adMinPoint(3)) &amp;amp; " : " &amp;amp; C(adMaxPoint(1)) &amp;amp; "," &amp;amp; C(adMaxPoint(2)) &amp;amp; "," &amp;amp; C(adMinPoint(3))&lt;BR /&gt;
    &lt;BR /&gt;
    ' Assign the points into the coordinate set.&lt;BR /&gt;
    Call oGraphicsCoordinateSet.PutCoordinates(adBoxLines)&lt;BR /&gt;
    &lt;BR /&gt;
    ' Update the display.&lt;BR /&gt;
    ThisApplication.ActiveView.Update&lt;BR /&gt;
End Sub&lt;BR /&gt;
&lt;BR /&gt;
Sub DrawingCoord_Pnt(oTextGraphics As TextGraphics, sPointNum As String, ByVal X As Double, ByVal Y As Double, ByVal Z As Double)&lt;BR /&gt;
    Debug.Print "P " &amp;amp; sPointNum &amp;amp; ": " &amp;amp; X &amp;amp; "," &amp;amp; Y &amp;amp; "," &amp;amp; X&lt;BR /&gt;
    oTextGraphics.Text = "P" &amp;amp; sPointNum &amp;amp; ": " &amp;amp; C(X) &amp;amp; "," &amp;amp; C(Y) &amp;amp; "," &amp;amp; C(Z)&lt;BR /&gt;
    oTextGraphics.SetTransformBehavior oTransientGeometry.CreatePoint(X, Y, Z), kFrontFacingAndPixelScaling&lt;BR /&gt;
    oTextGraphics.FontSize = 10&lt;BR /&gt;
    oTextGraphics.HorizontalAlignment = kAlignTextCenter&lt;BR /&gt;
    oTextGraphics.VerticalAlignment = kAlignTextMiddle&lt;BR /&gt;
End Sub&lt;BR /&gt;
&lt;BR /&gt;
Function C(dCoord As Double) As String&lt;BR /&gt;
    C = CStr(dCoord)&lt;BR /&gt;
'    Dim iP As Integer&lt;BR /&gt;
'    iP = InStr(C, ".")&lt;BR /&gt;
'    If iP &amp;lt;&amp;gt; 0 Then C = Mid(C, 1, iP + 3)&lt;BR /&gt;
End Function&lt;BR /&gt;
{code}</description>
      <pubDate>Tue, 30 Mar 2010 20:58:44 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-forum/rangebox-rotated-part/m-p/2654586#M144290</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2010-03-30T20:58:44Z</dc:date>
    </item>
    <item>
      <title>Re: RangeBox - Rotated Part</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-forum/rangebox-rotated-part/m-p/2654587#M144291</link>
      <description>There's a long discussion that related to this here: &lt;BR /&gt;
http://discussion.autodesk.com/forums/thread.jspa?messageID=5181844ᆔ&lt;BR /&gt;
-- &lt;BR /&gt;
Brian Ekins&lt;BR /&gt;
Inventor API Product Designer&lt;BR /&gt;
http://blogs.autodesk.com/modthemachine</description>
      <pubDate>Tue, 30 Mar 2010 23:09:52 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-forum/rangebox-rotated-part/m-p/2654587#M144291</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2010-03-30T23:09:52Z</dc:date>
    </item>
    <item>
      <title>Re: RangeBox - Rotated Part</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-forum/rangebox-rotated-part/m-p/2654588#M144292</link>
      <description>You're right that this doesn't handle an assembly.  Although I think it can &lt;BR /&gt;
be scaled up to handle assemblies by doing this procedure to get the range &lt;BR /&gt;
box of each part and combining those boxes to get a range box that contains &lt;BR /&gt;
all of the parts.&lt;BR /&gt;
&lt;BR /&gt;
The functionality I used was new in Inventor 2010.&lt;BR /&gt;
-- &lt;BR /&gt;
Brian Ekins&lt;BR /&gt;
Inventor API Product Designer&lt;BR /&gt;
http://blogs.autodesk.com/modthemachine</description>
      <pubDate>Tue, 30 Mar 2010 23:12:25 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-forum/rangebox-rotated-part/m-p/2654588#M144292</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2010-03-30T23:12:25Z</dc:date>
    </item>
    <item>
      <title>Re: RangeBox - Rotated Part</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-forum/rangebox-rotated-part/m-p/2654589#M144293</link>
      <description>Thanks Brian.  I will use your function when comparing two doubles however in this case I'm not comparing numbers.  Do you have any suggestions on how I can convert the number I'm getting from Inventor (in this case should be 0 but I'm getting for instance -2.22044604925031E-16)?  My guess is no but I have to ask.&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
Also, when I convert for instance -2.22044604925031E-16 to a string I get "-2.22044604925031E-16".  How can I get "-0.000000000000000222044604925031" instead?

Edited by: Cadfish1 on Mar 31, 2010 5:30 PM</description>
      <pubDate>Wed, 31 Mar 2010 16:13:15 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-forum/rangebox-rotated-part/m-p/2654589#M144293</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2010-03-31T16:13:15Z</dc:date>
    </item>
    <item>
      <title>Re: RangeBox - Rotated Part</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-forum/rangebox-rotated-part/m-p/2654590#M144294</link>
      <description>You'll need to use a function that formats the value.  For example, your &lt;BR /&gt;
function "C" can be changed to:&lt;BR /&gt;
&lt;BR /&gt;
Function C(dCoord As Double) As String&lt;BR /&gt;
    C = Format(dCoord, "0.00000")&lt;BR /&gt;
End Function&lt;BR /&gt;
&lt;BR /&gt;
The second argument controls the output format.  In this case the resulting &lt;BR /&gt;
number will show file number to the right of the decimal.  Just add more &lt;BR /&gt;
zeros for more numbers.&lt;BR /&gt;
&lt;BR /&gt;
In VB.net you can use the Format property of the Double object:&lt;BR /&gt;
&lt;BR /&gt;
    Function C(ByVal dCoord As Double) As String&lt;BR /&gt;
        Return dCoord.ToString("0.00000")&lt;BR /&gt;
    End Function&lt;BR /&gt;
&lt;BR /&gt;
-- &lt;BR /&gt;
Brian Ekins&lt;BR /&gt;
Inventor API Product Designer&lt;BR /&gt;
http://blogs.autodesk.com/modthemachine</description>
      <pubDate>Wed, 31 Mar 2010 19:04:05 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-forum/rangebox-rotated-part/m-p/2654590#M144294</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2010-03-31T19:04:05Z</dc:date>
    </item>
    <item>
      <title>Re: RangeBox - Rotated Part</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-forum/rangebox-rotated-part/m-p/2654591#M144295</link>
      <description>Thank you Brian.</description>
      <pubDate>Thu, 01 Apr 2010 11:50:00 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-forum/rangebox-rotated-part/m-p/2654591#M144295</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2010-04-01T11:50:00Z</dc:date>
    </item>
    <item>
      <title>Re: RangeBox - Rotated Part</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-forum/rangebox-rotated-part/m-p/2654592#M144296</link>
      <description>I haven't done exhaustive testing but this seems to work.  This function uses Format to round the number off to (in this case) 14 places which seems to work for numbers that should a whole number but display something else (like -2.22044604925031E-16 which should be 0.0 and 0.99999999999999999999999 which should be 1.0).  Because Format adds trailing zeros, a While loop is added to remove any.  There of course could be situations where the number is actually within 14 places which rounds off to a whole number but shouldn't be rounded off.  Use at your own risk.&lt;BR /&gt;
&lt;BR /&gt;
{code}&lt;BR /&gt;
Function C(ByVal dReal As Double) As String&lt;BR /&gt;
    'Out to 14 places seems to do the trick but not completely sure.&lt;BR /&gt;
    C = Format(dReal, "0.00000000000000")&lt;BR /&gt;
    'Next trim the trailing zero&lt;BR /&gt;
    While Right(C, 1) = "0"&lt;BR /&gt;
        C = Mid(C, 1, Len(C) - 1)&lt;BR /&gt;
    Wend&lt;BR /&gt;
    If Right(C, 1) = "." Then C = C &amp;amp; "0"&lt;BR /&gt;
End Function&lt;BR /&gt;
{code}</description>
      <pubDate>Thu, 01 Apr 2010 15:39:03 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-forum/rangebox-rotated-part/m-p/2654592#M144296</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2010-04-01T15:39:03Z</dc:date>
    </item>
    <item>
      <title>Re: RangeBox - Rotated Part</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-forum/rangebox-rotated-part/m-p/3763898#M144297</link>
      <description>&lt;P&gt;&lt;SPAN&gt;Could you write here code, how you get the red box?&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Because, I need red box &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 29 Jan 2013 09:49:27 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-forum/rangebox-rotated-part/m-p/3763898#M144297</guid>
      <dc:creator>martinxw</dc:creator>
      <dc:date>2013-01-29T09:49:27Z</dc:date>
    </item>
  </channel>
</rss>

