<?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: unground, relocate/offset  reground in Inventor Programming - iLogic, Macros, AddIns &amp; Apprentice</title>
    <link>https://forums.autodesk.com/t5/inventor-programming-ilogic/unground-relocate-offset-reground/m-p/9557021#M111641</link>
    <description>&lt;P&gt;Sorry &lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/5708980"&gt;@Darkforce_the_ilogic_guy&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I read to fast... You want to move the occurrence from previous position. at first&amp;nbsp; I posted a code that just set a new position aswell. Thats why there's an empty post above...&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;This should do the trick!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;SPAN style="color: #ff0000;"&gt;Dim&lt;/SPAN&gt; &lt;SPAN style="color: #800000;"&gt;oAsm&lt;/SPAN&gt; &lt;SPAN style="color: #ff0000;"&gt;As&lt;/SPAN&gt; &lt;SPAN style="color: #800000;"&gt;AssemblyDocument&lt;/SPAN&gt; = &lt;SPAN style="color: #800080;"&gt;ThisDoc&lt;/SPAN&gt;.&lt;SPAN style="color: #800080;"&gt;Document&lt;/SPAN&gt;
&lt;SPAN style="color: #ff0000;"&gt;Dim&lt;/SPAN&gt; &lt;SPAN style="color: #800000;"&gt;oSelSet&lt;/SPAN&gt; &lt;SPAN style="color: #ff0000;"&gt;As&lt;/SPAN&gt; &lt;SPAN style="color: #800000;"&gt;SelectSet&lt;/SPAN&gt; = &lt;SPAN style="color: #800000;"&gt;oAsm&lt;/SPAN&gt;.&lt;SPAN style="color: #800000;"&gt;SelectSet&lt;/SPAN&gt;
&lt;SPAN style="color: #800000;"&gt;oSelSet&lt;/SPAN&gt;.&lt;SPAN style="color: #800000;"&gt;Clear&lt;/SPAN&gt;
&lt;SPAN style="color: #ff0000;"&gt;Dim&lt;/SPAN&gt; &lt;SPAN style="color: #800000;"&gt;oTG&lt;/SPAN&gt; &lt;SPAN style="color: #ff0000;"&gt;As&lt;/SPAN&gt; &lt;SPAN style="color: #800000;"&gt;TransientGeometry&lt;/SPAN&gt; = &lt;SPAN style="color: #800080;"&gt;ThisApplication&lt;/SPAN&gt;.&lt;SPAN style="color: #800000;"&gt;TransientGeometry&lt;/SPAN&gt;
&lt;SPAN style="color: #ff0000;"&gt;Dim&lt;/SPAN&gt; &lt;SPAN style="color: #800000;"&gt;oUM&lt;/SPAN&gt; &lt;SPAN style="color: #ff0000;"&gt;As&lt;/SPAN&gt; &lt;SPAN style="color: #800000;"&gt;UnitsOfMeasure&lt;/SPAN&gt; = &lt;SPAN style="color: #800080;"&gt;ThisDoc&lt;/SPAN&gt;.&lt;SPAN style="color: #800080;"&gt;Document&lt;/SPAN&gt;.&lt;SPAN style="color: #800000;"&gt;UnitsOfMeasure&lt;/SPAN&gt;
&lt;SPAN style="color: #ff0000;"&gt;For&lt;/SPAN&gt; &lt;SPAN style="color: #ff0000;"&gt;Each&lt;/SPAN&gt; &lt;SPAN style="color: #800000;"&gt;oComp&lt;/SPAN&gt; &lt;SPAN style="color: #ff0000;"&gt;As&lt;/SPAN&gt; &lt;SPAN style="color: #800000;"&gt;ComponentOccurrence&lt;/SPAN&gt; &lt;SPAN style="color: #ff0000;"&gt;In&lt;/SPAN&gt; &lt;SPAN style="color: #800000;"&gt;oAsm&lt;/SPAN&gt;.&lt;SPAN style="color: #800000;"&gt;ComponentDefinition&lt;/SPAN&gt;.&lt;SPAN style="color: #800000;"&gt;Occurrences&lt;/SPAN&gt;
	&lt;SPAN style="color: #800000;"&gt;oSelSet&lt;/SPAN&gt;.&lt;SPAN style="color: #800000;"&gt;Select&lt;/SPAN&gt;(&lt;SPAN style="color: #800000;"&gt;oComp&lt;/SPAN&gt;)
	&lt;SPAN style="color: #ff0000;"&gt;Dim&lt;/SPAN&gt; &lt;SPAN style="color: #800000;"&gt;xyz&lt;/SPAN&gt; &lt;SPAN style="color: #ff0000;"&gt;As&lt;/SPAN&gt; &lt;SPAN style="color: #ff0000;"&gt;String&lt;/SPAN&gt; = &lt;SPAN style="color: #800000;"&gt;InputBox&lt;/SPAN&gt;(&lt;SPAN style="color: #008080;"&gt;"Move component X,Y,Z"&lt;/SPAN&gt;, &lt;SPAN style="color: #008080;"&gt;"Move this component"&lt;/SPAN&gt;, &lt;SPAN style="color: #008080;"&gt;"0,0,0"&lt;/SPAN&gt;)
	&lt;SPAN style="color: #ff0000;"&gt;Dim&lt;/SPAN&gt; &lt;SPAN style="color: #800000;"&gt;oX&lt;/SPAN&gt; &lt;SPAN style="color: #ff0000;"&gt;As&lt;/SPAN&gt; &lt;SPAN style="color: #ff0000;"&gt;Double&lt;/SPAN&gt; = &lt;SPAN style="color: #800000;"&gt;oUM&lt;/SPAN&gt;.&lt;SPAN style="color: #800000;"&gt;ConvertUnits&lt;/SPAN&gt;(&lt;SPAN style="color: #ff0000;"&gt;CDbl&lt;/SPAN&gt;(&lt;SPAN style="color: #800000;"&gt;xyz&lt;/SPAN&gt;.&lt;SPAN style="color: #800000;"&gt;Split&lt;/SPAN&gt;(&lt;SPAN style="color: #008080;"&gt;","&lt;/SPAN&gt;)(0)), &lt;SPAN style="color: #800000;"&gt;oUM&lt;/SPAN&gt;.&lt;SPAN style="color: #800000;"&gt;LengthUnits&lt;/SPAN&gt;, &lt;SPAN style="color: #800000;"&gt;UnitsTypeEnum&lt;/SPAN&gt;.&lt;SPAN style="color: #800000;"&gt;kDatabaseLengthUnits&lt;/SPAN&gt;)
	&lt;SPAN style="color: #ff0000;"&gt;Dim&lt;/SPAN&gt; &lt;SPAN style="color: #800000;"&gt;oY&lt;/SPAN&gt; &lt;SPAN style="color: #ff0000;"&gt;As&lt;/SPAN&gt; &lt;SPAN style="color: #ff0000;"&gt;Double&lt;/SPAN&gt; = &lt;SPAN style="color: #800000;"&gt;oUM&lt;/SPAN&gt;.&lt;SPAN style="color: #800000;"&gt;ConvertUnits&lt;/SPAN&gt;(&lt;SPAN style="color: #ff0000;"&gt;CDbl&lt;/SPAN&gt;(&lt;SPAN style="color: #800000;"&gt;xyz&lt;/SPAN&gt;.&lt;SPAN style="color: #800000;"&gt;Split&lt;/SPAN&gt;(&lt;SPAN style="color: #008080;"&gt;","&lt;/SPAN&gt;)(1)), &lt;SPAN style="color: #800000;"&gt;oUM&lt;/SPAN&gt;.&lt;SPAN style="color: #800000;"&gt;LengthUnits&lt;/SPAN&gt;, &lt;SPAN style="color: #800000;"&gt;UnitsTypeEnum&lt;/SPAN&gt;.&lt;SPAN style="color: #800000;"&gt;kDatabaseLengthUnits&lt;/SPAN&gt;)
	&lt;SPAN style="color: #ff0000;"&gt;Dim&lt;/SPAN&gt; &lt;SPAN style="color: #800000;"&gt;oZ&lt;/SPAN&gt; &lt;SPAN style="color: #ff0000;"&gt;As&lt;/SPAN&gt; &lt;SPAN style="color: #ff0000;"&gt;Double&lt;/SPAN&gt; = &lt;SPAN style="color: #800000;"&gt;oUM&lt;/SPAN&gt;.&lt;SPAN style="color: #800000;"&gt;ConvertUnits&lt;/SPAN&gt;(&lt;SPAN style="color: #ff0000;"&gt;CDbl&lt;/SPAN&gt;(&lt;SPAN style="color: #800000;"&gt;xyz&lt;/SPAN&gt;.&lt;SPAN style="color: #800000;"&gt;Split&lt;/SPAN&gt;(&lt;SPAN style="color: #008080;"&gt;","&lt;/SPAN&gt;)(2)), &lt;SPAN style="color: #800000;"&gt;oUM&lt;/SPAN&gt;.&lt;SPAN style="color: #800000;"&gt;LengthUnits&lt;/SPAN&gt;, &lt;SPAN style="color: #800000;"&gt;UnitsTypeEnum&lt;/SPAN&gt;.&lt;SPAN style="color: #800000;"&gt;kDatabaseLengthUnits&lt;/SPAN&gt;)
	&lt;SPAN style="color: #ff0000;"&gt;If&lt;/SPAN&gt; &lt;SPAN style="color: #800000;"&gt;oX&lt;/SPAN&gt; + &lt;SPAN style="color: #800000;"&gt;oY&lt;/SPAN&gt; + &lt;SPAN style="color: #800000;"&gt;oZ&lt;/SPAN&gt; &amp;lt;&amp;gt; 0
		&lt;SPAN style="color: #ff0000;"&gt;Dim&lt;/SPAN&gt; &lt;SPAN style="color: #800000;"&gt;Grounded&lt;/SPAN&gt; &lt;SPAN style="color: #ff0000;"&gt;As&lt;/SPAN&gt; &lt;SPAN style="color: #ff0000;"&gt;Boolean&lt;/SPAN&gt; = &lt;SPAN style="color: #800000;"&gt;oComp&lt;/SPAN&gt;.&lt;SPAN style="color: #800000;"&gt;Grounded&lt;/SPAN&gt;
		&lt;SPAN style="color: #ff0000;"&gt;If&lt;/SPAN&gt; &lt;SPAN style="color: #800000;"&gt;Grounded&lt;/SPAN&gt; = &lt;SPAN style="color: #ff0000;"&gt;True&lt;/SPAN&gt; &lt;SPAN style="color: #ff0000;"&gt;Then&lt;/SPAN&gt; &lt;SPAN style="color: #800000;"&gt;oComp&lt;/SPAN&gt;.&lt;SPAN style="color: #800000;"&gt;Grounded&lt;/SPAN&gt; = &lt;SPAN style="color: #ff0000;"&gt;False&lt;/SPAN&gt;
		&lt;SPAN style="color: #ff0000;"&gt;Dim&lt;/SPAN&gt; &lt;SPAN style="color: #800000;"&gt;oVector&lt;/SPAN&gt; &lt;SPAN style="color: #ff0000;"&gt;As&lt;/SPAN&gt; &lt;SPAN style="color: #800000;"&gt;Vector&lt;/SPAN&gt; = &lt;SPAN style="color: #800000;"&gt;oTG&lt;/SPAN&gt;.&lt;SPAN style="color: #800000;"&gt;CreateVector&lt;/SPAN&gt;(&lt;SPAN style="color: #800000;"&gt;oX&lt;/SPAN&gt;, &lt;SPAN style="color: #800000;"&gt;oY&lt;/SPAN&gt;, &lt;SPAN style="color: #800000;"&gt;oZ&lt;/SPAN&gt;)
		&lt;SPAN style="color: #ff0000;"&gt;Dim&lt;/SPAN&gt; &lt;SPAN style="color: #800000;"&gt;oMatrix&lt;/SPAN&gt; &lt;SPAN style="color: #ff0000;"&gt;As&lt;/SPAN&gt; &lt;SPAN style="color: #800000;"&gt;Matrix&lt;/SPAN&gt; = &lt;SPAN style="color: #800000;"&gt;oComp&lt;/SPAN&gt;.&lt;SPAN style="color: #800000;"&gt;Transformation&lt;/SPAN&gt;.&lt;SPAN style="color: #800000;"&gt;Copy&lt;/SPAN&gt;
		&lt;SPAN style="color: #800000;"&gt;oVector&lt;/SPAN&gt;.&lt;SPAN style="color: #800000;"&gt;AddVector&lt;/SPAN&gt;(&lt;SPAN style="color: #800000;"&gt;oMatrix&lt;/SPAN&gt;.&lt;SPAN style="color: #800000;"&gt;Translation&lt;/SPAN&gt;)
		&lt;SPAN style="color: #800000;"&gt;oMatrix&lt;/SPAN&gt;.&lt;SPAN style="color: #800000;"&gt;SetTranslation&lt;/SPAN&gt;(&lt;SPAN style="color: #800000;"&gt;oVector&lt;/SPAN&gt;, &lt;SPAN style="color: #ff0000;"&gt;False&lt;/SPAN&gt;)
		&lt;SPAN style="color: #800000;"&gt;oComp&lt;/SPAN&gt;.&lt;SPAN style="color: #800000;"&gt;Transformation&lt;/SPAN&gt; = &lt;SPAN style="color: #800000;"&gt;oMatrix&lt;/SPAN&gt;
		&lt;SPAN style="color: #800000;"&gt;oComp&lt;/SPAN&gt;.&lt;SPAN style="color: #800000;"&gt;Grounded&lt;/SPAN&gt; = &lt;SPAN style="color: #800000;"&gt;Grounded&lt;/SPAN&gt;
	&lt;SPAN style="color: #ff0000;"&gt;End&lt;/SPAN&gt; &lt;SPAN style="color: #ff0000;"&gt;If&lt;/SPAN&gt;
	&lt;SPAN style="color: #800000;"&gt;oSelSet&lt;/SPAN&gt;.&lt;SPAN style="color: #800000;"&gt;Clear&lt;/SPAN&gt;
	&lt;SPAN style="color: #800080;"&gt;InventorVb&lt;/SPAN&gt;.&lt;SPAN style="color: #800080;"&gt;DocumentUpdate&lt;/SPAN&gt;()
