<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: iLogic - Toggle Constraining, Occurance Numbers/Names in Inventor Programming - iLogic, Macros, AddIns &amp; Apprentice</title>
    <link>https://forums.autodesk.com/t5/inventor-programming-ilogic/ilogic-toggle-constraining-occurance-numbers-names/m-p/9196838#M103916</link>
    <description>&lt;P&gt;THANK YOU SO MUCH for pointing out how to solve this nasty little gotcha about assigning it to a string variable before feeding it in. I couldn't for the life of me figure out why it wasn't taking my occurrence name value and I was starting to go crazy. lol.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you, Thank you, Thank you.&lt;/P&gt;&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Wed, 11 Dec 2019 18:52:30 GMT</pubDate>
    <dc:creator>Will.Ehrendreich</dc:creator>
    <dc:date>2019-12-11T18:52:30Z</dc:date>
    <item>
      <title>iLogic - Toggle Constraining, Occurance Numbers/Names</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-ilogic/ilogic-toggle-constraining-occurance-numbers-names/m-p/7941287#M83404</link>
      <description>&lt;P&gt;Greetings,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;What I'm trying to build in Inventor 2019; New Toys so experimenting &lt;img class="lia-deferred-image lia-image-emoji" src="https://forums.autodesk.com/html/@B4D44A73814D7FC0D950DEDFACB97081/emoticons/1f642.png" alt=":slightly_smiling_face:" title=":slightly_smiling_face:" /&gt;&lt;/P&gt;&lt;P&gt;In an assembly enviroment, add 2 different parts, each part has named surfaces 1, 2, 3 for example&lt;/P&gt;&lt;P&gt;Run a Form to Select Part A &amp;amp; Select Part B&lt;/P&gt;&lt;P&gt;Snap Surface 1 from Part A to Surface 1 from Part B&lt;/P&gt;&lt;P&gt;Click again on Part A Then Snap Part B To Surface 2 on Part A&lt;/P&gt;&lt;P&gt;Reverse for Part B&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The problem I'm running into atm is, since I want to make this a "&lt;U&gt;&lt;STRONG&gt;General&lt;/STRONG&gt;&lt;/U&gt;" tool&lt;/P&gt;&lt;P&gt;(So having multiple instances of Part A &amp;amp; Part B)&lt;/P&gt;&lt;P&gt;Are the occurance numbers on the parts, how to transfer those along the code&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;More specificly how to move from the Selected "Object" to a "String"&lt;/P&gt;&lt;P&gt;Since the Occurance Name does not have an iProperty value, which is annoying&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Some Crude Unfinished Code:&lt;/P&gt;&lt;P&gt;SyntaxEditor Code Snippet&lt;/P&gt;&lt;PRE&gt;&lt;SPAN style="color: #ff0000;"&gt;Dim&lt;/SPAN&gt; &lt;SPAN style="color: #800000;"&gt;Object_A&lt;/SPAN&gt; &lt;SPAN style="color: #ff0000;"&gt;As&lt;/SPAN&gt; &lt;SPAN style="color: #ff0000;"&gt;Object&lt;/SPAN&gt;
&lt;SPAN style="color: #ff0000;"&gt;Dim&lt;/SPAN&gt; &lt;SPAN style="color: #800000;"&gt;Object_B&lt;/SPAN&gt; &lt;SPAN style="color: #ff0000;"&gt;As&lt;/SPAN&gt; &lt;SPAN style="color: #ff0000;"&gt;Object&lt;/SPAN&gt;

&lt;SPAN style="color: #ff0000;"&gt;Dim&lt;/SPAN&gt; &lt;SPAN style="color: #800000;"&gt;Orientation_A&lt;/SPAN&gt; &lt;SPAN style="color: #ff0000;"&gt;As&lt;/SPAN&gt; &lt;SPAN style="color: #ff0000;"&gt;Integer&lt;/SPAN&gt;
&lt;SPAN style="color: #ff0000;"&gt;Dim&lt;/SPAN&gt; &lt;SPAN style="color: #800000;"&gt;Orientation_B&lt;/SPAN&gt; &lt;SPAN style="color: #ff0000;"&gt;As&lt;/SPAN&gt; &lt;SPAN style="color: #ff0000;"&gt;Integer&lt;/SPAN&gt;

