<?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 to Add Component to Assembly Based on Custom iProp in Inventor Programming Forum</title>
    <link>https://forums.autodesk.com/t5/inventor-programming-forum/ilogic-to-add-component-to-assembly-based-on-custom-iprop/m-p/6852969#M103486</link>
    <description>&lt;P&gt;&lt;STRONG&gt;1. How are you handling quantities, or is that irrelevant?&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;-&amp;gt; Since the rule iterates through each part, a duplicate part would be added to the assembly each time it encounters one.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;2. Do you use a lot of reference parts in your models&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;-&amp;gt;&amp;nbsp;We never use virtual parts, and to date, I have never seen any of our parts with a reference BOM structure.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;2a. Is it possible that reference parts will ALSO be CNC parts?&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;-&amp;gt; Looking into the future is impossible at this place, but I would guess probably not.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;3. How do you keep the parent and created assemblies linked?&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;-&amp;gt; The way this is set up, the rule would replace the CNC assembly each time the IDW is pushed into production.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;4. Are you just needing to create a parts list with all of the cnc parts?&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;-&amp;gt; The purpose of this is to create an assembly using only CNC parts for our 3D nesting &amp;amp; CNC programs to use. Our 3D nesting tool gives us an exclusion box, and we've come to find that we waste too&amp;nbsp;much time trying to accurately recognize what needs to be CNC'd. A&amp;nbsp;rule could be made to read our iProps that are being populated anyways.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;-&amp;gt; I'd like to figure out the first method first, but the view reps might work too.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Fri, 03 Feb 2017 19:14:32 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2017-02-03T19:14:32Z</dc:date>
    <item>
      <title>iLogic to Add Component to Assembly Based on Custom iProp</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-forum/ilogic-to-add-component-to-assembly-based-on-custom-iprop/m-p/6852188#M103484</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have spent a couple of days working on automating a couple of redundant tasks in an engineering workflow using inventor iLogic. At this point I'm stumped.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Here is my goal:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;From IDW:&lt;/P&gt;&lt;P&gt;-&amp;gt; Open first view assembly&lt;/P&gt;&lt;P&gt;-&amp;gt; Iterate through assembly finding all components with a custom "CNC" iProp&lt;/P&gt;&lt;P&gt;-&amp;gt; Open our assembly template&lt;/P&gt;&lt;P&gt;-&amp;gt; Save the blank template in our CNC folder&lt;/P&gt;&lt;P&gt;-&amp;gt; Add only parts with "CNC" iProp to the new CNC assembly&lt;/P&gt;&lt;P&gt;-&amp;gt; Save assembly and close&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Basically everything works so far (mostly a Frankenstein of code found on here, cheers to all unknown contributors) besides the line that actually adds the component.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I went this rout because since typically 5% of parts are CNC parts, it would be faster to create a new assembly then to save a copy and delete out all of the other parts.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thoughts appreciated.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Funnybus&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;If System.IO.File.Exists(oCNCPath &amp;amp; oCNCName) Then
	oFileCheck = MessageBox.Show(oCNCPath &amp;amp; oCNCName &amp;amp; " already exists." &amp;amp; vbLf &amp;amp; vbLf &amp;amp; "Do you want to replace it?", "Confirm Save As", MessageBoxButtons.YesNo, MessageBoxIcon.Exclamation)
		If oFileCheck = vbYes Then
			'CREATE CNC
		End If		
Else
	oOldDoc = ThisApplication.Documents.Open(oAsmTemp, False)
	Dim oNewPath As String= oCNCPath &amp;amp; oCNCName
	oOldDoc.saveas(oNewPath, True)
	oOldDoc.Close()
	Dim oNewDoc As AssemblyDocument = ThisApplication.Documents.Open(oNewPath, False)
	TraverseAssembly(oAsmDoc.ComponentDefinition.Occurrences, oNewDoc.ComponentDefinition.Occurrences, 1)
	oNewDoc.Close()
End If&lt;/PRE&gt;&lt;PRE&gt;Private Sub TraverseAssembly(oAssyDocOccurrences As ComponentOccurrences, oNewDocOccurrences As ComponentOccurrences, Level As Integer)