&lt;SPAN style="color: #ff0000;"&gt;Next&lt;/SPAN&gt;
&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Wed, 03 Jun 2020 09:08:32 GMT</pubDate>
    <dc:creator>JhoelForshav</dc:creator>
    <dc:date>2020-06-03T09:08:32Z</dc:date>
    <item>
      <title>unground, relocate/offset  reground</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-ilogic/unground-relocate-offset-reground/m-p/9556951#M111634</link>
      <description>&lt;P&gt;it is possible to make an ilogic code that..&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;1. ask how you want it to move(X,Y,Z)&lt;/P&gt;&lt;P&gt;2.&amp;nbsp;check if the componemt is ground&lt;/P&gt;&lt;P&gt;3 remove ground&lt;/P&gt;&lt;P&gt;4. move componemt&amp;nbsp;&lt;/P&gt;&lt;P&gt;5. reground if componemt was grounded&amp;nbsp;&lt;/P&gt;&lt;P&gt;6. do 2-5 on all componemt&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I found this code but it only move one at the time and it does not offset location but set an location. and ground no matter want .. and it use select ... witch is offen very slow . I want to do it withont select an to all componemt on firstlevel. can anyone help with this&amp;nbsp; in ilogic&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;SPAN&gt;'check for selection&lt;/SPAN&gt;
&lt;SPAN&gt;Dim&lt;/SPAN&gt; &lt;SPAN&gt;compOcc&lt;/SPAN&gt; &lt;SPAN&gt;As&lt;/SPAN&gt; &lt;SPAN&gt;ComponentOccurrence&lt;/SPAN&gt;
&lt;SPAN&gt;Try&lt;/SPAN&gt;
  &lt;SPAN&gt;compOcc&lt;/SPAN&gt; = &lt;SPAN&gt;ThisDoc&lt;/SPAN&gt;.&lt;SPAN&gt;Document&lt;/SPAN&gt;.&lt;SPAN&gt;SelectSet&lt;/SPAN&gt;.&lt;SPAN&gt;Item&lt;/SPAN&gt;(1)