&lt;SPAN style="color: #800080;"&gt;ThisAssembly&lt;/SPAN&gt;.&lt;SPAN style="color: #800080;"&gt;BeginManage&lt;/SPAN&gt;(&lt;SPAN style="color: #008080;"&gt;"Group 1"&lt;/SPAN&gt;)&lt;BR /&gt;       ' Section To Add Required Parts/Assembly's ...

	&lt;SPAN style="color: #808080;"&gt;' Select The Primary &amp;amp; Secondary Snap Parts&lt;/SPAN&gt;
		&lt;SPAN style="color: #800000;"&gt;Object_A&lt;/SPAN&gt; = &lt;SPAN style="color: #800080;"&gt;ThisApplication&lt;/SPAN&gt;.&lt;SPAN style="color: #800000;"&gt;CommandManager&lt;/SPAN&gt;.&lt;SPAN style="color: #800000;"&gt;Pick&lt;/SPAN&gt;(&lt;SPAN style="color: #800000;"&gt;SelectionFilterEnum&lt;/SPAN&gt;.&lt;SPAN style="color: #800000;"&gt;kAssemblyOccurrenceFilter&lt;/SPAN&gt;, &lt;SPAN style="color: #008080;"&gt;"Select The First Component"&lt;/SPAN&gt;) 
		&lt;SPAN style="color: #800000;"&gt;Object_B&lt;/SPAN&gt; = &lt;SPAN style="color: #800080;"&gt;ThisApplication&lt;/SPAN&gt;.&lt;SPAN style="color: #800000;"&gt;CommandManager&lt;/SPAN&gt;.&lt;SPAN style="color: #800000;"&gt;Pick&lt;/SPAN&gt;(&lt;SPAN style="color: #800000;"&gt;SelectionFilterEnum&lt;/SPAN&gt;.&lt;SPAN style="color: #800000;"&gt;kAssemblyOccurrenceFilter&lt;/SPAN&gt;, &lt;SPAN style="color: #008080;"&gt;"Select The Second Component"&lt;/SPAN&gt;)
	
	&lt;SPAN style="color: #808080;"&gt;' Code To Get The Selected Object Into 2 Seperate Strings&lt;/SPAN&gt;
		&lt;SPAN style="color: #808080;"&gt;' ...&lt;/SPAN&gt;
	  
	&lt;SPAN style="color: #808080;"&gt;' Loop Trough Each Availible Socket&lt;/SPAN&gt;
		&lt;SPAN style="color: #800000;"&gt;Orientation_A&lt;/SPAN&gt; = &lt;SPAN style="color: #008080;"&gt;"1"&lt;/SPAN&gt;
		&lt;SPAN style="color: #800000;"&gt;Orientation_B&lt;/SPAN&gt; = &lt;SPAN style="color: #008080;"&gt;"1"&lt;/SPAN&gt;
		&lt;SPAN style="color: #808080;"&gt;' ...&lt;/SPAN&gt;
	
	&lt;SPAN style="color: #808080;"&gt;' Create Named Surface To Named Surface Constraints&lt;/SPAN&gt;
		&lt;SPAN style="color: #808080;"&gt;'Constraints.AddMate("Mate:1", Object_A, Orientation_A, Object_B, Orientation_B)&lt;/SPAN&gt;
		&lt;SPAN style="color: #800080;"&gt;Constraints&lt;/SPAN&gt;.&lt;SPAN style="color: #800080;"&gt;AddMate&lt;/SPAN&gt;(&lt;SPAN style="color: #008080;"&gt;"Mate:1"&lt;/SPAN&gt;, &lt;SPAN style="color: #008080;"&gt;"Testblok 2:1"&lt;/SPAN&gt;, &lt;SPAN style="color: #800000;"&gt;Orientation_A&lt;/SPAN&gt;, &lt;SPAN style="color: #008080;"&gt;"Testblok 1:1"&lt;/SPAN&gt;, &lt;SPAN style="color: #800000;"&gt;Orientation_B&lt;/SPAN&gt;)

&lt;SPAN style="color: #800080;"&gt;ThisAssembly&lt;/SPAN&gt;.&lt;SPAN style="color: #800080;"&gt;EndManage&lt;/SPAN&gt;(&lt;SPAN style="color: #008080;"&gt;"Group 1"&lt;/SPAN&gt;)