Dim oOcc As ComponentOccurrence
Dim oOccName As String
Dim oCNC As String

For Each oOcc In oAssyDocOccurrences
		Try
			oCNC = oOcc.Definition.Document.PropertySets.Item("Inventor User Defined Properties").Item("CNC").Value
				If oCNC = "CNC"
					oOccName = oOcc.Definition.Document.FullFileName
					MessageBox.Show(oOccName)
					oNewDocOccurrences.Add(oOccName)
				End If
		Catch
		'No Error
		End Try
	
		If oOcc.DefinitionDocumentType = kAssemblyDocumentObject Then
			Call TraverseAssembly(oOcc.SubOccurrences, oNewDocOccurrences, Level + 1)
		End If  
Next
	
End Sub&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 03 Feb 2017 14:53:09 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-forum/ilogic-to-add-component-to-assembly-based-on-custom-iprop/m-p/6852188#M103484</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2017-02-03T14:53:09Z</dc:date>
    </item>
    <item>
      <title>Re: iLogic to Add Component to Assembly Based on Custom iProp</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-forum/ilogic-to-add-component-to-assembly-based-on-custom-iprop/m-p/6852885#M103485</link>
      <description>&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;1. How are you handling quantities, or is that irrelevant?&lt;/P&gt;
&lt;P&gt;2. Do you use a lot of reference parts in your models&lt;/P&gt;
&lt;P&gt;2a. Is it possible that reference parts will ALSO be CNC parts?&lt;/P&gt;
&lt;P&gt;3. How do you keep the parent and created assemblies linked?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;4. Are you just needing to create a parts list with all of the cnc parts?&lt;/P&gt;
&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;-- If so, can I reccomend writing a rule to make a view rep of all of your cnc parts and then using a parts list filtered by view rep instead?&lt;/P&gt;</description>
      <pubDate>Fri, 03 Feb 2017 18:42:41 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-forum/ilogic-to-add-component-to-assembly-based-on-custom-iprop/m-p/6852885#M103485</guid>
      <dc:creator>MechMachineMan</dc:creator>
      <dc:date>2017-02-03T18:42:41Z</dc:date>
    </item>
    <item>
      <title>Re: iLogic to Add Component to Assembly Based on Custom iProp</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-forum/ilogic-to-add-component-to-assembly-based-on-custom-iprop/m-p/6852969#M103486</link>
      <description>&lt;P&gt;&lt;STRONG&gt;1. How are you handling quantities, or is that irrelevant?&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;-&amp;gt; Since the rule iterates through each part, a duplicate part would be added to the assembly each time it encounters one.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;2. Do you use a lot of reference parts in your models&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;-&amp;gt;&amp;nbsp;We never use virtual parts, and to date, I have never seen any of our parts with a reference BOM structure.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;2a. Is it possible that reference parts will ALSO be CNC parts?&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;-&amp;gt; Looking into the future is impossible at this place, but I would guess probably not.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;3. How do you keep the parent and created assemblies linked?&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;-&amp;gt; The way this is set up, the rule would replace the CNC assembly each time the IDW is pushed into production.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;4. Are you just needing to create a parts list with all of the cnc parts?&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;-&amp;gt; The purpose of this is to create an assembly using only CNC parts for our 3D nesting &amp;amp; CNC programs to use. Our 3D nesting tool gives us an exclusion box, and we've come to find that we waste too&amp;nbsp;much time trying to accurately recognize what needs to be CNC'd. A&amp;nbsp;rule could be made to read our iProps that are being populated anyways.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;-&amp;gt; I'd like to figure out the first method first, but the view reps might work too.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 03 Feb 2017 19:14:32 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-forum/ilogic-to-add-component-to-assembly-based-on-custom-iprop/m-p/6852969#M103486</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2017-02-03T19:14:32Z</dc:date>
    </item>
    <item>
      <title>Re: iLogic to Add Component to Assembly Based on Custom iProp</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-forum/ilogic-to-add-component-to-assembly-based-on-custom-iprop/m-p/6853088#M103487</link>
      <description>&lt;P&gt;Here is how I would set it up.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If you wrap everything in a class and assign a shared variable, you can use the shared var in multiple subs without having to pass it/share info.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;Class TempToShareVars
     Shared oNewAsm As Document

     Sub Main() 
         '  "Sub Main()" is what's ran first when you run the rule.
         'You want to assign oNewAsm doc here, but NOT redeclare it
         'ie oNewAsm = ThisApplication.Documents.Add(...)
    End Sub

   Sub TraverseHere()&lt;BR /&gt;       'Check iProps here&lt;BR /&gt;       'If iProp has cnc&lt;BR /&gt;          'oNewAsm.Occurrences.Add( oAsmYouTraversedTo)&lt;BR /&gt;   End Sub
 
   End Sub