&lt;SPAN&gt;Catch&lt;/SPAN&gt;
  &lt;SPAN&gt;MessageBox&lt;/SPAN&gt;.&lt;SPAN&gt;Show&lt;/SPAN&gt;(&lt;SPAN&gt;"Please select a component before running this rule."&lt;/SPAN&gt;, &lt;SPAN&gt;"iLogic"&lt;/SPAN&gt;)
  &lt;SPAN&gt;Return&lt;/SPAN&gt;
&lt;SPAN&gt;End&lt;/SPAN&gt; &lt;SPAN&gt;Try&lt;/SPAN&gt;

&lt;SPAN&gt;' remove constraints for the selected component&lt;/SPAN&gt;
&lt;SPAN&gt;Dim&lt;/SPAN&gt; &lt;SPAN&gt;oConstraint&lt;/SPAN&gt; &lt;SPAN&gt;As&lt;/SPAN&gt; &lt;SPAN&gt;AssemblyConstraint&lt;/SPAN&gt; 
&lt;SPAN&gt;For&lt;/SPAN&gt; &lt;SPAN&gt;Each&lt;/SPAN&gt; &lt;SPAN&gt;oConstraint&lt;/SPAN&gt; &lt;SPAN&gt;In&lt;/SPAN&gt; &lt;SPAN&gt;compOcc&lt;/SPAN&gt;.&lt;SPAN&gt;Constraints&lt;/SPAN&gt; 
&lt;SPAN&gt;oConstraint&lt;/SPAN&gt;.&lt;SPAN&gt;Delete&lt;/SPAN&gt;
&lt;SPAN&gt;Next&lt;/SPAN&gt;

&lt;SPAN&gt;Dim&lt;/SPAN&gt; &lt;SPAN&gt;uom&lt;/SPAN&gt; &lt;SPAN&gt;As&lt;/SPAN&gt; &lt;SPAN&gt;UnitsOfMeasure&lt;/SPAN&gt; = &lt;SPAN&gt;ThisDoc&lt;/SPAN&gt;.&lt;SPAN&gt;Document&lt;/SPAN&gt;.&lt;SPAN&gt;UnitsOfMeasure&lt;/SPAN&gt;
&lt;SPAN&gt;Dim&lt;/SPAN&gt; &lt;SPAN&gt;convFactor&lt;/SPAN&gt; &lt;SPAN&gt;As&lt;/SPAN&gt; &lt;SPAN&gt;Double&lt;/SPAN&gt; = &lt;SPAN&gt;uom&lt;/SPAN&gt;.&lt;SPAN&gt;ConvertUnits&lt;/SPAN&gt;(1.0, &lt;SPAN&gt;uom&lt;/SPAN&gt;.&lt;SPAN&gt;LengthUnits&lt;/SPAN&gt;, &lt;SPAN&gt;UnitsTypeEnum&lt;/SPAN&gt;.&lt;SPAN&gt;kDatabaseLengthUnits&lt;/SPAN&gt;)

&lt;SPAN&gt;' Get the current transformation matrix from the occurrence.&lt;/SPAN&gt;
&lt;SPAN&gt;Dim&lt;/SPAN&gt; &lt;SPAN&gt;oTransform&lt;/SPAN&gt; &lt;SPAN&gt;As&lt;/SPAN&gt; &lt;SPAN&gt;Matrix&lt;/SPAN&gt; = &lt;SPAN&gt;compOcc&lt;/SPAN&gt;.&lt;SPAN&gt;Transformation&lt;/SPAN&gt;

&lt;SPAN&gt;X&lt;/SPAN&gt; = &lt;SPAN&gt;InputBox&lt;/SPAN&gt;(&lt;SPAN&gt;"Enter X"&lt;/SPAN&gt;, &lt;SPAN&gt;"Title"&lt;/SPAN&gt;, &lt;SPAN&gt;""&lt;/SPAN&gt;)
&lt;SPAN&gt;Y&lt;/SPAN&gt; = &lt;SPAN&gt;InputBox&lt;/SPAN&gt;(&lt;SPAN&gt;"Enter Y"&lt;/SPAN&gt;, &lt;SPAN&gt;"Title"&lt;/SPAN&gt;, &lt;SPAN&gt;""&lt;/SPAN&gt;)
&lt;SPAN&gt;Z&lt;/SPAN&gt; = &lt;SPAN&gt;InputBox&lt;/SPAN&gt;(&lt;SPAN&gt;"Enter Z"&lt;/SPAN&gt;, &lt;SPAN&gt;"Title"&lt;/SPAN&gt;, &lt;SPAN&gt;""&lt;/SPAN&gt;)

&lt;SPAN&gt;' Move the occurrence ignoring any constraints.&lt;/SPAN&gt;
&lt;SPAN&gt;oTransform&lt;/SPAN&gt;.&lt;SPAN&gt;SetTranslation&lt;/SPAN&gt;(&lt;SPAN&gt;ThisApplication&lt;/SPAN&gt;.&lt;SPAN&gt;TransientGeometry&lt;/SPAN&gt;.&lt;SPAN&gt;CreateVector&lt;/SPAN&gt;(&lt;SPAN&gt;X&lt;/SPAN&gt;*&lt;SPAN&gt;convFactor&lt;/SPAN&gt;, &lt;SPAN&gt;Y&lt;/SPAN&gt;*&lt;SPAN&gt;convFactor&lt;/SPAN&gt;, &lt;SPAN&gt;Z&lt;/SPAN&gt;*&lt;SPAN&gt;convFactor&lt;/SPAN&gt;))
&lt;SPAN&gt;compOcc&lt;/SPAN&gt;.&lt;SPAN&gt;SetTransformWithoutConstraints&lt;/SPAN&gt;(&lt;SPAN&gt;oTransform&lt;/SPAN&gt;)

&lt;SPAN&gt;' ground the component&lt;/SPAN&gt;
&lt;SPAN&gt;compOcc&lt;/SPAN&gt;.&lt;SPAN&gt;Grounded&lt;/SPAN&gt; = &lt;SPAN&gt;True&lt;/SPAN&gt;&lt;/PRE&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>Wed, 03 Jun 2020 08:28:22 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-ilogic/unground-relocate-offset-reground/m-p/9556951#M111634</guid>
      <dc:creator>Darkforce_the_ilogic_guy</dc:creator>
      <dc:date>2020-06-03T08:28:22Z</dc:date>
    </item>
    <item>
      <title>Re: unground, relocate/offset  reground</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-ilogic/unground-relocate-offset-reground/m-p/9556979#M111637</link>
      <description>&lt;P&gt;.&lt;/P&gt;</description>
      <pubDate>Wed, 03 Jun 2020 09:07:18 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-ilogic/unground-relocate-offset-reground/m-p/9556979#M111637</guid>
      <dc:creator>JhoelForshav</dc:creator>
      <dc:date>2020-06-03T09:07:18Z</dc:date>
    </item>
    <item>
      <title>Re: unground, relocate/offset  reground</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-ilogic/unground-relocate-offset-reground/m-p/9557021#M111641</link>
      <description>&lt;P&gt;Sorry &lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/5708980"&gt;@Darkforce_the_ilogic_guy&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I read to fast... You want to move the occurrence from previous position. at first&amp;nbsp; I posted a code that just set a new position aswell. Thats why there's an empty post above...&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;This should do the trick!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;SPAN style="color: #ff0000;"&gt;Dim&lt;/SPAN&gt; &lt;SPAN style="color: #800000;"&gt;oAsm&lt;/SPAN&gt; &lt;SPAN style="color: #ff0000;"&gt;As&lt;/SPAN&gt; &lt;SPAN style="color: #800000;"&gt;AssemblyDocument&lt;/SPAN&gt; = &lt;SPAN style="color: #800080;"&gt;ThisDoc&lt;/SPAN&gt;.&lt;SPAN style="color: #800080;"&gt;Document&lt;/SPAN&gt;
