<?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 Betreff: VBA Predict Offset for Angle and Mate, keep part position and angle in in Inventor Programming Forum</title>
    <link>https://forums.autodesk.com/t5/inventor-programming-forum/vba-predict-offset-for-angle-and-mate-keep-part-position-and/m-p/6271169#M111073</link>
    <description>A suggestion:&lt;BR /&gt;&lt;BR /&gt;As long as the parts are oriented properly, you can always ground all of them and then modify their positions based upon their occurrence coordinates (as found in the occurrence iProperties).&lt;BR /&gt;&lt;BR /&gt;Further, you can take all of the coordinates and put them into an excel file to bulk edit the x/y/z components of the origin points of your occurrences, and then have inventor update to match changes in excel.&lt;BR /&gt;&lt;BR /&gt;I know it's definitely possible as I have made a program to do exactly this in the past. &lt;BR /&gt;&lt;BR /&gt;Good luck!</description>
    <pubDate>Thu, 14 Apr 2016 15:51:17 GMT</pubDate>
    <dc:creator>MechMachineMan</dc:creator>
    <dc:date>2016-04-14T15:51:17Z</dc:date>
    <item>
      <title>VBA Predict Offset for Angle and Mate, keep part position and angle in assembly</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-forum/vba-predict-offset-for-angle-and-mate-keep-part-position-and/m-p/6246456#M111068</link>
      <description>&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Hello everyone,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Nice to see that there is a forum to ask questions !&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;What I want to do is to recuperate assembly with a lot of part more than 100 whose are constraints with face and not workplans. Than when I modify one face where an other face is constraint with, I got an error because he loose his face for the constraint!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;So than I wanted to delete all constraint with VBA and recreate new constraints but from the orgin of the part to the orgin of the assembly with the corect offset for all axis and rotation angle to keep the part in his position in the assembly.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The first step to constraint the position of the part is already working:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Dim oAsmCompDef As AssemblyComponentDefinition&lt;BR /&gt;Set oAsmCompDef = ThisApplication.ActiveDocument.ComponentDefinition&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Dim assemblydoc As AssemblyDocument&lt;BR /&gt;Set assemblydoc = ThisApplication.ActiveDocument&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;'Create a list of the selected part in the assembly&lt;/P&gt;&lt;P&gt;Dim occurrenceList As New Collection&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Dim entity As Object&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; For Each entity In assemblydoc.SelectSet&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; If TypeOf entity Is ComponentOccurrence Then&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; occurrenceList.Add entity&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; End If&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Next&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;'I use the first part I selected&lt;/P&gt;&lt;P&gt;Dim thisOcc As ComponentOccurrence&lt;/P&gt;&lt;P&gt;Set thisOcc = occurrenceList.Item(1)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;'I determinate the origin workplane of the assembly&lt;/P&gt;&lt;P&gt;Dim BaseXY As WorkPlane&lt;BR /&gt;Dim BaseYZ As WorkPlane&lt;BR /&gt;Dim BaseXZ As WorkPlane&lt;/P&gt;&lt;P&gt;Set BaseYZ = oAsmCompDef.WorkPlanes.Item(1) 'YZ&lt;BR /&gt;Set BaseXZ = oAsmCompDef.WorkPlanes.Item(2) 'XZ&lt;BR /&gt;Set BaseXY = oAsmCompDef.WorkPlanes.Item(3) 'XY&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;'I determinate the Origin Point of the part&lt;/P&gt;&lt;P&gt;Dim PointCible As WorkPoint&lt;BR /&gt;Set PointCible = thisOcc.Definition.WorkPoints.Item(1)&lt;BR /&gt;Call thisOcc.CreateGeometryProxy(PointCible, PointCible)&amp;nbsp;&amp;nbsp; 'i create the geometryProxy&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;'Than I measure in the 3 axis X,Y,Z the distance between the workplan of the assembly and the origin of my part&lt;/P&gt;&lt;P&gt;Dim Distance1, Distance2, Distance3 As Double&lt;/P&gt;&lt;P&gt;Distance1 = ThisApplication.MeasureTools.GetMinimumDistance(BaseXY, PointCible)&lt;BR /&gt;Distance2 = ThisApplication.MeasureTools.GetMinimumDistance(BaseYZ, PointCible)&lt;BR /&gt;Distance3 = ThisApplication.MeasureTools.GetMinimumDistance(BaseXZ, PointCible)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;'And I constraint the point of the part with the 3 workplans of the assembly than the point of origin from my part is blocked&lt;/P&gt;&lt;P&gt;Dim constraints As AssemblyConstraints&lt;BR /&gt;Set constraints = assemblydoc.ComponentDefinition.constraints&lt;/P&gt;&lt;P&gt;Call constraints.AddMateConstraint(BaseXY, PointCible, Distance1)&lt;BR /&gt;Call constraints.AddMateConstraint(BaseYZ, PointCible, Distance2)&lt;BR /&gt;Call constraints.AddMateConstraint(BaseXZ, PointCible, Distance3)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;'Ok our part is now fixed with dimention in the assembly in their original position&lt;/P&gt;&lt;P&gt;'Now We must do the same thing but with the orientation&lt;/P&gt;&lt;P&gt;'The best way to do that I think, is using &lt;STRONG&gt;AddAngleConstraint&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;'To constrain with angle we need vectors, than we will use the axis vector from our part&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;'We determinate the axis of the part and create the geometry proxy&lt;/P&gt;&lt;P&gt;Dim occAxeX As WorkAxis&lt;BR /&gt;Dim occAxeY As WorkAxis&lt;BR /&gt;Dim occAxeZ As WorkAxis&lt;/P&gt;&lt;P&gt;Set occAxeX = thisOcc.Definition.WorkAxes.Item(1)&lt;BR /&gt;Set occAxeY = thisOcc.Definition.WorkAxes.Item(2)&lt;BR /&gt;Set occAxeZ = thisOcc.Definition.WorkAxes.Item(3)&lt;/P&gt;&lt;P&gt;Call thisOcc.CreateGeometryProxy(occAxeX, occAxeX)&lt;BR /&gt;Call thisOcc.CreateGeometryProxy(occAxeY, occAxeY)&lt;BR /&gt;Call thisOcc.CreateGeometryProxy(occAxeZ, occAxeZ)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;'We make the measure between the workplan YZ of the assembly and the axis of the part to have all angle we need&lt;/P&gt;&lt;P&gt;Dim Angle1, Angle2, Angle3 As Double&lt;/P&gt;&lt;P&gt;Angle1 = ThisApplication.MeasureTools.GetAngle(BaseYZ, occAxeX)&lt;BR /&gt;Angle2 = ThisApplication.MeasureTools.GetAngle(BaseYZ, occAxeY)&lt;BR /&gt;Angle3 = ThisApplication.MeasureTools.GetAngle(BaseYZ, occAxeZ)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;'Ok we think that we have the angle, but NO! See below&lt;/P&gt;&lt;P&gt;'In a beautiful world it will have been so :&lt;/P&gt;&lt;P&gt;//Call constraints.AddAngleConstraint(BaseYZ, occAxeX, Angle1)&lt;/P&gt;&lt;P&gt;//Call constraints.AddAngleConstraint(BaseYZ, occAxeY, Angle2)&lt;/P&gt;&lt;P&gt;//Call constraints.AddAngleConstraint(BaseYZ, occAxeZ, Angle3)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;We have a problem with the function GetAngle, this function return me &lt;STRONG&gt;the short angle.&amp;nbsp;&lt;/STRONG&gt;I tested turning the part arround the Z axis :&lt;/P&gt;&lt;P&gt;I turn the X Axis of the part in the anti-clockwise and measure manualy the angle, I have 68,54° from the workplan to the axis. Then I launch the Macro and he make a rotation of the part of 68,54° but from the Normal of the workplan.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;IMG src="https://forums.autodesk.com/t5/image/serverpage/image-id/228887iD27FAEB7373AB18B/image-size/original?v=lz-1&amp;amp;px=-1" alt="result1.png" title="result1.png" border="0" /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I say Ok just cheat with 90°-Angle and it works ! But only if I stay on the top of the workplan.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;IMG src="https://forums.autodesk.com/t5/image/serverpage/image-id/228891i93901D50CF1E3A29/image-size/original?v=lz-1&amp;amp;px=-1" alt="cheat with 90 minus angle.png" title="cheat with 90 minus angle.png" border="0" /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;This doesn't work if we are under the workplan YZ of the assembly !&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;IMG src="https://forums.autodesk.com/t5/image/serverpage/image-id/228892i790170CB263C9B38/image-size/original?v=lz-1&amp;amp;px=-1" alt="under.png" title="under.png" border="0" /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Now I can't cheat more ! I need to do 90 - angle + 90 or put -angle. But there is two case of possibility and I don't know how can I know if I need to put "90°-Angle" or "-angle" into &lt;STRONG&gt;AddAngleConstraint&lt;/STRONG&gt; !&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The measure method don't give more information, or there is something to do with the EntityThree but that is to measure with 3 point :&lt;/P&gt;&lt;P&gt;Function GetAngle(EntityOne As Object, EntityTwo As Object, [EntityThree]) As Double&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I know that you can use the &lt;STRONG&gt;tool Predict Offset&lt;/STRONG&gt; when you do it manually:&lt;/P&gt;&lt;P&gt;In this case there is no problem with the orientation of the part. It will be more easy to use this command with VBA !&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;IMG src="https://forums.autodesk.com/t5/image/serverpage/image-id/228856i8A17DF9A666392FF/image-size/original?v=lz-1&amp;amp;px=-1" alt="inventor Offset Predict.png" title="inventor Offset Predict.png" border="0" /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;It is why I wanted to use it but, I can't find a function to it in VBA.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;-You can help me if you know how to use this function &lt;STRONG&gt;Predict Offset&lt;/STRONG&gt; with VBA&lt;/P&gt;&lt;P&gt;-Or if you know how to know when the normal of the XYplan of the part or the X axis is look under the workplan of the assembly YZ&lt;/P&gt;&lt;P&gt;-Or if you know an other method to do what I am searching to do !&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have see something which can help here but I don't understand it : &lt;A href="https://forums.autodesk.com/t5/inventor-customization/angle-measurement/td-p/1779098" target="_blank"&gt;https://forums.autodesk.com/t5/inventor-customization/angle-measurement/td-p/1779098&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I thank very much of the person who will found a solution !&lt;/P&gt;&lt;P&gt;Thank a lot&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Have a nice day!&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;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 01 Apr 2016 14:50:26 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-forum/vba-predict-offset-for-angle-and-mate-keep-part-position-and/m-p/6246456#M111068</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2016-04-01T14:50:26Z</dc:date>
    </item>
    <item>
      <title>Betreff: VBA Predict Offset for Angle and Mate, keep part position and angle in</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-forum/vba-predict-offset-for-angle-and-mate-keep-part-position-and/m-p/6249385#M111069</link>
      <description>&lt;P&gt;Hello Jeremie,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;that's the same problem:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;A href="http://forums.autodesk.com/t5/inventor-customization/ilogic-angle/m-p/5685343#M56818" target="_blank"&gt;http://forums.autodesk.com/t5/inventor-customization/ilogic-angle/m-p/5685343#M56818&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Cheers&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Georg&lt;/P&gt;</description>
      <pubDate>Mon, 04 Apr 2016 06:59:07 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-forum/vba-predict-offset-for-angle-and-mate-keep-part-position-and/m-p/6249385#M111069</guid>
      <dc:creator>GeorgK</dc:creator>
      <dc:date>2016-04-04T06:59:07Z</dc:date>
    </item>
    <item>
      <title>Betreff: VBA Predict Offset for Angle and Mate, keep part position and angle in</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-forum/vba-predict-offset-for-angle-and-mate-keep-part-position-and/m-p/6251710#M111070</link>
      <description>&lt;P&gt;Hello Georg,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;It is a good thing that we can see the orientation of the normal with Occurrence.Plane.Normal.X. This solution work with a plan turning on one axis, but I must find a way to work with the 3 axis. An another problem is that I can't constraint(with an angle) a plan with an other plan in this case:&lt;/P&gt;&lt;P&gt;&lt;IMG src="https://forums.autodesk.com/t5/image/serverpage/image-id/229558i166B8BB46A8E2131/image-size/original?v=lz-1&amp;amp;px=-1" alt="3axes.png" title="3axes.png" border="0" /&gt;&lt;/P&gt;&lt;P&gt;I must use an axis for the occurence to place. There is no Normal for an axis.&lt;/P&gt;&lt;P&gt;Now I am late in my work to search a solution I must do it manualy&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;But I am sure there is a solution to use the Preddict function with vba or with Ilogic !&lt;/P&gt;&lt;P&gt;&lt;IMG src="https://forums.autodesk.com/t5/image/serverpage/image-id/229560i9EE7359FAD697059/image-size/original?v=lz-1&amp;amp;px=-1" alt="inventor Offset Predict.png" title="inventor Offset Predict.png" border="0" /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you for your answere Georg!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Jérémie&lt;/P&gt;</description>
      <pubDate>Tue, 05 Apr 2016 08:55:20 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-forum/vba-predict-offset-for-angle-and-mate-keep-part-position-and/m-p/6251710#M111070</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2016-04-05T08:55:20Z</dc:date>
    </item>
    <item>
      <title>Betreff: VBA Predict Offset for Angle and Mate, keep part position and angle in</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-forum/vba-predict-offset-for-angle-and-mate-keep-part-position-and/m-p/6270341#M111071</link>
      <description>Hi Jérémie,&lt;BR /&gt;&lt;BR /&gt;I failed to find the direct APIs you are looking for. I doubt you might need to create a transient geometry (say a plane) , get its normal as if it is based on the axis you wanted to constrain. &lt;BR /&gt;&lt;BR /&gt;anyway, I will check with our engineer team.</description>
      <pubDate>Thu, 14 Apr 2016 10:06:09 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-forum/vba-predict-offset-for-angle-and-mate-keep-part-position-and/m-p/6270341#M111071</guid>
      <dc:creator>xiaodong_liang</dc:creator>
      <dc:date>2016-04-14T10:06:09Z</dc:date>
    </item>
    <item>
      <title>Betreff: VBA Predict Offset for Angle and Mate, keep part position and angle in</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-forum/vba-predict-offset-for-angle-and-mate-keep-part-position-and/m-p/6270749#M111072</link>
      <description>&lt;P&gt;Hi Xiaodong,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you for your response, when I can take the time, I will see how I can do it with transient geometry.&lt;/P&gt;&lt;P&gt;I will be happy to have a feedback of the engineer team if there is something about the predict function.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Have a nice day&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Jérémie&lt;/P&gt;</description>
      <pubDate>Thu, 14 Apr 2016 13:19:36 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-forum/vba-predict-offset-for-angle-and-mate-keep-part-position-and/m-p/6270749#M111072</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2016-04-14T13:19:36Z</dc:date>
    </item>
    <item>
      <title>Betreff: VBA Predict Offset for Angle and Mate, keep part position and angle in</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-forum/vba-predict-offset-for-angle-and-mate-keep-part-position-and/m-p/6271169#M111073</link>
      <description>A suggestion:&lt;BR /&gt;&lt;BR /&gt;As long as the parts are oriented properly, you can always ground all of them and then modify their positions based upon their occurrence coordinates (as found in the occurrence iProperties).&lt;BR /&gt;&lt;BR /&gt;Further, you can take all of the coordinates and put them into an excel file to bulk edit the x/y/z components of the origin points of your occurrences, and then have inventor update to match changes in excel.&lt;BR /&gt;&lt;BR /&gt;I know it's definitely possible as I have made a program to do exactly this in the past. &lt;BR /&gt;&lt;BR /&gt;Good luck!</description>
      <pubDate>Thu, 14 Apr 2016 15:51:17 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-forum/vba-predict-offset-for-angle-and-mate-keep-part-position-and/m-p/6271169#M111073</guid>
      <dc:creator>MechMachineMan</dc:creator>
      <dc:date>2016-04-14T15:51:17Z</dc:date>
    </item>
    <item>
      <title>Betreff: VBA Predict Offset for Angle and Mate, keep part position and angle in</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-forum/vba-predict-offset-for-angle-and-mate-keep-part-position-and/m-p/6272262#M111074</link>
      <description>&lt;P&gt;Hello Justin,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;is it possible that you post the program?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Georg&lt;/P&gt;</description>
      <pubDate>Fri, 15 Apr 2016 06:09:58 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-forum/vba-predict-offset-for-angle-and-mate-keep-part-position-and/m-p/6272262#M111074</guid>
      <dc:creator>GeorgK</dc:creator>
      <dc:date>2016-04-15T06:09:58Z</dc:date>
    </item>
    <item>
      <title>Betreff: VBA Predict Offset for Angle and Mate, keep part position and angle in</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-forum/vba-predict-offset-for-angle-and-mate-keep-part-position-and/m-p/6272827#M111075</link>
      <description>&lt;P&gt;Hi Justin,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have see this coordinate in the Ipropetry of files but I havn't found something to modify it ! But it is a good idea what you suggest !&lt;/P&gt;&lt;P&gt;I found a topic here who speak about these angle in the ipropetry to read it and I tried it :&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;A href="http://forums.autodesk.com/t5/inventor-customization/orientation-angle-of-occurrence/td-p/3689848" target="_blank"&gt;http://forums.autodesk.com/t5/inventor-customization/orientation-angle-of-occurrence/td-p/3689848&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have make rotation of my part and look what of result I becom from this function from this link look there :&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;IMG src="https://forums.autodesk.com/t5/image/serverpage/image-id/232369iC94AC56EFF5D16E4/image-size/original?v=lz-1&amp;amp;px=-1" alt="eulerangle.png" title="eulerangle.png" border="0" /&gt;&lt;/P&gt;&lt;P&gt;I got error when I turn 90° and 180° maybe because he make square from 0, i could ignore this error with less precision into the angle.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have search what is euler angle here :&lt;/P&gt;&lt;P&gt;&lt;IMG src="https://forums.autodesk.com/t5/image/serverpage/image-id/232373i917D622F00D30719/image-size/original?v=lz-1&amp;amp;px=-1" alt="img009.gif" title="img009.gif" border="0" /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;So it is what I wanted to do to keep my part in position !&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am not very strong in geometry, I am lost with geometry in 3D !&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;How can I do with these value to constrain my part in his position ?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I will be interested to know how you have done !&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Have a nice day&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Jérémie&lt;/P&gt;</description>
      <pubDate>Fri, 15 Apr 2016 12:45:33 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-forum/vba-predict-offset-for-angle-and-mate-keep-part-position-and/m-p/6272827#M111075</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2016-04-15T12:45:33Z</dc:date>
    </item>
    <item>
      <title>Betreff: VBA Predict Offset for Angle and Mate, keep part position and angle in</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-forum/vba-predict-offset-for-angle-and-mate-keep-part-position-and/m-p/6272908#M111076</link>
      <description>&lt;P&gt;If you actually need to rotate the parts, things actually get quite a bit more complicated.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;During the rotation of a part about 3 station axes, the ORDER of the rotations becomes significant. ie if you rotate x -&amp;gt; y -&amp;gt; z you will get a different result then y -&amp;gt; z -&amp;gt; x.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;To overcome this, you need to either use vectors to define the angle of the body, or come up with some sort of standard algorithm that always rotates in the same direction, and be able to translate that resultant rotation back into some form you can input so that you can predict it.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;That's why my solution only accounts for position of part in it's current fashion.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Also, Occurrence.Transformation is how you axis the matrix of the body in the context of the general assembly.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Good luck!&lt;/P&gt;</description>
      <pubDate>Fri, 15 Apr 2016 13:19:39 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-forum/vba-predict-offset-for-angle-and-mate-keep-part-position-and/m-p/6272908#M111076</guid>
      <dc:creator>MechMachineMan</dc:creator>
      <dc:date>2016-04-15T13:19:39Z</dc:date>
    </item>
    <item>
      <title>Betreff: VBA Predict Offset for Angle and Mate, keep part position and angle in</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-forum/vba-predict-offset-for-angle-and-mate-keep-part-position-and/m-p/6281354#M111077</link>
      <description>Hi Jeremy,&lt;BR /&gt;&lt;BR /&gt;Our expert checked this post. It looks you just wanted to fix the movement of origin of the component. then fix the rotation of the component. We can be wrong on your requirement, but if this is the case, the simplest way is to make component Grounded by component.Grounded. It is not much clear to us you are searching a bit complex workflow.</description>
      <pubDate>Wed, 20 Apr 2016 08:38:13 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-forum/vba-predict-offset-for-angle-and-mate-keep-part-position-and/m-p/6281354#M111077</guid>
      <dc:creator>xiaodong_liang</dc:creator>
      <dc:date>2016-04-20T08:38:13Z</dc:date>
    </item>
    <item>
      <title>Betreff: VBA Predict Offset for Angle and Mate, keep part position and angle in</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-forum/vba-predict-offset-for-angle-and-mate-keep-part-position-and/m-p/6281584#M111078</link>
      <description>&lt;P&gt;Hi Xiaodong,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Yes the case grounded can work only to block it in this position. But when I wanted to modify the position or the angle from the componant, I need mates with parameter ! Or is there a way to move a grounded part with VBA in the 3 axis and 3 rotation that we can see in the Ipropetry ?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I want to make a table of orientation and position from componant inside the assembly which can be modified manually or with a programm :&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;IMG src="https://forums.autodesk.com/t5/image/serverpage/image-id/233520iA5041AFABD0052F1/image-size/original?v=lz-1&amp;amp;px=-1" alt="tableConstraint.PNG" title="tableConstraint.PNG" border="0" /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;What I want to do with this code is to block all component in their respective position and angle then if I modify one of the component there are no error due of mate making from face to other face for exemple:&lt;/P&gt;&lt;P&gt;We have a lot of model who was draw with constraint make from face to face, now when we modify the geometry of the component, the constraint which was placed from a face who have move or been removed,&amp;nbsp; in the assembly there are a lot of error to correct, it is easier to delet all constraint and remake them, but its take a long time.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;If the code work, just run it to remove all constraint and recreate constraint from all component from their origine to the origine of the assembly. Then I can modify componants as i want, they stay in position. You will say me it is the grounded solution then, but if I want to play with the parameter from the position or oriention of componants, I can not.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks for the expert team response&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Jérémie&lt;/P&gt;</description>
      <pubDate>Wed, 20 Apr 2016 11:22:29 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-forum/vba-predict-offset-for-angle-and-mate-keep-part-position-and/m-p/6281584#M111078</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2016-04-20T11:22:29Z</dc:date>
    </item>
    <item>
      <title>Betreff: VBA Predict Offset for Angle and Mate, keep part position and angle in</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-forum/vba-predict-offset-for-angle-and-mate-keep-part-position-and/m-p/6291868#M111079</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;SPAN&gt;Jérémie,&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;I'm just not sure what you need the angles for.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Each component knows its transformation matrix (ComponentOccurrence.Transformation) which you can store and then use it to move them back if needed. There is an article on transformations in context of multi level assemblies as well:&amp;nbsp;&lt;A href="http://adndevblog.typepad.com/manufacturing/2013/07/occurrences-contexts-definitions-proxies.html" target="_self"&gt;http://adndevblog.typepad.com/manufacturing/2013/07/occurrences-contexts-definitions-proxies.html&lt;/A&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Would that be enough?&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Cheers,&lt;/SPAN&gt;&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>Mon, 25 Apr 2016 19:57:21 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-forum/vba-predict-offset-for-angle-and-mate-keep-part-position-and/m-p/6291868#M111079</guid>
      <dc:creator>adam.nagy</dc:creator>
      <dc:date>2016-04-25T19:57:21Z</dc:date>
    </item>
    <item>
      <title>Betreff: VBA Predict Offset for Angle and Mate, keep part position and angle in</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-forum/vba-predict-offset-for-angle-and-mate-keep-part-position-and/m-p/6292603#M111080</link>
      <description>&lt;P&gt;Hi Adam,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;It is a good explication from the occurence in assembly and subassembly !&lt;/P&gt;&lt;P&gt;It is a different way to acces the position of a part, but it is only for the position of the origine of the occurence.&lt;/P&gt;&lt;P&gt;If I wanted to constraint an occurence completly I need also the angle between the assembly and the occurence.&lt;/P&gt;&lt;P&gt;With the vertex&amp;nbsp; X,Y and Z I can make a mate constraint between the workplane of "Assembly.iam" to the originpoint of the "SubAssembly:1".&amp;nbsp;&lt;/P&gt;&lt;P&gt;Now if I try to turn the "SubAssembly:1", nothing will block it because we didn't constraint it.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;It is why I am searching to constraint the angle of these parts. In my first topic I explain why.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you for your response,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Have a good day,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Jérémie&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;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 26 Apr 2016 07:12:45 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-forum/vba-predict-offset-for-angle-and-mate-keep-part-position-and/m-p/6292603#M111080</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2016-04-26T07:12:45Z</dc:date>
    </item>
    <item>
      <title>Betreff: VBA Predict Offset for Angle and Mate, keep part position and angle in</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-forum/vba-predict-offset-for-angle-and-mate-keep-part-position-and/m-p/6305494#M111081</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The calculation provided in the following blog post seems to give the same result as the &lt;STRONG&gt;iProperty&lt;/STRONG&gt; &amp;gt;&amp;gt; &lt;STRONG&gt;Occurrence&lt;/STRONG&gt; &amp;gt;&amp;gt; &lt;STRONG&gt;Angle&lt;/STRONG&gt; properties:&lt;/P&gt;
&lt;P&gt;&lt;A href="http://adndevblog.typepad.com/manufacturing/2013/01/inventor-eulerian-angles-of-assembly-component.html" target="_self"&gt;http://adndevblog.typepad.com/manufacturing/2013/01/inventor-eulerian-angles-of-assembly-component.html&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If you want to programmatically change the position of the components later on then instead of using constraints, you could ground them to keep them in place, and when changing the position just calculate the new &lt;STRONG&gt;Transformation&lt;/STRONG&gt; matrix, unground the component and move it to the new position, then ground it again.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Cheers,&lt;/P&gt;</description>
      <pubDate>Tue, 03 May 2016 12:16:34 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-forum/vba-predict-offset-for-angle-and-mate-keep-part-position-and/m-p/6305494#M111081</guid>
      <dc:creator>adam.nagy</dc:creator>
      <dc:date>2016-05-03T12:16:34Z</dc:date>
    </item>
  </channel>
</rss>