End Class&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 03 Feb 2017 20:05:48 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-forum/ilogic-to-add-component-to-assembly-based-on-custom-iprop/m-p/6853088#M103487</guid>
      <dc:creator>MechMachineMan</dc:creator>
      <dc:date>2017-02-03T20:05:48Z</dc:date>
    </item>
    <item>
      <title>Re: iLogic to Add Component to Assembly Based on Custom iProp</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-forum/ilogic-to-add-component-to-assembly-based-on-custom-iprop/m-p/6853314#M103488</link>
      <description>&lt;P&gt;Awesome, have a good weekend. I'll let you know how it goes Monday. Thanks!&lt;/P&gt;</description>
      <pubDate>Fri, 03 Feb 2017 21:43:03 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-forum/ilogic-to-add-component-to-assembly-based-on-custom-iprop/m-p/6853314#M103488</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2017-02-03T21:43:03Z</dc:date>
    </item>
    <item>
      <title>Re: iLogic to Add Component to Assembly Based on Custom iProp</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-forum/ilogic-to-add-component-to-assembly-based-on-custom-iprop/m-p/6856028#M103489</link>
      <description>&lt;P&gt;Hey, here's my bit to this topic:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;Sub Main()
     Dim oDoc As Document = ThisApplication.ActiveDocument
     If oDoc.DocumentType &amp;lt;&amp;gt; DocumentTypeEnum.kAssemblyDocumentObject Then Exit Sub
     NewAsm = ThisApplication.Documents.Open("&lt;STRONG&gt;&lt;FONT color="#FF0000"&gt;TemplatePath&lt;/FONT&gt;&lt;/STRONG&gt;", False)
     SetUpMatrix()
     SearchAssy(oDoc)&lt;BR /&gt;     NewAsm.SaveAs("&lt;FONT color="#FF0000"&gt;&lt;STRONG&gt;NewAssyLocation&lt;/STRONG&gt;&lt;/FONT&gt;", False)&lt;BR /&gt;     NewAsm.Close()
End Sub

Private NewAsm As Document
Private oMatrix As Matrix

Private Sub SearchAssy(oDoc As AssemblyDocument)
     Dim oOcs As ComponentOccurrences = oDoc.ComponentDefinition.Occurrences
     If oOcs.Count = 0 Then Exit Sub
     For Each oOcc As ComponentOccurrence In oOcs&lt;BR /&gt;          If CheckiPro(oOcc) Then AddDoc(oOcc.Definition.Document)
          If oOcc.DefinitionDocumentType = kAssemblyDocumentObject Then
               SearchAssy(oOcc.Definition.Document)
          End If
     Next
End Sub

Private Function CheckiPro(oOcc As ComponentOccurrence) As Boolean
     Dim R As Boolean = False
     Try
          Dim oCNC As String = oOcc.Definition.Document.PropertySets.Item("Inventor User Defined Properties").Item("CNC").Expression
          If oCNC = "CNC" Then R = True
     Catch
     End Try
     Return R
End Function

Private Sub SetUpMatrix()
     Dim oTG As TransientGeometry = ThisApplication.TransientGeometry
     oMatrix = oTG.CreateMatrix
     Call oMatrix.SetToRotation(3.14159265358979 / 4, oTG.CreateVector(0, 0, 1), oTG.CreatePoint(0, 0, 0))
     Call oMatrix.SetTranslation(oTG.CreateVector(1, 2, 1), True)
End Sub

Private Sub AddDoc(oDoc As Document)
     Dim FName As String = oDoc.FullFileName
     NewAsm.ComponentDefinition.Occurrences.Add(FName, oMatrix)
End Sub&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 06 Feb 2017 07:18:05 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-forum/ilogic-to-add-component-to-assembly-based-on-custom-iprop/m-p/6856028#M103489</guid>
      <dc:creator>Owner2229</dc:creator>
      <dc:date>2017-02-06T07:18:05Z</dc:date>
    </item>
    <item>
      <title>Re: iLogic to Add Component to Assembly Based on Custom iProp</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-forum/ilogic-to-add-component-to-assembly-based-on-custom-iprop/m-p/6856654#M103490</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Would you mind explaining the purpose of&amp;nbsp;the matrix? Or rather how the function works? I assume this is where the added component would be placed. Does this work the same way as when shift-selecting multiple components to add to an assembly (where the parts are inserted cascaded)?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 06 Feb 2017 13:10:08 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-forum/ilogic-to-add-component-to-assembly-based-on-custom-iprop/m-p/6856654#M103490</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2017-02-06T13:10:08Z</dc:date>
    </item>
    <item>
      <title>Re: iLogic to Add Component to Assembly Based on Custom iProp</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-forum/ilogic-to-add-component-to-assembly-based-on-custom-iprop/m-p/6856860#M103491</link>
      <description>&lt;P&gt;The Matrix defines the position and rotation of the placed part.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;This rule, as I posted it, won't&amp;nbsp;add the parts cascaded, but rather just throw them all at one big pile in the new assembly (it can be changed if you wish).&lt;/P&gt;
&lt;P&gt;For every single occurrence it finds (with the CNC iProperty), it adds one occurrence to the new assembly.&lt;/P&gt;
&lt;P&gt;It could also be changed to not place them on one big pile, but one next to each other, or somewhere around.&lt;/P&gt;</description>
      <pubDate>Mon, 06 Feb 2017 14:26:48 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-forum/ilogic-to-add-component-to-assembly-based-on-custom-iprop/m-p/6856860#M103491</guid>
      <dc:creator>Owner2229</dc:creator>
      <dc:date>2017-02-06T14:26:48Z</dc:date>
    </item>
    <item>
      <title>Re: iLogic to Add Component to Assembly Based on Custom iProp</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-forum/ilogic-to-add-component-to-assembly-based-on-custom-iprop/m-p/6856904#M103492</link>
      <description>&lt;P&gt;You can see for yourself with this!&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;SyntaxEditor Code Snippet&lt;/P&gt;
&lt;PRE&gt;&lt;SPAN&gt;Sub&lt;/SPAN&gt; &lt;SPAN&gt;Main&lt;/SPAN&gt;&lt;SPAN&gt;()&lt;/SPAN&gt;    
    &lt;SPAN&gt;Dim&lt;/SPAN&gt; &lt;SPAN&gt;oTG&lt;/SPAN&gt; &lt;SPAN&gt;As&lt;/SPAN&gt; &lt;SPAN&gt;TransientGeometry&lt;/SPAN&gt; &lt;SPAN&gt;=&lt;/SPAN&gt; &lt;SPAN&gt;ThisApplication&lt;/SPAN&gt;&lt;SPAN&gt;.&lt;/SPAN&gt;&lt;SPAN&gt;TransientGeometry&lt;/SPAN&gt;
    
    &lt;SPAN&gt;Dim&lt;/SPAN&gt; &lt;SPAN&gt;oMatrix&lt;/SPAN&gt; &lt;SPAN&gt;As&lt;/SPAN&gt; &lt;SPAN&gt;Matrix&lt;/SPAN&gt;
    &lt;SPAN&gt;oMatrix&lt;/SPAN&gt; &lt;SPAN&gt;=&lt;/SPAN&gt; &lt;SPAN&gt;oTG&lt;/SPAN&gt;&lt;SPAN&gt;.&lt;/SPAN&gt;&lt;SPAN&gt;CreateMatrix&lt;/SPAN&gt;
    
    &lt;SPAN&gt;Call&lt;/SPAN&gt; &lt;SPAN&gt;oMatrix&lt;/SPAN&gt;&lt;SPAN&gt;.&lt;/SPAN&gt;&lt;SPAN&gt;SetToRotation&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;3.14159265358979&lt;/SPAN&gt; &lt;SPAN&gt;/&lt;/SPAN&gt; &lt;SPAN&gt;4&lt;/SPAN&gt;&lt;SPAN&gt;, &lt;/SPAN&gt;&lt;SPAN&gt;oTG&lt;/SPAN&gt;&lt;SPAN&g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t;/SPAN&gt;&amp;nbsp;&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;</description>
      <pubDate>Mon, 06 Feb 2017 14:37:00 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-forum/ilogic-to-add-component-to-assembly-based-on-custom-iprop/m-p/6856904#M103492</guid>
      <dc:creator>MechMachineMan</dc:creator>
      <dc:date>2017-02-06T14:37:00Z</dc:date>
    </item>
    <item>
      <title>Re: iLogic to Add Component to Assembly Based on Custom iProp</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-forum/ilogic-to-add-component-to-assembly-based-on-custom-iprop/m-p/6857450#M103493</link>
      <description>&lt;P&gt;Hi Mike,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I see in this chunk of code you posted, you are using global variables. Every time I had tried to do it without wrapping it in a class before, it failed. But I'm assuming so long as you put the variable declarations after Sub Main() it works fine?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Have you noticed any other caveats to doing this, or is the functionality the same as putting the variable at the top of a module within vba?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks in advance,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;BLOCKQUOTE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;BLOCKQUOTE&gt;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/3072914"&gt;@Owner2229&lt;/a&gt; wrote:&lt;BR /&gt;
&lt;P&gt;Hey, here's my bit to this topic:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;Sub Main()
     Dim oDoc As Document = ThisApplication.ActiveDocument
     If oDoc.DocumentType &amp;lt;&amp;gt; DocumentTypeEnum.kAssemblyDocumentObject Then Exit Sub
     NewAsm = ThisApplication.Documents.Open("&lt;STRONG&gt;&lt;FONT color="#FF0000"&gt;TemplatePath&lt;/FONT&gt;&lt;/STRONG&gt;", False)
     SetUpMatrix()
     SearchAssy(oDoc)&lt;BR /&gt;     NewAsm.SaveAs("&lt;FONT color="#FF0000"&gt;&lt;STRONG&gt;NewAssyLocation&lt;/STRONG&gt;&lt;/FONT&gt;", False)&lt;BR /&gt;     NewAsm.Close()
End Sub

Private NewAsm As Document
Private oMatrix As Matrix

Private Sub SearchAssy(oDoc As AssemblyDocument)
     Dim oOcs As ComponentOccurrences = oDoc.ComponentDefinition.Occurrences
     If oOcs.Count = 0 Then Exit Sub
     For Each oOcc As ComponentOccurrence In oOcs&lt;BR /&gt;          If CheckiPro(oOcc) Then AddDoc(oOcc.Definition.Document)
          If oOcc.DefinitionDocumentType = kAssemblyDocumentObject Then
               SearchAssy(oOcc.Definition.Document)
          End If
     Next
End Sub

Private Function CheckiPro(oOcc As ComponentOccurrence) As Boolean
     Dim R As Boolean = False
     Try
          Dim oCNC As String = oOcc.Definition.Document.PropertySets.Item("Inventor User Defined Properties").Item("CNC").Expression
          If oCNC = "CNC" Then R = True
     Catch
     End Try
     Return R
End Function

Private Sub SetUpMatrix()
     Dim oTG As TransientGeometry = ThisApplication.TransientGeometry
     oMatrix = oTG.CreateMatrix
     Call oMatrix.SetToRotation(3.14159265358979 / 4, oTG.CreateVector(0, 0, 1), oTG.CreatePoint(0, 0, 0))
     Call oMatrix.SetTranslation(oTG.CreateVector(1, 2, 1), True)
End Sub

Private Sub AddDoc(oDoc As Document)
     Dim FName As String = oDoc.FullFileName
     NewAsm.ComponentDefinition.Occurrences.Add(FName, oMatrix)
End Sub&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 06 Feb 2017 17:45:19 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-forum/ilogic-to-add-component-to-assembly-based-on-custom-iprop/m-p/6857450#M103493</guid>
      <dc:creator>MechMachineMan</dc:creator>
      <dc:date>2017-02-06T17:45:19Z</dc:date>
    </item>
    <item>
      <title>Re: iLogic to Add Component to Assembly Based on Custom iProp</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-forum/ilogic-to-add-component-to-assembly-based-on-custom-iprop/m-p/6858071#M103494</link>
      <description>&lt;P&gt;Hey Justin, it's exactly as you wrote. As long as it is after the Sub Main, it'll work. It's just iLogic speciality...&lt;/P&gt;
&lt;P&gt;Also the functionality is the same as in VBA, aka "Public" or "Shared" is shareable among modules/classes, while "Private" isn't (it's still shared, but only among the class/module it is inside of).&lt;/P&gt;
&lt;P&gt;So just in case someone ends up using my samples in a bigger code&amp;nbsp;with something else, I want the variables to be safe to use and not cause any errors, thus "Private".&lt;/P&gt;
&lt;P&gt;Also, if you don't want the variable to be somehow, somewhere to be changed (it might happen by a&amp;nbsp;mistake in the code and you won't even notice, as it doesn't break the functionality much otherwise), it's a good practise to use &lt;STRONG&gt;Constant&lt;/STRONG&gt;, e.g.:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;Private Const Diameter As Double = 0.25&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I hope it makes sense as I've described it.&lt;/P&gt;</description>
      <pubDate>Mon, 06 Feb 2017 21:00:59 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-forum/ilogic-to-add-component-to-assembly-based-on-custom-iprop/m-p/6858071#M103494</guid>
      <dc:creator>Owner2229</dc:creator>
      <dc:date>2017-02-06T21:00:59Z</dc:date>
    </item>
    <item>
      <title>Re: iLogic to Add Component to Assembly Based on Custom iProp</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-forum/ilogic-to-add-component-to-assembly-based-on-custom-iprop/m-p/6858141#M103495</link>
      <description>&lt;P&gt;Out of curiosity, had you come across this through some Autodesk resource, or was it more of a trial &amp;amp; error discovery?&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Wondering if I'm maybe missing a resource or 2 in my collection..&lt;/P&gt;</description>
      <pubDate>Mon, 06 Feb 2017 21:11:50 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-forum/ilogic-to-add-component-to-assembly-based-on-custom-iprop/m-p/6858141#M103495</guid>
      <dc:creator>MechMachineMan</dc:creator>
      <dc:date>2017-02-06T21:11:50Z</dc:date>
    </item>
    <item>
      <title>Re: iLogic to Add Component to Assembly Based on Custom iProp</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-forum/ilogic-to-add-component-to-assembly-based-on-custom-iprop/m-p/6859007#M103496</link>
      <description>&lt;P&gt;I've read it somewhere, but I can't remember whether it was an tutorial or just something here on forum.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Anyway, here is some nice reading for long winter nights. You might know (some of) them.&lt;/P&gt;
&lt;P&gt;&lt;A href="https://knowledge.autodesk.com/support/inventor-products/learn-explore/caas/CloudHelp/cloudhelp/2015/ENU/Inventor-Help/files/GUID-8DF6F761-1634-4D26-B13A-58AF275FD6F8-htm.html" target="_self"&gt;knowledge.autodesk.com/support/inventor-products/learn-explore/...&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&lt;A href="http://inventortrenches.blogspot.nl/p/inventor-tutorials.html" target="_self"&gt;http://inventortrenches.blogspot.nl/p/inventor-tutorials.html&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&lt;A href="http://modthemachine.typepad.com/my_weblog/ilogic/" target="_self"&gt;http://modthemachine.typepad.com/my_weblog/ilogic/&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Also I would suggest you looking into AddIns, if you haven't yet. It'll give you more options and control over Inventor:&lt;/P&gt;
&lt;P&gt;&lt;A href="http://modthemachine.typepad.com/files/VBAtoAddIn.pdf" target="_self"&gt;http://modthemachine.typepad.com/files/VBAtoAddIn.pdf&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&lt;A href="http://usa.autodesk.com/adsk/servlet/index?siteID=123112&amp;amp;id=17324828" target="_self"&gt;http://usa.autodesk.com/adsk/servlet/index?siteID=123112&amp;amp;id=17324828&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Here is a pre-made addin, all you need to do is set up your Visual Studio (or other) and build it (compile):&lt;/P&gt;
&lt;P&gt;&lt;A href="https://forums.autodesk.com/t5/inventor-customization/sample-code-for-inventor-add-in-dll-for-vb-net/m-p/6270002#M63162" target="_self"&gt;https://forums.autodesk.com/t5/inventor-customization/sample-code-for-inventor-add-in-dll-for-vb-net/m-p/6270002#M63162&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Where to place it:&lt;/P&gt;
&lt;P&gt;&lt;A href="https://forums.autodesk.com/t5/inventor-customization/where-to-place-inventor-addin/td-p/3314019" target="_self"&gt;https://forums.autodesk.com/t5/inventor-customization/where-to-place-inventor-addin/td-p/3314019&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;How to debug:&lt;/P&gt;
&lt;P&gt;&lt;A href="http://m.arch-pub.com/Debug-Inventor-Addin-Inventor-2015-Visual-Studio-Enterprise-2015_10780034.html" target="_self"&gt;http://m.arch-pub.com/Debug-Inventor-Addin-Inventor-2015-Visual-Studio-Enterprise-2015_10780034.html&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Other useful resources for AddIns:&lt;/P&gt;
&lt;P&gt;&lt;A href="http://spiderinnet2.typepad.com/blog/" target="_self"&gt;http://spiderinnet2.typepad.com/blog/&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&lt;A href="http://spiderinnet2.typepad.com/blog/2012/07/inventor-net-find-all-the-control-definitions-1.html" target="_self"&gt;http://spiderinnet2.typepad.com/blog/2012/07/inventor-net-find-all-the-control-definitions-1.html&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&lt;A href="http://spiderinnet2.typepad.com/blog/2012/06/inventor-net-find-all-ribbon-tab-names.html" target="_self"&gt;http://spiderinnet2.typepad.com/blog/2012/06/inventor-net-find-all-ribbon-tab-names.html&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&lt;A href="http://spiderinnet2.typepad.com/blog/2012/06/inventor-net-find-all-ribbon-commandbar-names.html" target="_self"&gt;http://spiderinnet2.typepad.com/blog/2012/06/inventor-net-find-all-ribbon-commandbar-names.html&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;Also, sorry for spaming on your post&amp;nbsp;&lt;A id="link_22827fbf22217f" class="lia-link-navigation lia-page-link lia-user-name-link" href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/2278454" target="_self"&gt;&lt;SPAN class=""&gt;gfunnybus&lt;/SPAN&gt;&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 07 Feb 2017 06:44:18 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-forum/ilogic-to-add-component-to-assembly-based-on-custom-iprop/m-p/6859007#M103496</guid>
      <dc:creator>Owner2229</dc:creator>
      <dc:date>2017-02-07T06:44:18Z</dc:date>
    </item>
    <item>
      <title>Re: iLogic to Add Component to Assembly Based on Custom iProp</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-forum/ilogic-to-add-component-to-assembly-based-on-custom-iprop/m-p/6860435#M103497</link>
      <description>&lt;P&gt;No problem, this is all good information to me!&lt;/P&gt;</description>
      <pubDate>Tue, 07 Feb 2017 17:24:29 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-forum/ilogic-to-add-component-to-assembly-based-on-custom-iprop/m-p/6860435#M103497</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2017-02-07T17:24:29Z</dc:date>
    </item>
  </channel>
</rss>