&lt;SPAN style="color: #800000;"&gt;RuleParametersOutput&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: #800080;"&gt;iLogicVb&lt;/SPAN&gt;.&lt;SPAN style="color: #800080;"&gt;UpdateWhenDone&lt;/SPAN&gt; = &lt;SPAN style="color: #ff0000;"&gt;True&lt;/SPAN&gt;
&lt;/PRE&gt;&lt;P&gt;&amp;nbsp; Anyone who has some suggestions on how to do this? &lt;img class="lia-deferred-image lia-image-emoji" src="https://forums.autodesk.com/html/@B4D44A73814D7FC0D950DEDFACB97081/emoticons/1f642.png" alt=":slightly_smiling_face:" title=":slightly_smiling_face:" /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Kind Regards,&lt;/P&gt;&lt;P&gt;NVD&lt;/P&gt;</description>
      <pubDate>Wed, 18 Apr 2018 13:01:08 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-ilogic/ilogic-toggle-constraining-occurance-numbers-names/m-p/7941287#M83404</guid>
      <dc:creator>nico</dc:creator>
      <dc:date>2018-04-18T13:01:08Z</dc:date>
    </item>
    <item>
      <title>Re: iLogic - Toggle Constraining, Occurance Numbers/Names</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-ilogic/ilogic-toggle-constraining-occurance-numbers-names/m-p/7942530#M83423</link>
      <description>&lt;PRE&gt;&lt;SPAN&gt;Constraints.AddMate("Mate:1", Object_A.Name, Orientation_A, Object_B.Name, Orientation_B)&lt;/SPAN&gt;&lt;/PRE&gt;
&lt;P&gt;as outlined in the API under ComponentOccurrence as that is (typically) what object type is returned from your pick command with that specific selection filter.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;A href="http://help.autodesk.com/view/INVNTOR/2018/ENU/?guid=GUID-DE229A99-9860-4501-AF4C-C671D120A2DB" target="_blank"&gt;http://help.autodesk.com/view/INVNTOR/2018/ENU/?guid=GUID-DE229A99-9860-4501-AF4C-C671D120A2DB&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 18 Apr 2018 18:34:15 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-ilogic/ilogic-toggle-constraining-occurance-numbers-names/m-p/7942530#M83423</guid>
      <dc:creator>MechMachineMan</dc:creator>
      <dc:date>2018-04-18T18:34:15Z</dc:date>
    </item>
    <item>
      <title>Re: iLogic - Toggle Constraining, Occurance Numbers/Names</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-ilogic/ilogic-toggle-constraining-occurance-numbers-names/m-p/7944740#M83466</link>
      <description>&lt;P&gt;Cheers for the reply,&lt;/P&gt;&lt;P&gt;Object_A.Name inside the Constraints.Addmate() doesn't work and gives and error:&lt;/P&gt;&lt;P&gt;&lt;EM&gt;Unable to cast object of type 'System.String' to type 'Autodesk.iLogic.Types.ComponentArgument&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;But it's easily solved by first defining a string and then inputting that string&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;So far I've split it up into 3 seperate rules, since it's different uses&lt;/P&gt;&lt;P&gt;The Add a Part/Product Rule currently looks like this: (And works like a charm :))&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;Item&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: #ff0000;"&gt;Dim&lt;/SPAN&gt; &lt;SPAN style="color: #800000;"&gt;Item_Unique_ID&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: #ff0000;"&gt;Dim&lt;/SPAN&gt; &lt;SPAN style="color: #800000;"&gt;Item_URL&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: #ff0000;"&gt;Dim&lt;/SPAN&gt; &lt;SPAN style="color: #800000;"&gt;Item_Extensie&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: #ff0000;"&gt;Dim&lt;/SPAN&gt; &lt;SPAN style="color: #800000;"&gt;Offerte_N&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: #ff0000;"&gt;Dim&lt;/SPAN&gt; &lt;SPAN style="color: #800000;"&gt;Materiaal_N&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: #ff0000;"&gt;Dim&lt;/SPAN&gt; &lt;SPAN style="color: #800000;"&gt;oAsmCompDef&lt;/SPAN&gt; &lt;SPAN style="color: #ff0000;"&gt;As&lt;/SPAN&gt; &lt;SPAN style="color: #800000;"&gt;AssemblyComponentDefinition&lt;/SPAN&gt;