&lt;SPAN style="color: #ff0000;"&gt;Dim&lt;/SPAN&gt; &lt;SPAN style="color: #800000;"&gt;oSelSet&lt;/SPAN&gt; &lt;SPAN style="color: #ff0000;"&gt;As&lt;/SPAN&gt; &lt;SPAN style="color: #800000;"&gt;SelectSet&lt;/SPAN&gt; = &lt;SPAN style="color: #800000;"&gt;oAsm&lt;/SPAN&gt;.&lt;SPAN style="color: #800000;"&gt;SelectSet&lt;/SPAN&gt;
&lt;SPAN style="color: #800000;"&gt;oSelSet&lt;/SPAN&gt;.&lt;SPAN style="color: #800000;"&gt;Clear&lt;/SPAN&gt;
&lt;SPAN style="color: #ff0000;"&gt;Dim&lt;/SPAN&gt; &lt;SPAN style="color: #800000;"&gt;oTG&lt;/SPAN&gt; &lt;SPAN style="color: #ff0000;"&gt;As&lt;/SPAN&gt; &lt;SPAN style="color: #800000;"&gt;TransientGeometry&lt;/SPAN&gt; = &lt;SPAN style="color: #800080;"&gt;ThisApplication&lt;/SPAN&gt;.&lt;SPAN style="color: #800000;"&gt;TransientGeometry&lt;/SPAN&gt;
&lt;SPAN style="color: #ff0000;"&gt;Dim&lt;/SPAN&gt; &lt;SPAN style="color: #800000;"&gt;oUM&lt;/SPAN&gt; &lt;SPAN style="color: #ff0000;"&gt;As&lt;/SPAN&gt; &lt;SPAN style="color: #800000;"&gt;UnitsOfMeasure&lt;/SPAN&gt; = &lt;SPAN style="color: #800080;"&gt;ThisDoc&lt;/SPAN&gt;.&lt;SPAN style="color: #800080;"&gt;Document&lt;/SPAN&gt;.&lt;SPAN style="color: #800000;"&gt;UnitsOfMeasure&lt;/SPAN&gt;
&lt;SPAN style="color: #ff0000;"&gt;For&lt;/SPAN&gt; &lt;SPAN style="color: #ff0000;"&gt;Each&lt;/SPAN&gt; &lt;SPAN style="color: #800000;"&gt;oComp&lt;/SPAN&gt; &lt;SPAN style="color: #ff0000;"&gt;As&lt;/SPAN&gt; &lt;SPAN style="color: #800000;"&gt;ComponentOccurrence&lt;/SPAN&gt; &lt;SPAN style="color: #ff0000;"&gt;In&lt;/SPAN&gt; &lt;SPAN style="color: #800000;"&gt;oAsm&lt;/SPAN&gt;.&lt;SPAN style="color: #800000;"&gt;ComponentDefinition&lt;/SPAN&gt;.&lt;SPAN style="color: #800000;"&gt;Occurrences&lt;/SPAN&gt;
	&lt;SPAN style="color: #800000;"&gt;oSelSet&lt;/SPAN&gt;.&lt;SPAN style="color: #800000;"&gt;Select&lt;/SPAN&gt;(&lt;SPAN style="color: #800000;"&gt;oComp&lt;/SPAN&gt;)
	&lt;SPAN style="color: #ff0000;"&gt;Dim&lt;/SPAN&gt; &lt;SPAN style="color: #800000;"&gt;xyz&lt;/SPAN&gt; &lt;SPAN style="color: #ff0000;"&gt;As&lt;/SPAN&gt; &lt;SPAN style="color: #ff0000;"&gt;String&lt;/SPAN&gt; = &lt;SPAN style="color: #800000;"&gt;InputBox&lt;/SPAN&gt;(&lt;SPAN style="color: #008080;"&gt;"Move component X,Y,Z"&lt;/SPAN&gt;, &lt;SPAN style="color: #008080;"&gt;"Move this component"&lt;/SPAN&gt;, &lt;SPAN style="color: #008080;"&gt;"0,0,0"&lt;/SPAN&gt;)
	&lt;SPAN style="color: #ff0000;"&gt;Dim&lt;/SPAN&gt; &lt;SPAN style="color: #800000;"&gt;oX&lt;/SPAN&gt; &lt;SPAN style="color: #ff0000;"&gt;As&lt;/SPAN&gt; &lt;SPAN style="color: #ff0000;"&gt;Double&lt;/SPAN&gt; = &lt;SPAN style="color: #800000;"&gt;oUM&lt;/SPAN&gt;.&lt;SPAN style="color: #800000;"&gt;ConvertUnits&lt;/SPAN&gt;(&lt;SPAN style="color: #ff0000;"&gt;CDbl&lt;/SPAN&gt;(&lt;SPAN style="color: #800000;"&gt;xyz&lt;/SPAN&gt;.&lt;SPAN style="color: #800000;"&gt;Split&lt;/SPAN&gt;(&lt;SPAN style="color: #008080;"&gt;","&lt;/SPAN&gt;)(0)), &lt;SPAN style="color: #800000;"&gt;oUM&lt;/SPAN&gt;.&lt;SPAN style="color: #800000;"&gt;LengthUnits&lt;/SPAN&gt;, &lt;SPAN style="color: #800000;"&gt;UnitsTypeEnum&lt;/SPAN&gt;.&lt;SPAN style="color: #800000;"&gt;kDatabaseLengthUnits&lt;/SPAN&gt;)
	&lt;SPAN style="color: #ff0000;"&gt;Dim&lt;/SPAN&gt; &lt;SPAN style="color: #800000;"&gt;oY&lt;/SPAN&gt; &lt;SPAN style="color: #ff0000;"&gt;As&lt;/SPAN&gt; &lt;SPAN style="color: #ff0000;"&gt;Double&lt;/SPAN&gt; = &lt;SPAN style="color: #800000;"&gt;oUM&lt;/SPAN&gt;.&lt;SPAN style="color: #800000;"&gt;ConvertUnits&lt;/SPAN&gt;(&lt;SPAN style="color: #ff0000;"&gt;CDbl&lt;/SPAN&gt;(&lt;SPAN style="color: #800000;"&gt;xyz&lt;/SPAN&gt;.&lt;SPAN style="color: #800000;"&gt;Split&lt;/SPAN&gt;(&lt;SPAN style="color: #008080;"&gt;","&lt;/SPAN&gt;)(1)), &lt;SPAN style="color: #800000;"&gt;oUM&lt;/SPAN&gt;.&lt;SPAN style="color: #800000;"&gt;LengthUnits&lt;/SPAN&gt;, &lt;SPAN style="color: #800000;"&gt;UnitsTypeEnum&lt;/SPAN&gt;.&lt;SPAN style="color: #800000;"&gt;kDatabaseLengthUnits&lt;/SPAN&gt;)
	&lt;SPAN style="color: #ff0000;"&gt;Dim&lt;/SPAN&gt; &lt;SPAN style="color: #800000;"&gt;oZ&lt;/SPAN&gt; &lt;SPAN style="color: #ff0000;"&gt;As&lt;/SPAN&gt; &lt;SPAN style="color: #ff0000;"&gt;Double&lt;/SPAN&gt; = &lt;SPAN style="color: #800000;"&gt;oUM&lt;/SPAN&gt;.&lt;SPAN style="color: #800000;"&gt;ConvertUnits&lt;/SPAN&gt;(&lt;SPAN style="color: #ff0000;"&gt;CDbl&lt;/SPAN&gt;(&lt;SPAN style="color: #800000;"&gt;xyz&lt;/SPAN&gt;.&lt;SPAN style="color: #800000;"&gt;Split&lt;/SPAN&gt;(&lt;SPAN style="color: #008080;"&gt;","&lt;/SPAN&gt;)(2)), &lt;SPAN style="color: #800000;"&gt;oUM&lt;/SPAN&gt;.&lt;SPAN style="color: #800000;"&gt;LengthUnits&lt;/SPAN&gt;, &lt;SPAN style="color: #800000;"&gt;UnitsTypeEnum&lt;/SPAN&gt;.&lt;SPAN style="color: #800000;"&gt;kDatabaseLengthUnits&lt;/SPAN&gt;)
	&lt;SPAN style="color: #ff0000;"&gt;If&lt;/SPAN&gt; &lt;SPAN style="color: #800000;"&gt;oX&lt;/SPAN&gt; + &lt;SPAN style="color: #800000;"&gt;oY&lt;/SPAN&gt; + &lt;SPAN style="color: #800000;"&gt;oZ&lt;/SPAN&gt; &amp;lt;&amp;gt; 0
		&lt;SPAN style="color: #ff0000;"&gt;Dim&lt;/SPAN&gt; &lt;SPAN style="color: #800000;"&gt;Grounded&lt;/SPAN&gt; &lt;SPAN style="color: #ff0000;"&gt;As&lt;/SPAN&gt; &lt;SPAN style="color: #ff0000;"&gt;Boolean&lt;/SPAN&gt; = &lt;SPAN style="color: #800000;"&gt;oComp&lt;/SPAN&gt;.&lt;SPAN style="color: #800000;"&gt;Grounded&lt;/SPAN&gt;
		&lt;SPAN style="color: #ff0000;"&gt;If&lt;/SPAN&gt; &lt;SPAN style="color: #800000;"&gt;Grounded&lt;/SPAN&gt; = &lt;SPAN style="color: #ff0000;"&gt;True&lt;/SPAN&gt; &lt;SPAN style="color: #ff0000;"&gt;Then&lt;/SPAN&gt; &lt;SPAN style="color: #800000;"&gt;oComp&lt;/SPAN&gt;.&lt;SPAN style="color: #800000;"&gt;Grounded&lt;/SPAN&gt; = &lt;SPAN style="color: #ff0000;"&gt;False&lt;/SPAN&gt;
		&lt;SPAN style="color: #ff0000;"&gt;Dim&lt;/SPAN&gt; &lt;SPAN style="color: #800000;"&gt;oVector&lt;/SPAN&gt; &lt;SPAN style="color: #ff0000;"&gt;As&lt;/SPAN&gt; &lt;SPAN style="color: #800000;"&gt;Vector&lt;/SPAN&gt; = &lt;SPAN style="color: #800000;"&gt;oTG&lt;/SPAN&gt;.&lt;SPAN style="color: #800000;"&gt;CreateVector&lt;/SPAN&gt;(&lt;SPAN style="color: #800000;"&gt;oX&lt;/SPAN&gt;, &lt;SPAN style="color: #800000;"&gt;oY&lt;/SPAN&gt;, &lt;SPAN style="color: #800000;"&gt;oZ&lt;/SPAN&gt;)
		&lt;SPAN style="color: #ff0000;"&gt;Dim&lt;/SPAN&gt; &lt;SPAN style="color: #800000;"&gt;oMatrix&lt;/SPAN&gt; &lt;SPAN style="color: #ff0000;"&gt;As&lt;/SPAN&gt; &lt;SPAN style="color: #800000;"&gt;Matrix&lt;/SPAN&gt; = &lt;SPAN style="color: #800000;"&gt;oComp&lt;/SPAN&gt;.&lt;SPAN style="color: #800000;"&gt;Transformation&lt;/SPAN&gt;.&lt;SPAN style="color: #800000;"&gt;Copy&lt;/SPAN&gt;
		&lt;SPAN style="color: #800000;"&gt;oVector&lt;/SPAN&gt;.&lt;SPAN style="color: #800000;"&gt;AddVector&lt;/SPAN&gt;(&lt;SPAN style="color: #800000;"&gt;oMatrix&lt;/SPAN&gt;.&lt;SPAN style="color: #800000;"&gt;Translation&lt;/SPAN&gt;)
		&lt;SPAN style="color: #800000;"&gt;oMatrix&lt;/SPAN&gt;.&lt;SPAN style="color: #800000;"&gt;SetTranslation&lt;/SPAN&gt;(&lt;SPAN style="color: #800000;"&gt;oVector&lt;/SPAN&gt;, &lt;SPAN style="color: #ff0000;"&gt;False&lt;/SPAN&gt;)
		&lt;SPAN style="color: #800000;"&gt;oComp&lt;/SPAN&gt;.&lt;SPAN style="color: #800000;"&gt;Transformation&lt;/SPAN&gt; = &lt;SPAN style="color: #800000;"&gt;oMatrix&lt;/SPAN&gt;
		&lt;SPAN style="color: #800000;"&gt;oComp&lt;/SPAN&gt;.&lt;SPAN style="color: #800000;"&gt;Grounded&lt;/SPAN&gt; = &lt;SPAN style="color: #800000;"&gt;Grounded&lt;/SPAN&gt;
	&lt;SPAN style="color: #ff0000;"&gt;End&lt;/SPAN&gt; &lt;SPAN style="color: #ff0000;"&gt;If&lt;/SPAN&gt;
	&lt;SPAN style="color: #800000;"&gt;oSelSet&lt;/SPAN&gt;.&lt;SPAN style="color: #800000;"&gt;Clear&lt;/SPAN&gt;
	&lt;SPAN style="color: #800080;"&gt;InventorVb&lt;/SPAN&gt;.&lt;SPAN style="color: #800080;"&gt;DocumentUpdate&lt;/SPAN&gt;()
&lt;SPAN style="color: #ff0000;"&gt;Next&lt;/SPAN&gt;
&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 03 Jun 2020 09:08:32 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-ilogic/unground-relocate-offset-reground/m-p/9557021#M111641</guid>
      <dc:creator>JhoelForshav</dc:creator>
      <dc:date>2020-06-03T09:08:32Z</dc:date>
    </item>
    <item>
      <title>Re: unground, relocate/offset  reground</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-ilogic/unground-relocate-offset-reground/m-p/9557034#M111642</link>
      <description>&lt;P&gt;And I see now that you only wanted to input X,Y,Z once. Not for each occurrence.&lt;/P&gt;&lt;P&gt;Final code&lt;img class="lia-deferred-image lia-image-emoji" src="https://forums.autodesk.com/html/@E4FC4123B14C63548B578BA62ED52CA9/emoticons/1f606.png" alt=":grinning_squinting_face:" title=":grinning_squinting_face:" /&gt;&lt;/P&gt;&lt;PRE&gt;&lt;SPAN style="color: #ff0000;"&gt;Dim&lt;/SPAN&gt; &lt;SPAN style="color: #800000;"&gt;oAsm&lt;/SPAN&gt; &lt;SPAN style="color: #ff0000;"&gt;As&lt;/SPAN&gt; &lt;SPAN style="color: #800000;"&gt;AssemblyDocument&lt;/SPAN&gt; = &lt;SPAN style="color: #800080;"&gt;ThisDoc&lt;/SPAN&gt;.&lt;SPAN style="color: #800080;"&gt;Document&lt;/SPAN&gt;