&lt;SPAN style="color: #ff0000;"&gt;Dim&lt;/SPAN&gt; &lt;SPAN style="color: #800000;"&gt;oOccurrence&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;If&lt;/SPAN&gt; &lt;SPAN style="color: #0000ff;"&gt;Unique_ID&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;Offerte_N&lt;/SPAN&gt; = &lt;SPAN style="color: #0000ff;"&gt;Offerte_Nummer&lt;/SPAN&gt;
	&lt;SPAN style="color: #800000;"&gt;Materiaal_N&lt;/SPAN&gt; = &lt;SPAN style="color: #0000ff;"&gt;Materiaal_Nummer&lt;/SPAN&gt;
	&lt;SPAN style="color: #800000;"&gt;Item_Unique_ID&lt;/SPAN&gt; = &lt;SPAN style="color: #800000;"&gt;Materiaal_N&lt;/SPAN&gt; &amp;amp; &lt;SPAN style="color: #008080;"&gt;" - "&lt;/SPAN&gt;
&lt;SPAN style="color: #ff0000;"&gt;Else&lt;/SPAN&gt;
	&lt;SPAN style="color: #800000;"&gt;Offerte_N&lt;/SPAN&gt; = &lt;SPAN style="color: #008080;"&gt;""&lt;/SPAN&gt;
	&lt;SPAN style="color: #800000;"&gt;Materiaal_N&lt;/SPAN&gt; = &lt;SPAN style="color: #008080;"&gt;""&lt;/SPAN&gt;
	&lt;SPAN style="color: #800000;"&gt;Item_Unique_ID&lt;/SPAN&gt; = &lt;SPAN style="color: #008080;"&gt;""&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: #ff0000;"&gt;If&lt;/SPAN&gt; &lt;SPAN style="color: #0000ff;"&gt;Producten&lt;/SPAN&gt; = &lt;SPAN style="color: #008080;"&gt;"0000 - Testblok 1"&lt;/SPAN&gt; &lt;SPAN style="color: #ff0000;"&gt;Or&lt;/SPAN&gt; &lt;SPAN style="color: #0000ff;"&gt;Producten&lt;/SPAN&gt; = &lt;SPAN style="color: #008080;"&gt;"0000 - Testblok 2"&lt;/SPAN&gt; &lt;SPAN style="color: #ff0000;"&gt;Then&lt;/SPAN&gt;
	&lt;SPAN style="color: #800000;"&gt;Item&lt;/SPAN&gt; = &lt;SPAN style="color: #0000ff;"&gt;Product&lt;/SPAN&gt; 
	&lt;SPAN style="color: #800000;"&gt;Item_Extensie&lt;/SPAN&gt; = &lt;SPAN style="color: #008080;"&gt;".ipt"&lt;/SPAN&gt;
	&lt;SPAN style="color: #800000;"&gt;Item_URL&lt;/SPAN&gt; = &lt;SPAN style="color: #008080;"&gt;"C:\$Working Folder\Designs\iLogic Testen\"&lt;/SPAN&gt;
	&lt;SPAN style="color: #808080;"&gt;'Item_URL = "C:\$Working Folder\Designs\" &amp;amp; Product &amp;amp; ".ipt"&lt;/SPAN&gt;