&lt;SPAN style="color: #ff0000;"&gt;Dim&lt;/SPAN&gt; &lt;SPAN style="color: #800000;"&gt;oTG&lt;/SPAN&gt; &lt;SPAN style="color: #ff0000;"&gt;As&lt;/SPAN&gt; &lt;SPAN style="color: #800000;"&gt;TransientGeometry&lt;/SPAN&gt; = &lt;SPAN style="color: #800080;"&gt;ThisApplication&lt;/SPAN&gt;.&lt;SPAN style="color: #800000;"&gt;TransientGeometry&lt;/SPAN&gt;
&lt;SPAN style="color: #ff0000;"&gt;Dim&lt;/SPAN&gt; &lt;SPAN style="color: #800000;"&gt;oUM&lt;/SPAN&gt; &lt;SPAN style="color: #ff0000;"&gt;As&lt;/SPAN&gt; &lt;SPAN style="color: #800000;"&gt;UnitsOfMeasure&lt;/SPAN&gt; = &lt;SPAN style="color: #800080;"&gt;ThisDoc&lt;/SPAN&gt;.&lt;SPAN style="color: #800080;"&gt;Document&lt;/SPAN&gt;.&lt;SPAN style="color: #800000;"&gt;UnitsOfMeasure&lt;/SPAN&gt;
&lt;SPAN style="color: #ff0000;"&gt;Dim&lt;/SPAN&gt; &lt;SPAN style="color: #800000;"&gt;xyz&lt;/SPAN&gt; &lt;SPAN style="color: #ff0000;"&gt;As&lt;/SPAN&gt; &lt;SPAN style="color: #ff0000;"&gt;String&lt;/SPAN&gt; = &lt;SPAN style="color: #800000;"&gt;InputBox&lt;/SPAN&gt;(&lt;SPAN style="color: #008080;"&gt;"Move component X,Y,Z"&lt;/SPAN&gt;, &lt;SPAN style="color: #008080;"&gt;"Move this component"&lt;/SPAN&gt;, &lt;SPAN style="color: #008080;"&gt;"0,0,0"&lt;/SPAN&gt;)
&lt;SPAN style="color: #ff0000;"&gt;Dim&lt;/SPAN&gt; &lt;SPAN style="color: #800000;"&gt;oX&lt;/SPAN&gt; &lt;SPAN style="color: #ff0000;"&gt;As&lt;/SPAN&gt; &lt;SPAN style="color: #ff0000;"&gt;Double&lt;/SPAN&gt; = &lt;SPAN style="color: #800000;"&gt;oUM&lt;/SPAN&gt;.&lt;SPAN style="color: #800000;"&gt;ConvertUnits&lt;/SPAN&gt;(&lt;SPAN style="color: #ff0000;"&gt;CDbl&lt;/SPAN&gt;(&lt;SPAN style="color: #800000;"&gt;xyz&lt;/SPAN&gt;.&lt;SPAN style="color: #800000;"&gt;Split&lt;/SPAN&gt;(&lt;SPAN style="color: #008080;"&gt;","&lt;/SPAN&gt;)(0)), &lt;SPAN style="color: #800000;"&gt;oUM&lt;/SPAN&gt;.&lt;SPAN style="color: #800000;"&gt;LengthUnits&lt;/SPAN&gt;, &lt;SPAN style="color: #800000;"&gt;UnitsTypeEnum&lt;/SPAN&gt;.&lt;SPAN style="color: #800000;"&gt;kDatabaseLengthUnits&lt;/SPAN&gt;)
&lt;SPAN style="color: #ff0000;"&gt;Dim&lt;/SPAN&gt; &lt;SPAN style="color: #800000;"&gt;oY&lt;/SPAN&gt; &lt;SPAN style="color: #ff0000;"&gt;As&lt;/SPAN&gt; &lt;SPAN style="color: #ff0000;"&gt;Double&lt;/SPAN&gt; = &lt;SPAN style="color: #800000;"&gt;oUM&lt;/SPAN&gt;.&lt;SPAN style="color: #800000;"&gt;ConvertUnits&lt;/SPAN&gt;(&lt;SPAN style="color: #ff0000;"&gt;CDbl&lt;/SPAN&gt;(&lt;SPAN style="color: #800000;"&gt;xyz&lt;/SPAN&gt;.&lt;SPAN style="color: #800000;"&gt;Split&lt;/SPAN&gt;(&lt;SPAN style="color: #008080;"&gt;","&lt;/SPAN&gt;)(1)), &lt;SPAN style="color: #800000;"&gt;oUM&lt;/SPAN&gt;.&lt;SPAN style="color: #800000;"&gt;LengthUnits&lt;/SPAN&gt;, &lt;SPAN style="color: #800000;"&gt;UnitsTypeEnum&lt;/SPAN&gt;.&lt;SPAN style="color: #800000;"&gt;kDatabaseLengthUnits&lt;/SPAN&gt;)
&lt;SPAN style="color: #ff0000;"&gt;Dim&lt;/SPAN&gt; &lt;SPAN style="color: #800000;"&gt;oZ&lt;/SPAN&gt; &lt;SPAN style="color: #ff0000;"&gt;As&lt;/SPAN&gt; &lt;SPAN style="color: #ff0000;"&gt;Double&lt;/SPAN&gt; = &lt;SPAN style="color: #800000;"&gt;oUM&lt;/SPAN&gt;.&lt;SPAN style="color: #800000;"&gt;ConvertUnits&lt;/SPAN&gt;(&lt;SPAN style="color: #ff0000;"&gt;CDbl&lt;/SPAN&gt;(&lt;SPAN style="color: #800000;"&gt;xyz&lt;/SPAN&gt;.&lt;SPAN style="color: #800000;"&gt;Split&lt;/SPAN&gt;(&lt;SPAN style="color: #008080;"&gt;","&lt;/SPAN&gt;)(2)), &lt;SPAN style="color: #800000;"&gt;oUM&lt;/SPAN&gt;.&lt;SPAN style="color: #800000;"&gt;LengthUnits&lt;/SPAN&gt;, &lt;SPAN style="color: #800000;"&gt;UnitsTypeEnum&lt;/SPAN&gt;.&lt;SPAN style="color: #800000;"&gt;kDatabaseLengthUnits&lt;/SPAN&gt;)
&lt;SPAN style="color: #ff0000;"&gt;If&lt;/SPAN&gt; &lt;SPAN style="color: #800000;"&gt;oX&lt;/SPAN&gt; + &lt;SPAN style="color: #800000;"&gt;oY&lt;/SPAN&gt; + &lt;SPAN style="color: #800000;"&gt;oZ&lt;/SPAN&gt; &amp;lt;&amp;gt; 0
	&lt;SPAN style="color: #ff0000;"&gt;For&lt;/SPAN&gt; &lt;SPAN style="color: #ff0000;"&gt;Each&lt;/SPAN&gt; &lt;SPAN style="color: #800000;"&gt;oComp&lt;/SPAN&gt; &lt;SPAN style="color: #ff0000;"&gt;As&lt;/SPAN&gt; &lt;SPAN style="color: #800000;"&gt;ComponentOccurrence&lt;/SPAN&gt; &lt;SPAN style="color: #ff0000;"&gt;In&lt;/SPAN&gt; &lt;SPAN style="color: #800000;"&gt;oAsm&lt;/SPAN&gt;.&lt;SPAN style="color: #800000;"&gt;ComponentDefinition&lt;/SPAN&gt;.&lt;SPAN style="color: #800000;"&gt;Occurrences&lt;/SPAN&gt;
		&lt;SPAN style="color: #ff0000;"&gt;Dim&lt;/SPAN&gt; &lt;SPAN style="color: #800000;"&gt;Grounded&lt;/SPAN&gt; &lt;SPAN style="color: #ff0000;"&gt;As&lt;/SPAN&gt; &lt;SPAN style="color: #ff0000;"&gt;Boolean&lt;/SPAN&gt; = &lt;SPAN style="color: #800000;"&gt;oComp&lt;/SPAN&gt;.&lt;SPAN style="color: #800000;"&gt;Grounded&lt;/SPAN&gt;
		&lt;SPAN style="color: #ff0000;"&gt;If&lt;/SPAN&gt; &lt;SPAN style="color: #800000;"&gt;Grounded&lt;/SPAN&gt; = &lt;SPAN style="color: #ff0000;"&gt;True&lt;/SPAN&gt; &lt;SPAN style="color: #ff0000;"&gt;Then&lt;/SPAN&gt; &lt;SPAN style="color: #800000;"&gt;oComp&lt;/SPAN&gt;.&lt;SPAN style="color: #800000;"&gt;Grounded&lt;/SPAN&gt; = &lt;SPAN style="color: #ff0000;"&gt;False&lt;/SPAN&gt;
		&lt;SPAN style="color: #ff0000;"&gt;Dim&lt;/SPAN&gt; &lt;SPAN style="color: #800000;"&gt;oVector&lt;/SPAN&gt; &lt;SPAN style="color: #ff0000;"&gt;As&lt;/SPAN&gt; &lt;SPAN style="color: #800000;"&gt;Vector&lt;/SPAN&gt; = &lt;SPAN style="color: #800000;"&gt;oTG&lt;/SPAN&gt;.&lt;SPAN style="color: #800000;"&gt;CreateVector&lt;/SPAN&gt;(&lt;SPAN style="color: #800000;"&gt;oX&lt;/SPAN&gt;, &lt;SPAN style="color: #800000;"&gt;oY&lt;/SPAN&gt;, &lt;SPAN style="color: #800000;"&gt;oZ&lt;/SPAN&gt;)
		&lt;SPAN style="color: #ff0000;"&gt;Dim&lt;/SPAN&gt; &lt;SPAN style="color: #800000;"&gt;oMatrix&lt;/SPAN&gt; &lt;SPAN style="color: #ff0000;"&gt;As&lt;/SPAN&gt; &lt;SPAN style="color: #800000;"&gt;Matrix&lt;/SPAN&gt; = &lt;SPAN style="color: #800000;"&gt;oComp&lt;/SPAN&gt;.&lt;SPAN style="color: #800000;"&gt;Transformation&lt;/SPAN&gt;.&lt;SPAN style="color: #800000;"&gt;Copy&lt;/SPAN&gt;
		&lt;SPAN style="color: #800000;"&gt;oVector&lt;/SPAN&gt;.&lt;SPAN style="color: #800000;"&gt;AddVector&lt;/SPAN&gt;(&lt;SPAN style="color: #800000;"&gt;oMatrix&lt;/SPAN&gt;.&lt;SPAN style="color: #800000;"&gt;Translation&lt;/SPAN&gt;)
		&lt;SPAN style="color: #800000;"&gt;oMatrix&lt;/SPAN&gt;.&lt;SPAN style="color: #800000;"&gt;SetTranslation&lt;/SPAN&gt;(&lt;SPAN style="color: #800000;"&gt;oVector&lt;/SPAN&gt;, &lt;SPAN style="color: #ff0000;"&gt;False&lt;/SPAN&gt;)
		&lt;SPAN style="color: #800000;"&gt;oComp&lt;/SPAN&gt;.&lt;SPAN style="color: #800000;"&gt;Transformation&lt;/SPAN&gt; = &lt;SPAN style="color: #800000;"&gt;oMatrix&lt;/SPAN&gt;
		&lt;SPAN style="color: #800000;"&gt;oComp&lt;/SPAN&gt;.&lt;SPAN style="color: #800000;"&gt;Grounded&lt;/SPAN&gt; = &lt;SPAN style="color: #800000;"&gt;Grounded&lt;/SPAN&gt;
	&lt;SPAN style="color: #ff0000;"&gt;Next&lt;/SPAN&gt;
&lt;SPAN style="color: #ff0000;"&gt;End&lt;/SPAN&gt; &lt;SPAN style="color: #ff0000;"&gt;If&lt;/SPAN&gt;
&lt;SPAN style="color: #800080;"&gt;InventorVb&lt;/SPAN&gt;.&lt;SPAN style="color: #800080;"&gt;DocumentUpdate&lt;/SPAN&gt;()	&lt;/PRE&gt;</description>
      <pubDate>Wed, 03 Jun 2020 09:13:54 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-ilogic/unground-relocate-offset-reground/m-p/9557034#M111642</guid>
      <dc:creator>JhoelForshav</dc:creator>
      <dc:date>2020-06-03T09:13:54Z</dc:date>
    </item>
    <item>
      <title>Re: unground, relocate/offset  reground</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-ilogic/unground-relocate-offset-reground/m-p/9557582#M111652</link>
      <description>&lt;P&gt;I just realized... If you input for example (10, -10, 0) In this rule nothing will happen. I thought it was a shortcut to determine if any value &amp;lt;&amp;gt; 0 to put If oX + oY + oZ &amp;lt;&amp;gt; 0. Because the sum of the values can be zero even though all of them isn't 0 this could result in the code doing nothing when it should be moving the occurrences.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;This is the way to go...&lt;/P&gt;&lt;PRE&gt;&lt;SPAN style="color: #ff0000;"&gt;Dim&lt;/SPAN&gt; &lt;SPAN style="color: #800000;"&gt;oAsm&lt;/SPAN&gt; &lt;SPAN style="color: #ff0000;"&gt;As&lt;/SPAN&gt; &lt;SPAN style="color: #800000;"&gt;AssemblyDocument&lt;/SPAN&gt; = &lt;SPAN style="color: #800080;"&gt;ThisDoc&lt;/SPAN&gt;.&lt;SPAN style="color: #800080;"&gt;Document&lt;/SPAN&gt;