&lt;SPAN style="color: #ff0000;"&gt;Else&lt;/SPAN&gt;
	&lt;SPAN style="color: #800000;"&gt;Item&lt;/SPAN&gt; = &lt;SPAN style="color: #0000ff;"&gt;Producten&lt;/SPAN&gt; &amp;amp; &lt;SPAN style="color: #008080;"&gt;" Configurator"&lt;/SPAN&gt; 
	&lt;SPAN style="color: #800000;"&gt;Item_Extensie&lt;/SPAN&gt; = &lt;SPAN style="color: #008080;"&gt;".iam"&lt;/SPAN&gt;
	&lt;SPAN style="color: #800000;"&gt;Item_URL&lt;/SPAN&gt; = &lt;SPAN style="color: #008080;"&gt;"C:\$Working Folder\Designs\iLogic Testen\"&lt;/SPAN&gt;
	&lt;SPAN style="color: #808080;"&gt;'Item_URL = "C:\$Working Folder\Designs\" &amp;amp; Producten &amp;amp; "\20. 3D Designs\" &amp;amp; Producten &amp;amp; " - Configurator.iam"&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;oAsmCompDef&lt;/SPAN&gt; = &lt;SPAN style="color: #800080;"&gt;ThisApplication&lt;/SPAN&gt;.&lt;SPAN style="color: #800000;"&gt;ActiveDocument&lt;/SPAN&gt;.&lt;SPAN style="color: #800000;"&gt;ComponentDefinition&lt;/SPAN&gt;
	&lt;SPAN style="color: #800000;"&gt;i&lt;/SPAN&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;oOccurrence&lt;/SPAN&gt; &lt;SPAN style="color: #ff0000;"&gt;In&lt;/SPAN&gt; &lt;SPAN style="color: #800000;"&gt;oAsmCompDef&lt;/SPAN&gt;.&lt;SPAN style="color: #800000;"&gt;Occurrences&lt;/SPAN&gt;
	&lt;SPAN style="color: #ff0000;"&gt;If&lt;/SPAN&gt; &lt;SPAN style="color: #800000;"&gt;Left&lt;/SPAN&gt;( &lt;SPAN style="color: #800000;"&gt;oOccurrence&lt;/SPAN&gt;.&lt;SPAN style="color: #800000;"&gt;Definition&lt;/SPAN&gt;.&lt;SPAN style="color: #800000;"&gt;Document&lt;/SPAN&gt;.&lt;SPAN style="color: #800000;"&gt;DisplayName&lt;/SPAN&gt;,10 ) = &lt;SPAN style="color: #800000;"&gt;Item&lt;/SPAN&gt; &lt;SPAN style="color: #ff0000;"&gt;Then&lt;/SPAN&gt;
	   &lt;SPAN style="color: #800000;"&gt;i&lt;/SPAN&gt;=&lt;SPAN style="color: #800000;"&gt;i&lt;/SPAN&gt;+1
	   &lt;SPAN style="color: #800000;"&gt;oOccurrence&lt;/SPAN&gt;.&lt;SPAN style="color: #800000;"&gt;Name&lt;/SPAN&gt; = &lt;SPAN style="color: #800000;"&gt;Item&lt;/SPAN&gt; &amp;amp; &lt;SPAN style="color: #008080;"&gt;" :"&lt;/SPAN&gt;+ &lt;SPAN style="color: #ff0000;"&gt;CStr&lt;/SPAN&gt;(&lt;SPAN style="color: #800000;"&gt;i&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: #ff0000;"&gt;Next&lt;/SPAN&gt;

&lt;SPAN style="color: #ff0000;"&gt;Dim&lt;/SPAN&gt; &lt;SPAN style="color: #800000;"&gt;oProduct&lt;/SPAN&gt; = &lt;SPAN style="color: #800080;"&gt;Components&lt;/SPAN&gt;.&lt;SPAN style="color: #800080;"&gt;Add&lt;/SPAN&gt;(&lt;SPAN style="color: #800000;"&gt;Item_Unique_ID&lt;/SPAN&gt; &amp;amp; &lt;SPAN style="color: #800000;"&gt;Item&lt;/SPAN&gt; &amp;amp; &lt;SPAN style="color: #008080;"&gt;" :"&lt;/SPAN&gt; &amp;amp; (&lt;SPAN style="color: #800000;"&gt;i&lt;/SPAN&gt; + &lt;SPAN style="color: #008080;"&gt;"1"&lt;/SPAN&gt;), &lt;SPAN style="color: #800000;"&gt;Item&lt;/SPAN&gt; &amp;amp; &lt;SPAN style="color: #800000;"&gt;Item_Extensie&lt;/SPAN&gt;)
&lt;SPAN style="color: #ff0000;"&gt;Dim&lt;/SPAN&gt; &lt;SPAN style="color: #800000;"&gt;sProduct&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;sProduct&lt;/SPAN&gt; = &lt;SPAN style="color: #800000;"&gt;oProduct&lt;/SPAN&gt;.&lt;SPAN style="color: #800080;"&gt;Name&lt;/SPAN&gt;

&lt;SPAN style="color: #808080;"&gt;' Unique Product Save - ONLY Top Level with Parameters ! For full copy of all Parts use the Copy command !&lt;/SPAN&gt;
	&lt;SPAN style="color: #800000;"&gt;WorkspacePath&lt;/SPAN&gt; = &lt;SPAN style="color: #800080;"&gt;ThisDoc&lt;/SPAN&gt;.&lt;SPAN style="color: #800000;"&gt;WorkspacePath&lt;/SPAN&gt;()
	&lt;SPAN style="color: #800000;"&gt;WorkspacePathLength&lt;/SPAN&gt; = &lt;SPAN style="color: #800000;"&gt;Len&lt;/SPAN&gt;(&lt;SPAN style="color: #800000;"&gt;WorkspacePath&lt;/SPAN&gt;)
	&lt;SPAN style="color: #800000;"&gt;PathOnly&lt;/SPAN&gt; = &lt;SPAN style="color: #800080;"&gt;ThisDoc&lt;/SPAN&gt;.&lt;SPAN style="color: #800080;"&gt;Path&lt;/SPAN&gt;
	&lt;SPAN style="color: #800000;"&gt;DirectoryPath&lt;/SPAN&gt; = &lt;SPAN style="color: #800000;"&gt;Strings&lt;/SPAN&gt;.&lt;SPAN style="color: #800000;"&gt;Right&lt;/SPAN&gt;(&lt;SPAN style="color: #800000;"&gt;PathOnly&lt;/SPAN&gt;, &lt;SPAN style="color: #800000;"&gt;PathOnly&lt;/SPAN&gt;.&lt;SPAN style="color: #800000;"&gt;Length&lt;/SPAN&gt;-&lt;SPAN style="color: #800000;"&gt;WorkspacePathLength&lt;/SPAN&gt;)

&lt;SPAN style="color: #808080;"&gt;'Check for the New Save folder and create it if it does not exist&lt;/SPAN&gt;
	&lt;SPAN style="color: #ff0000;"&gt;If&lt;/SPAN&gt;(&lt;SPAN style="color: #ff0000;"&gt;Not&lt;/SPAN&gt; &lt;SPAN style="color: #800000;"&gt;System&lt;/SPAN&gt;.&lt;SPAN style="color: #800000;"&gt;IO&lt;/SPAN&gt;.&lt;SPAN style="color: #800000;"&gt;Directory&lt;/SPAN&gt;.&lt;SPAN style="color: #800000;"&gt;Exists&lt;/SPAN&gt;(&lt;SPAN style="color: #800000;"&gt;Item_URL&lt;/SPAN&gt;)) &lt;SPAN style="color: #ff0000;"&gt;Then&lt;/SPAN&gt;
		&lt;SPAN style="color: #800000;"&gt;System&lt;/SPAN&gt;.&lt;SPAN style="color: #800000;"&gt;IO&lt;/SPAN&gt;.&lt;SPAN style="color: #800000;"&gt;Directory&lt;/SPAN&gt;.&lt;SPAN style="color: #800000;"&gt;CreateDirectory&lt;/SPAN&gt;(&lt;SPAN style="color: #800000;"&gt;Item_URL&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;Save&lt;/SPAN&gt; = &lt;SPAN style="color: #800000;"&gt;MessageBox&lt;/SPAN&gt;.&lt;SPAN style="color: #800000;"&gt;Show&lt;/SPAN&gt;(&lt;SPAN style="color: #008080;"&gt;"Save This Product?"&lt;/SPAN&gt;, &lt;SPAN style="color: #008080;"&gt;"Save Product?"&lt;/SPAN&gt;, &lt;SPAN style="color: #800000;"&gt;MessageBoxButtons&lt;/SPAN&gt;.&lt;SPAN style="color: #800000;"&gt;YesNoCancel&lt;/SPAN&gt;)

	&lt;SPAN style="color: #ff0000;"&gt;If&lt;/SPAN&gt; &lt;SPAN style="color: #800000;"&gt;Save&lt;/SPAN&gt; = &lt;SPAN style="color: #800000;"&gt;vbYes&lt;/SPAN&gt; &lt;SPAN style="color: #ff0000;"&gt;Then&lt;/SPAN&gt;
		&lt;SPAN style="color: #800000;"&gt;part&lt;/SPAN&gt; = &lt;SPAN style="color: #800080;"&gt;Component&lt;/SPAN&gt;.&lt;SPAN style="color: #800080;"&gt;InventorComponent&lt;/SPAN&gt;(&lt;SPAN style="color: #800000;"&gt;sProduct&lt;/SPAN&gt;)
		&lt;SPAN style="color: #800000;"&gt;doc&lt;/SPAN&gt; = &lt;SPAN style="color: #800080;"&gt;ThisApplication&lt;/SPAN&gt;.&lt;SPAN style="color: #800000;"&gt;Documents&lt;/SPAN&gt;.&lt;SPAN style="color: #800000;"&gt;Open&lt;/SPAN&gt;(&lt;SPAN style="color: #800000;"&gt;part&lt;/SPAN&gt;.&lt;SPAN style="color: #800000;"&gt;Definition&lt;/SPAN&gt;.&lt;SPAN style="color: #800000;"&gt;Document&lt;/SPAN&gt;.&lt;SPAN style="color: #800000;"&gt;FullDocumentName&lt;/SPAN&gt;, &lt;SPAN style="color: #ff0000;"&gt;False&lt;/SPAN&gt;)
		&lt;SPAN style="color: #800000;"&gt;doc&lt;/SPAN&gt;.&lt;SPAN style="color: #800000;"&gt;SaveAs&lt;/SPAN&gt;(&lt;SPAN style="color: #800000;"&gt;Item_URL&lt;/SPAN&gt; &amp;amp; &lt;SPAN style="color: #800000;"&gt;Item_Unique_ID&lt;/SPAN&gt; &amp;amp; &lt;SPAN style="color: #800000;"&gt;Item&lt;/SPAN&gt;  &amp;amp; &lt;SPAN style="color: #008080;"&gt;".iam"&lt;/SPAN&gt; , &lt;SPAN style="color: #ff0000;"&gt;True&lt;/SPAN&gt;)
		&lt;SPAN style="color: #808080;"&gt;'doc.Close()&lt;/SPAN&gt;
	&lt;SPAN style="color: #ff0000;"&gt;End&lt;/SPAN&gt; &lt;SPAN style="color: #ff0000;"&gt;If&lt;/SPAN&gt;
&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Being able to loop trough and renumber the occurances of identical parts/assemblys is essential&lt;/P&gt;&lt;P&gt;However I also need to do this in my "Constraining Rule" but I can't find a command for this?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;So final question on this topic, is there a command to run trough all the Relationships and look for an open "Mate" or "Flush" Occurance Number?&lt;/P&gt;</description>
      <pubDate>Thu, 19 Apr 2018 13:04:28 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-ilogic/ilogic-toggle-constraining-occurance-numbers-names/m-p/7944740#M83466</guid>
      <dc:creator>nico</dc:creator>
      <dc:date>2018-04-19T13:04:28Z</dc:date>
    </item>
    <item>
      <title>Re: iLogic - Toggle Constraining, Occurance Numbers/Names</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-ilogic/ilogic-toggle-constraining-occurance-numbers-names/m-p/7945026#M83470</link>
      <description>&lt;P&gt;I dont think so.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Yay custom solutions!&lt;/P&gt;</description>
      <pubDate>Thu, 19 Apr 2018 14:31:38 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-ilogic/ilogic-toggle-constraining-occurance-numbers-names/m-p/7945026#M83470</guid>
      <dc:creator>MechMachineMan</dc:creator>
      <dc:date>2018-04-19T14:31:38Z</dc:date>
    </item>
    <item>
      <title>Re: iLogic - Toggle Constraining, Occurance Numbers/Names</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-ilogic/ilogic-toggle-constraining-occurance-numbers-names/m-p/7947395#M83508</link>
      <description>&lt;P&gt;Found a solution, while there might not be a command for this;&lt;/P&gt;&lt;P&gt;if you leave the constraint name empty it auto generates the name + occurance number &lt;img class="lia-deferred-image lia-image-emoji" src="https://forums.autodesk.com/html/@B4D44A73814D7FC0D950DEDFACB97081/emoticons/1f642.png" alt=":slightly_smiling_face:" title=":slightly_smiling_face:" /&gt;&lt;/P&gt;&lt;PRE&gt;&lt;SPAN style="color: #800080;"&gt;Constraints&lt;/SPAN&gt;.&lt;SPAN style="color: #800080;"&gt;AddMate&lt;/SPAN&gt;(&lt;SPAN style="color: #008080;"&gt;""&lt;/SPAN&gt;, &lt;SPAN style="color: #800000;"&gt;String_A&lt;/SPAN&gt;, &lt;SPAN style="color: #800000;"&gt;Orientation_A&lt;/SPAN&gt;, &lt;SPAN style="color: #800000;"&gt;String_B&lt;/SPAN&gt;, &lt;SPAN style="color: #800000;"&gt;Orientation_B&lt;/SPAN&gt;)&lt;/PRE&gt;&lt;P&gt;The previous posted code still has a few flaws in it but it has gotten a bit big to post it all now&lt;/P&gt;&lt;P&gt;In the case some1 wants to use it, I recommend replacing the&amp;nbsp; ,10 with a number counted from the new file name&lt;/P&gt;&lt;PRE&gt;&lt;SPAN style="color: #800000;"&gt;sCharacters&lt;/SPAN&gt; = &lt;SPAN style="color: #800000;"&gt;Item_Unique_ID&lt;/SPAN&gt; &amp;amp; &lt;SPAN style="color: #800000;"&gt;Item&lt;/SPAN&gt; &amp;amp; &lt;SPAN style="color: #008080;"&gt;" :"&lt;/SPAN&gt;
		&lt;SPAN style="color: #800000;"&gt;iString_Length&lt;/SPAN&gt; = &lt;SPAN style="color: #800000;"&gt;sCharacters&lt;/SPAN&gt;.&lt;SPAN style="color: #800000;"&gt;Length&lt;/SPAN&gt;&lt;/PRE&gt;&lt;PRE&gt;&lt;SPAN style="color: #ff0000;"&gt;If&lt;/SPAN&gt; &lt;SPAN style="color: #800000;"&gt;Left&lt;/SPAN&gt;(&lt;SPAN style="color: #800000;"&gt;oOccurrence&lt;/SPAN&gt;.&lt;SPAN style="color: #800000;"&gt;Definition&lt;/SPAN&gt;.&lt;SPAN style="color: #800000;"&gt;Document&lt;/SPAN&gt;.&lt;SPAN style="color: #800000;"&gt;DisplayName&lt;/SPAN&gt;,&lt;SPAN style="color: #800000;"&gt;iString_Length&lt;/SPAN&gt;) = &lt;SPAN style="color: #800000;"&gt;Item_Unique_ID&lt;/SPAN&gt; &amp;amp; &lt;SPAN style="color: #800000;"&gt;Item&lt;/SPAN&gt; &lt;SPAN style="color: #ff0000;"&gt;Then&lt;/SPAN&gt;&lt;/PRE&gt;&lt;P&gt;Back to my constraining code:&lt;/P&gt;&lt;P&gt;Since the "Named Geometry Surfaces" is new in 2019, I'm assuming there is no way yet to automaticly look up / call / list these except for writing the exact name in a rule?&lt;/P&gt;&lt;P&gt;Or automaticly count the number of Surfaces on the part level and put it into a Parameter?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 20 Apr 2018 09:30:08 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-ilogic/ilogic-toggle-constraining-occurance-numbers-names/m-p/7947395#M83508</guid>
      <dc:creator>nico</dc:creator>
      <dc:date>2018-04-20T09:30:08Z</dc:date>
    </item>
    <item>
      <title>Re: iLogic - Toggle Constraining, Occurance Numbers/Names</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-ilogic/ilogic-toggle-constraining-occurance-numbers-names/m-p/9196838#M103916</link>
      <description>&lt;P&gt;THANK YOU SO MUCH for pointing out how to solve this nasty little gotcha about assigning it to a string variable before feeding it in. I couldn't for the life of me figure out why it wasn't taking my occurrence name value and I was starting to go crazy. lol.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you, Thank you, Thank you.&lt;/P&gt;&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 11 Dec 2019 18:52:30 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-ilogic/ilogic-toggle-constraining-occurance-numbers-names/m-p/9196838#M103916</guid>
      <dc:creator>Will.Ehrendreich</dc:creator>
      <dc:date>2019-12-11T18:52:30Z</dc:date>
    </item>
  </channel>
</rss>