&lt;SPAN style="color: #ff0000;"&gt;Dim&lt;/SPAN&gt; &lt;SPAN style="color: #800000;"&gt;oTG&lt;/SPAN&gt; &lt;SPAN style="color: #ff0000;"&gt;As&lt;/SPAN&gt; &lt;SPAN style="color: #800000;"&gt;TransientGeometry&lt;/SPAN&gt; = &lt;SPAN style="color: #800080;"&gt;ThisApplication&lt;/SPAN&gt;.&lt;SPAN style="color: #800000;"&gt;TransientGeometry&lt;/SPAN&gt;
&lt;SPAN style="color: #ff0000;"&gt;Dim&lt;/SPAN&gt; &lt;SPAN style="color: #800000;"&gt;oUM&lt;/SPAN&gt; &lt;SPAN style="color: #ff0000;"&gt;As&lt;/SPAN&gt; &lt;SPAN style="color: #800000;"&gt;UnitsOfMeasure&lt;/SPAN&gt; = &lt;SPAN style="color: #800080;"&gt;ThisDoc&lt;/SPAN&gt;.&lt;SPAN style="color: #800080;"&gt;Document&lt;/SPAN&gt;.&lt;SPAN style="color: #800000;"&gt;UnitsOfMeasure&lt;/SPAN&gt;
&lt;SPAN style="color: #ff0000;"&gt;Dim&lt;/SPAN&gt; &lt;SPAN style="color: #800000;"&gt;xyz&lt;/SPAN&gt; &lt;SPAN style="color: #ff0000;"&gt;As&lt;/SPAN&gt; &lt;SPAN style="color: #ff0000;"&gt;String&lt;/SPAN&gt; = &lt;SPAN style="color: #800000;"&gt;InputBox&lt;/SPAN&gt;(&lt;SPAN style="color: #008080;"&gt;"Move component X,Y,Z"&lt;/SPAN&gt;, &lt;SPAN style="color: #008080;"&gt;"Move this component"&lt;/SPAN&gt;, &lt;SPAN style="color: #008080;"&gt;"0,0,0"&lt;/SPAN&gt;)
&lt;SPAN style="color: #ff0000;"&gt;Dim&lt;/SPAN&gt; &lt;SPAN style="color: #800000;"&gt;oX&lt;/SPAN&gt; &lt;SPAN style="color: #ff0000;"&gt;As&lt;/SPAN&gt; &lt;SPAN style="color: #ff0000;"&gt;Double&lt;/SPAN&gt; = &lt;SPAN style="color: #800000;"&gt;oUM&lt;/SPAN&gt;.&lt;SPAN style="color: #800000;"&gt;ConvertUnits&lt;/SPAN&gt;(&lt;SPAN style="color: #ff0000;"&gt;CDbl&lt;/SPAN&gt;(&lt;SPAN style="color: #800000;"&gt;xyz&lt;/SPAN&gt;.&lt;SPAN style="color: #800000;"&gt;Split&lt;/SPAN&gt;(&lt;SPAN style="color: #008080;"&gt;","&lt;/SPAN&gt;)(0)), &lt;SPAN style="color: #800000;"&gt;oUM&lt;/SPAN&gt;.&lt;SPAN style="color: #800000;"&gt;LengthUnits&lt;/SPAN&gt;, &lt;SPAN style="color: #800000;"&gt;UnitsTypeEnum&lt;/SPAN&gt;.&lt;SPAN style="color: #800000;"&gt;kDatabaseLengthUnits&lt;/SPAN&gt;)
&lt;SPAN style="color: #ff0000;"&gt;Dim&lt;/SPAN&gt; &lt;SPAN style="color: #800000;"&gt;oY&lt;/SPAN&gt; &lt;SPAN style="color: #ff0000;"&gt;As&lt;/SPAN&gt; &lt;SPAN style="color: #ff0000;"&gt;Double&lt;/SPAN&gt; = &lt;SPAN style="color: #800000;"&gt;oUM&lt;/SPAN&gt;.&lt;SPAN style="color: #800000;"&gt;ConvertUnits&lt;/SPAN&gt;(&lt;SPAN style="color: #ff0000;"&gt;CDbl&lt;/SPAN&gt;(&lt;SPAN style="color: #800000;"&gt;xyz&lt;/SPAN&gt;.&lt;SPAN style="color: #800000;"&gt;Split&lt;/SPAN&gt;(&lt;SPAN style="color: #008080;"&gt;","&lt;/SPAN&gt;)(1)), &lt;SPAN style="color: #800000;"&gt;oUM&lt;/SPAN&gt;.&lt;SPAN style="color: #800000;"&gt;LengthUnits&lt;/SPAN&gt;, &lt;SPAN style="color: #800000;"&gt;UnitsTypeEnum&lt;/SPAN&gt;.&lt;SPAN style="color: #800000;"&gt;kDatabaseLengthUnits&lt;/SPAN&gt;)
&lt;SPAN style="color: #ff0000;"&gt;Dim&lt;/SPAN&gt; &lt;SPAN style="color: #800000;"&gt;oZ&lt;/SPAN&gt; &lt;SPAN style="color: #ff0000;"&gt;As&lt;/SPAN&gt; &lt;SPAN style="color: #ff0000;"&gt;Double&lt;/SPAN&gt; = &lt;SPAN style="color: #800000;"&gt;oUM&lt;/SPAN&gt;.&lt;SPAN style="color: #800000;"&gt;ConvertUnits&lt;/SPAN&gt;(&lt;SPAN style="color: #ff0000;"&gt;CDbl&lt;/SPAN&gt;(&lt;SPAN style="color: #800000;"&gt;xyz&lt;/SPAN&gt;.&lt;SPAN style="color: #800000;"&gt;Split&lt;/SPAN&gt;(&lt;SPAN style="color: #008080;"&gt;","&lt;/SPAN&gt;)(2)), &lt;SPAN style="color: #800000;"&gt;oUM&lt;/SPAN&gt;.&lt;SPAN style="color: #800000;"&gt;LengthUnits&lt;/SPAN&gt;, &lt;SPAN style="color: #800000;"&gt;UnitsTypeEnum&lt;/SPAN&gt;.&lt;SPAN style="color: #800000;"&gt;kDatabaseLengthUnits&lt;/SPAN&gt;)
&lt;SPAN style="color: #ff0000;"&gt;If&lt;/SPAN&gt; &lt;SPAN style="color: #800000;"&gt;oX&lt;/SPAN&gt; &amp;lt;&amp;gt; 0 &lt;SPAN style="color: #ff0000;"&gt;Or&lt;/SPAN&gt; &lt;SPAN style="color: #800000;"&gt;oY&lt;/SPAN&gt; &amp;lt;&amp;gt; 0 &lt;SPAN style="color: #ff0000;"&gt;Or&lt;/SPAN&gt; &lt;SPAN style="color: #800000;"&gt;oZ&lt;/SPAN&gt; &amp;lt;&amp;gt; 0
	&lt;SPAN style="color: #ff0000;"&gt;For&lt;/SPAN&gt; &lt;SPAN style="color: #ff0000;"&gt;Each&lt;/SPAN&gt; &lt;SPAN style="color: #800000;"&gt;oComp&lt;/SPAN&gt; &lt;SPAN style="color: #ff0000;"&gt;As&lt;/SPAN&gt; &lt;SPAN style="color: #800000;"&gt;ComponentOccurrence&lt;/SPAN&gt; &lt;SPAN style="color: #ff0000;"&gt;In&lt;/SPAN&gt; &lt;SPAN style="color: #800000;"&gt;oAsm&lt;/SPAN&gt;.&lt;SPAN style="color: #800000;"&gt;ComponentDefinition&lt;/SPAN&gt;.&lt;SPAN style="color: #800000;"&gt;Occurrences&lt;/SPAN&gt;
		&lt;SPAN style="color: #ff0000;"&gt;Dim&lt;/SPAN&gt; &lt;SPAN style="color: #800000;"&gt;Grounded&lt;/SPAN&gt; &lt;SPAN style="color: #ff0000;"&gt;As&lt;/SPAN&gt; &lt;SPAN style="color: #ff0000;"&gt;Boolean&lt;/SPAN&gt; = &lt;SPAN style="color: #800000;"&gt;oComp&lt;/SPAN&gt;.&lt;SPAN style="color: #800000;"&gt;Grounded&lt;/SPAN&gt;
		&lt;SPAN style="color: #ff0000;"&gt;If&lt;/SPAN&gt; &lt;SPAN style="color: #800000;"&gt;Grounded&lt;/SPAN&gt; = &lt;SPAN style="color: #ff0000;"&gt;True&lt;/SPAN&gt; &lt;SPAN style="color: #ff0000;"&gt;Then&lt;/SPAN&gt; &lt;SPAN style="color: #800000;"&gt;oComp&lt;/SPAN&gt;.&lt;SPAN style="color: #800000;"&gt;Grounded&lt;/SPAN&gt; = &lt;SPAN style="color: #ff0000;"&gt;False&lt;/SPAN&gt;
		&lt;SPAN style="color: #ff0000;"&gt;Dim&lt;/SPAN&gt; &lt;SPAN style="color: #800000;"&gt;oVector&lt;/SPAN&gt; &lt;SPAN style="color: #ff0000;"&gt;As&lt;/SPAN&gt; &lt;SPAN style="color: #800000;"&gt;Vector&lt;/SPAN&gt; = &lt;SPAN style="color: #800000;"&gt;oTG&lt;/SPAN&gt;.&lt;SPAN style="color: #800000;"&gt;CreateVector&lt;/SPAN&gt;(&lt;SPAN style="color: #800000;"&gt;oX&lt;/SPAN&gt;, &lt;SPAN style="color: #800000;"&gt;oY&lt;/SPAN&gt;, &lt;SPAN style="color: #800000;"&gt;oZ&lt;/SPAN&gt;)
		&lt;SPAN style="color: #ff0000;"&gt;Dim&lt;/SPAN&gt; &lt;SPAN style="color: #800000;"&gt;oMatrix&lt;/SPAN&gt; &lt;SPAN style="color: #ff0000;"&gt;As&lt;/SPAN&gt; &lt;SPAN style="color: #800000;"&gt;Matrix&lt;/SPAN&gt; = &lt;SPAN style="color: #800000;"&gt;oComp&lt;/SPAN&gt;.&lt;SPAN style="color: #800000;"&gt;Transformation&lt;/SPAN&gt;.&lt;SPAN style="color: #800000;"&gt;Copy&lt;/SPAN&gt;
		&lt;SPAN style="color: #800000;"&gt;oVector&lt;/SPAN&gt;.&lt;SPAN style="color: #800000;"&gt;AddVector&lt;/SPAN&gt;(&lt;SPAN style="color: #800000;"&gt;oMatrix&lt;/SPAN&gt;.&lt;SPAN style="color: #800000;"&gt;Translation&lt;/SPAN&gt;)
		&lt;SPAN style="color: #800000;"&gt;oMatrix&lt;/SPAN&gt;.&lt;SPAN style="color: #800000;"&gt;SetTranslation&lt;/SPAN&gt;(&lt;SPAN style="color: #800000;"&gt;oVector&lt;/SPAN&gt;, &lt;SPAN style="color: #ff0000;"&gt;False&lt;/SPAN&gt;)
		&lt;SPAN style="color: #800000;"&gt;oComp&lt;/SPAN&gt;.&lt;SPAN style="color: #800000;"&gt;Transformation&lt;/SPAN&gt; = &lt;SPAN style="color: #800000;"&gt;oMatrix&lt;/SPAN&gt;
		&lt;SPAN style="color: #800000;"&gt;oComp&lt;/SPAN&gt;.&lt;SPAN style="color: #800000;"&gt;Grounded&lt;/SPAN&gt; = &lt;SPAN style="color: #800000;"&gt;Grounded&lt;/SPAN&gt;
	&lt;SPAN style="color: #ff0000;"&gt;Next&lt;/SPAN&gt;
&lt;SPAN style="color: #ff0000;"&gt;End&lt;/SPAN&gt; &lt;SPAN style="color: #ff0000;"&gt;If&lt;/SPAN&gt;
&lt;SPAN style="color: #800080;"&gt;InventorVb&lt;/SPAN&gt;.&lt;SPAN style="color: #800080;"&gt;DocumentUpdate&lt;/SPAN&gt;()	&lt;/PRE&gt;</description>
      <pubDate>Wed, 03 Jun 2020 13:04:56 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-ilogic/unground-relocate-offset-reground/m-p/9557582#M111652</guid>
      <dc:creator>JhoelForshav</dc:creator>
      <dc:date>2020-06-03T13:04:56Z</dc:date>
    </item>
  </channel>
</rss>

