<?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 external rule Inventor 2013 - Find Component Place into a New .iam in Inventor Programming - iLogic, Macros, AddIns &amp; Apprentice</title>
    <link>https://forums.autodesk.com/t5/inventor-programming-ilogic/ilogic-external-rule-inventor-2013-find-component-place-into-a/m-p/5891196#M59612</link>
    <description>&lt;P&gt;I'm still trying to get this one to work.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;It says that "Let" and "Set" is no longer supported.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am working with Inventor 2013&lt;/P&gt;</description>
    <pubDate>Tue, 03 Nov 2015 20:57:46 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2015-11-03T20:57:46Z</dc:date>
    <item>
      <title>iLogic external rule Inventor 2013 - Find Component Place into a New .iam</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-ilogic/ilogic-external-rule-inventor-2013-find-component-place-into-a/m-p/5864717#M59199</link>
      <description>&lt;P&gt;Hello everyone!!!&amp;nbsp; I posted this exact question in, what I think, the&amp;nbsp;wrong section of this forum.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am trying to write a rule that will allow me to "Find Component" by "Part Number" of an assembly and place them in another assembly.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Example: I have Part 1,2,3,4 etc.... &amp;nbsp;and that part might have many different features on it (Part 1.1, Part 1.2, Part 2.1, Part 2.2, Part 3.1 etc...)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I need all&amp;nbsp;"Part 1's"&amp;nbsp;to go in to an assembly and all "Part 2's" in&amp;nbsp;separate assembly and so on,&amp;nbsp;so that I can reference the new Part 1.iam for a fab table.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Any help would be greatly appreciated.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you,&lt;/P&gt;&lt;P&gt;Dylan Stewart&lt;/P&gt;</description>
      <pubDate>Fri, 16 Oct 2015 13:36:45 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-ilogic/ilogic-external-rule-inventor-2013-find-component-place-into-a/m-p/5864717#M59199</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2015-10-16T13:36:45Z</dc:date>
    </item>
    <item>
      <title>Re: iLogic external rule Inventor 2013 - Find Component Place into a New .iam</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-ilogic/ilogic-external-rule-inventor-2013-find-component-place-into-a/m-p/5865234#M59205</link>
      <description>&lt;P&gt;I apologize, I forgot to mention that I am not working with parameters. I am only working with custom iProperties.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 16 Oct 2015 17:54:32 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-ilogic/ilogic-external-rule-inventor-2013-find-component-place-into-a/m-p/5865234#M59205</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2015-10-16T17:54:32Z</dc:date>
    </item>
    <item>
      <title>Re: iLogic external rule Inventor 2013 - Find Component Place into a New .iam</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-ilogic/ilogic-external-rule-inventor-2013-find-component-place-into-a/m-p/5873384#M59315</link>
      <description>&lt;P&gt;I am beginning to wonder if this is even possible? Seems simple enough (for someone who has iLogic and coding experience) but I just can't seem to figure out how to access the 'Find Component' feature and I have yet to see anything on how to create a new assembly with a macro.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;My thought process is this; If you can click a button to make it happen, then you should be able to automate it, correct?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 22 Oct 2015 13:41:35 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-ilogic/ilogic-external-rule-inventor-2013-find-component-place-into-a/m-p/5873384#M59315</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2015-10-22T13:41:35Z</dc:date>
    </item>
    <item>
      <title>Re: iLogic external rule Inventor 2013 - Find Component Place into a New .iam</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-ilogic/ilogic-external-rule-inventor-2013-find-component-place-into-a/m-p/5873454#M59317</link>
      <description>&lt;P&gt;This code will partially do what you want, based upon the assumption that the browser nodes in your assembly are the same as the part number (which they usually are by default):&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;If you can&amp;nbsp;create a simple vba userform with a textbox and button within the VBA editor, then insert this code into the button click action.&lt;/P&gt;&lt;P&gt;This code will look through all levels of the assembly and DELETES ALL&amp;nbsp;the components it comes across that DO NOT MATCH what was typed into the textbox. So I would advise saving or creating a copy of the assembly you want to purge before doing anything further.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;hopefully this will be of some use to you, or at least give you a starting point as I haven't had a huge amount of time to debug this thoroughly.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Private Sub CommandButton1_Click()&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; ' Get the active assembly.&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Dim oAsmDoc As AssemblyDocument&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Set oAsmDoc = ThisApplication.ActiveDocument&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; ' Get the assembly component definition.&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Dim oAsmDef As AssemblyComponentDefinition&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Set oAsmDef = oAsmDoc.ComponentDefinition&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; ' Get all of the leaf occurrences of the assembly.&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Dim oLeafOccs As ComponentOccurrencesEnumerator&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Set oLeafOccs = oAsmDef.Occurrences.AllLeafOccurrences&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; ' Iterate through the occurrences and print the name.&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Dim oOcc As ComponentOccurrence&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; For Each oOcc In oLeafOccs&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 'Delete the&amp;nbsp;parts that don't match&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Dim oName As String&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Dim strOrig As String&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Dim Ref1 As String&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Dim L As Integer&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; strOrig = oOcc.name&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Ref1 = Left(strOrig, InStr(strOrig, ":"))&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; L = Len(Ref1) - 1&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; If Ref1 &amp;lt;&amp;gt; TextBox1.Text &amp;amp; ":" Then&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;BR /&gt;&amp;nbsp;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; oOcc.Delete&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; End If&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Next&lt;BR /&gt;End Sub&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>Thu, 22 Oct 2015 14:14:52 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-ilogic/ilogic-external-rule-inventor-2013-find-component-place-into-a/m-p/5873454#M59317</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2015-10-22T14:14:52Z</dc:date>
    </item>
    <item>
      <title>Re: iLogic external rule Inventor 2013 - Find Component Place into a New .iam</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-ilogic/ilogic-external-rule-inventor-2013-find-component-place-into-a/m-p/5874679#M59325</link>
      <description>&lt;P&gt;Hi, try this one:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;Dim oDoc As Document = ThisApplication.ActiveDocument
If Not oDoc.DocumentType = DocumentTypeEnum.kAssemblyDocumentObject Then
	MsgBox("This rule is for assembly only.")
	Exit Sub
End If
OrigASM = ThisDoc.PathAndFileName(True)
SearchedPart = iProperties.Value("Project", "Part Number")
SearchedPart = InputBox("Please insert prefix of searched parts", "Prefix", DXFName)
If SearchedPart = vbNullString Then
	Exit Sub
End If
NewName = ThisDoc.FileName(False) &amp;amp; " " &amp;amp; iProperties.Value("Project", "Description")
NewName = InputBox("Please insert new number and name for first new assembly", "New ASM name", DXFName)
If NewName = vbNullString Then
	Exit Sub
End If
NewName1 = ThisDoc.FileName(False) &amp;amp; " " &amp;amp; iProperties.Value("Project", "Description")
NewName1 = InputBox("Please insert new number and name for second new assembly", "New ASM name", DXFName)
If NewName1 = vbNullString Then
	Exit Sub
End If
Dim oPath As String = ThisDoc.Path
q1 = MessageBox.Show("Copy to the same location?", "Location",MessageBoxButtons.YesNo)
If q1 = vbNo Then
	Dim dialog1 = New System.Windows.Forms.FolderBrowserDialog()
	dialog1.SelectedPath = oPath
        dialog1.ShowNewFolderButton = True
	If System.Windows.Forms.DialogResult.OK = dialog1.ShowDialog() Then
		oPath = dialog1.SelectedPath
	Else
		MsgBox("No folder selected. Copiyng canceled.")
		Exit Sub
	End If
End If
oPath = oPath &amp;amp; "\"
If oPath = vbNullString Then
	Exit Sub
End If
oDoc.SaveAs(oPath &amp;amp; NewName &amp;amp; ".iam", True)
pDoc = ThisApplication.Documents.Open(oPath &amp;amp; NewName &amp;amp; ".iam")
oDoc = pDoc
Dim acd As ComponentOccurrencesEnumerator = oDoc.ComponentDefinition.Occurrences.AllLeafOccurrences
Dim Occ As ComponentOccurrence
Dim compCount As Integer = oDoc.AllReferencedDocuments.Count * 2
Dim oResult As String
Dim FNamePos As Long
Dim docFName As String
Dim oProgressBar As Inventor.ProgressBar = ThisApplication.CreateProgressBar(False, compCount, "Copiyng assembly", True)
Amount = 100 / compCount
Progress = 0
For Each Occ in acd
	ModelFileName = Occ.Name
	FNamePos = InStrRev(ModelFileName, "\", - 1)
	docFName = Mid(ModelFileName, FNamePos + 1, Len(ModelFileName) - FNamePos)
	oResult = Left(docFName, Len(SearchedPart))
	If oResult &amp;lt;&amp;gt; SearchedPart Then
		Occ.Delete
	End If
	Progress = Progress + 1
	oProgressBar.Message = ("Completed: " &amp;amp; Round(Progress * Amount) &amp;amp; "/" &amp;amp; "100%")
	oProgressBar.UpdateProgress
Next
pDoc = ThisApplication.Documents.Open(OrigASM)
oDoc = pDoc
oDoc.SaveAs(oPath &amp;amp; NewName1 &amp;amp; ".iam", False)
acd = oDoc.ComponentDefinition.Occurrences.AllLeafOccurrences
compCount = oDoc.AllReferencedDocuments.Count
For Each Occ in acd
	ModelFileName = Occ.Name
	FNamePos = InStrRev(ModelFileName, "\", - 1)
	docFName = Mid(ModelFileName, FNamePos + 1, Len(ModelFileName) - FNamePos)
	oResult = Left(docFName, Len(SearchedPart))
        If oResult = SearchedPart Then
		Occ.Delete
        End If
	Progress = Progress + 1
	oProgressBar.Message = ("Completed: " &amp;amp; Round(Progress * Amount) &amp;amp; "/" &amp;amp; "100%")
	oProgressBar.UpdateProgress
Next
oProgressBar.Close&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 23 Oct 2015 06:38:28 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-ilogic/ilogic-external-rule-inventor-2013-find-component-place-into-a/m-p/5874679#M59325</guid>
      <dc:creator>Owner2229</dc:creator>
      <dc:date>2015-10-23T06:38:28Z</dc:date>
    </item>
    <item>
      <title>Re: iLogic external rule Inventor 2013 - Find Component Place into a New .iam</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-ilogic/ilogic-external-rule-inventor-2013-find-component-place-into-a/m-p/5891042#M59609</link>
      <description>&lt;P&gt;This code seems to be the start of EXACTLY what I am looking for.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;However, All this does at the moment is take an existing assembly and copy and paste it in a new assembly.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I would like to pick and choose which parts go in to the new assembly.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am also getting these error messages.&lt;/P&gt;&lt;P&gt;{&lt;/P&gt;&lt;P&gt;Error in rule: Find And Place Stock Numbers In IAM, in document: BRAKE METAL.iam&lt;/P&gt;&lt;P&gt;Public member 'ComponenetDefinition' on type '_DocumentClass' not found.&lt;/P&gt;&lt;P&gt;}&lt;/P&gt;&lt;P&gt;More Info&lt;/P&gt;&lt;P&gt;{&lt;/P&gt;&lt;P&gt;System.MissingMemberException: Public member 'ComponenetDefinition' on type '_DocumentClass' not found.&lt;/P&gt;&lt;P&gt;at Microsoft.VisualBasic.CompilerServices.LateBinding.LateGet(Object o, Type objType, String name, Object[] args, String[] paramnames, Boolean[] CopyBack)&lt;/P&gt;&lt;P&gt;at LmiRuleScript.Main()&lt;/P&gt;&lt;P&gt;at Autodesk.iLogic.Exec.AppDomExec.ExecRuleInAssembly(Assembly assem)&lt;/P&gt;&lt;P&gt;at iLogic.RuleEvalContainer.ExecRuleEval(String execRule)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;}&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Could I possibly get some comments on the code to show me exactly what it is doing?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Again,&lt;/P&gt;&lt;P&gt;Thank you so much for your help.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 03 Nov 2015 19:25:08 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-ilogic/ilogic-external-rule-inventor-2013-find-component-place-into-a/m-p/5891042#M59609</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2015-11-03T19:25:08Z</dc:date>
    </item>
    <item>
      <title>Re: iLogic external rule Inventor 2013 - Find Component Place into a New .iam</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-ilogic/ilogic-external-rule-inventor-2013-find-component-place-into-a/m-p/5891196#M59612</link>
      <description>&lt;P&gt;I'm still trying to get this one to work.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;It says that "Let" and "Set" is no longer supported.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am working with Inventor 2013&lt;/P&gt;</description>
      <pubDate>Tue, 03 Nov 2015 20:57:46 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-ilogic/ilogic-external-rule-inventor-2013-find-component-place-into-a/m-p/5891196#M59612</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2015-11-03T20:57:46Z</dc:date>
    </item>
    <item>
      <title>Re: iLogic external rule Inventor 2013 - Find Component Place into a New .iam</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-ilogic/ilogic-external-rule-inventor-2013-find-component-place-into-a/m-p/5891292#M59613</link>
      <description>&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Hi DStewartRG3E7,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Concerning the "Set" issue, see this link:&lt;/P&gt;
&lt;P&gt;&lt;A href="http://adndevblog.typepad.com/manufacturing/2015/11/convert-vba-to-net-ilogic.html" target="_blank"&gt;http://adndevblog.typepad.com/manufacturing/2015/11/convert-vba-to-net-ilogic.html&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I hope this helps.&lt;BR /&gt;Best of luck to you in all of your Inventor pursuits,&lt;BR /&gt;Curtis&lt;BR /&gt;&lt;A href="http://inventortrenches.blogspot.com" target="_blank"&gt;http://inventortrenches.blogspot.com&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 03 Nov 2015 21:52:19 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-ilogic/ilogic-external-rule-inventor-2013-find-component-place-into-a/m-p/5891292#M59613</guid>
      <dc:creator>Curtis_Waguespack</dc:creator>
      <dc:date>2015-11-03T21:52:19Z</dc:date>
    </item>
    <item>
      <title>Re: iLogic external rule Inventor 2013 - Find Component Place into a New .iam</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-ilogic/ilogic-external-rule-inventor-2013-find-component-place-into-a/m-p/5891631#M59618</link>
      <description>&lt;P&gt;Hi, do you have some other code in your rule besides what I posted above? Because this rule works fine for me and without any errors.&lt;/P&gt;&lt;P&gt;You can&amp;nbsp;try to recopy the rule again, because it says it can't find&amp;nbsp;&lt;SPAN&gt;'&lt;STRONG&gt;&lt;FONT color="#FF0000"&gt;ComponenetDefinition&lt;/FONT&gt;&lt;/STRONG&gt;' but in the rule it should use '&lt;FONT color="#0000FF"&gt;&lt;STRONG&gt;ComponentDefinition&lt;/STRONG&gt;&lt;/FONT&gt;'. You have there one extra '&lt;FONT color="#FF0000"&gt;&lt;STRONG&gt;E&lt;/STRONG&gt;&lt;/FONT&gt;'.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;You wanted to copy parts picked by theyr prefix, didn't you? That's what this rule should do...&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;First it asks for prefix (&lt;/SPAN&gt;"&lt;FONT color="#0000FF"&gt;Please insert prefix of searched parts&lt;/FONT&gt;"),&lt;/P&gt;&lt;P&gt;then for the names of first ("&lt;FONT color="#0000FF"&gt;Please insert new number and name for first new assembly&lt;/FONT&gt;")&lt;/P&gt;&lt;P&gt;and second ("&lt;FONT color="#0000FF"&gt;Please insert new number and name for second new assembly&lt;/FONT&gt;") assembly&lt;/P&gt;&lt;P&gt;and finaly for the location&amp;nbsp;of new assemblies&amp;nbsp;("&lt;FONT color="#0000FF"&gt;Copy to the same location?&lt;/FONT&gt;").&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I was testing it, so it should work.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;E.g.: You have folowing parts:&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;001A&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;001B&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;002A&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;002B&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;003A&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;You want to make new assembly with all parts '001...', so you write '001' when it asks for prefix&lt;/P&gt;&lt;P&gt;and it will create one new assembly with parts&amp;nbsp;&lt;STRONG&gt;001A&lt;/STRONG&gt;&amp;nbsp;and&amp;nbsp;&lt;STRONG&gt;001B&lt;/STRONG&gt;,&lt;/P&gt;&lt;P&gt;and second assembly with parts&amp;nbsp;&lt;STRONG&gt;002A&lt;/STRONG&gt;,&amp;nbsp;&lt;STRONG&gt;002B&lt;/STRONG&gt;&amp;nbsp;and&amp;nbsp;&lt;STRONG&gt;003A&lt;/STRONG&gt;.&lt;/P&gt;</description>
      <pubDate>Wed, 04 Nov 2015 05:11:58 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-ilogic/ilogic-external-rule-inventor-2013-find-component-place-into-a/m-p/5891631#M59618</guid>
      <dc:creator>Owner2229</dc:creator>
      <dc:date>2015-11-04T05:11:58Z</dc:date>
    </item>
    <item>
      <title>Re: iLogic external rule Inventor 2013 - Find Component Place into a New .iam</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-ilogic/ilogic-external-rule-inventor-2013-find-component-place-into-a/m-p/5894252#M59666</link>
      <description>I see, but I am still having some issues.&lt;BR /&gt;Perhaps I was not very clear in exactly what I was looking for, and for that I apologize.&lt;BR /&gt;&lt;BR /&gt;Here is what a typical BOM will look like for me.&lt;BR /&gt;&lt;BR /&gt;| MARK NO. | QTY | LENGTH | Stock Number | Part Number |&lt;BR /&gt;---------------------------------------------------------------------------------------&lt;BR /&gt;| M1001 | 4 | 100" | RUCW3003 | Metal Bracket |&lt;BR /&gt;| M1002 | 3 | 60" | RUCW3003 | Metal Bracket |&lt;BR /&gt;| M1003 | 8 | 75" | RUCW3003 | Metal Bracket |&lt;BR /&gt;| C1001 | 10 | 12" | RUCW4040 | Channel |&lt;BR /&gt;| C1002 | 25 | 10" | RUCW4040 | Channel |&lt;BR /&gt;| G1001 | 15 | 35" | UCW6062 | Gasket |&lt;BR /&gt;| G1002 | 15 | 30" | UCW6062 | Gasket |&lt;BR /&gt;&lt;BR /&gt;And so on and so on.....&lt;BR /&gt;&lt;BR /&gt;So what I would like to have happen is find ALL RUCW (from a list or ?library?) to add in to the program.&lt;BR /&gt;&lt;BR /&gt;So instead of using the Find Component feature on Inventor 2013 and navigating in 'SEARCH FOR' - Stock Number and typing RUCW3003, RUCW5689, RUCW9742 etc etc......&lt;BR /&gt;-then waiting on the program to find all of those and high light them so that I can right click and copy and open up a new iam and then right click paste....&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Thu, 05 Nov 2015 14:44:45 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-ilogic/ilogic-external-rule-inventor-2013-find-component-place-into-a/m-p/5894252#M59666</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2015-11-05T14:44:45Z</dc:date>
    </item>
    <item>
      <title>Re: iLogic external rule Inventor 2013 - Find Component Place into a New .iam</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-ilogic/ilogic-external-rule-inventor-2013-find-component-place-into-a/m-p/5895713#M59687</link>
      <description>&lt;P&gt;You can use this to add ALL parts from one directory selected by &lt;STRONG&gt;prefix&lt;/STRONG&gt;&amp;nbsp;to your currently opened assembly:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;Imports System.IO
Imports System.IO.File
Sub Main
    Dim oDoc As Document = ThisApplication.ActiveDocument
    If Not oDoc.DocumentType = DocumentTypeEnum.kAssemblyDocumentObject Then
        MsgBox("This rule is for assembly only.")
        Exit Sub
    End If&lt;BR /&gt;    &lt;STRONG&gt;&lt;FONT color="#0000FF"&gt;'You can change this line to match your location if you have all files in one folder&lt;/FONT&gt;&lt;/STRONG&gt;
    &lt;FONT color="#0000FF"&gt;&lt;STRONG&gt;'Otherwise it will be used as initial folder for folder search&lt;/STRONG&gt;&lt;/FONT&gt;&lt;BR /&gt;    oPath = "&lt;STRONG&gt;&lt;FONT color="#FF0000"&gt;C:\FolderContainingAllParts&lt;/FONT&gt;&lt;/STRONG&gt;"&lt;BR /&gt;    &lt;STRONG&gt;&lt;FONT color="#0000FF"&gt;'Or you can use this to select the folder, delete it if not needed&lt;BR /&gt;&lt;/FONT&gt;    &lt;/STRONG&gt;&lt;FONT color="#FF0000"&gt;Dim dialog1 = New System.Windows.Forms.FolderBrowserDialog()&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT color="#FF0000"&gt;    dialog1.SelectedPath = oPath&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT color="#FF0000"&gt;    dialog1.ShowNewFolderButton = True&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT color="#FF0000"&gt;    If System.Windows.Forms.DialogResult.OK = dialog1.ShowDialog() Then&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT color="#FF0000"&gt;        oPath = dialog1.SelectedPath&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT color="#FF0000"&gt;    Else&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT color="#FF0000"&gt;        MsgBox("No folder selected. Copiyng canceled.")&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT color="#FF0000"&gt;        Exit Sub&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT color="#FF0000"&gt;    End If&lt;/FONT&gt;&lt;BR /&gt;    If Not System.IO.Directory.Exists(oPath) Then
        MsgBox("Folder doesn't exist")
    End If
    SearchedPart = InputBox("Please insert prefix of searched parts", "Prefix", DXFName)
    If SearchedPart = vbNullString Then
        Exit Sub
    End If
    Dim oFile As String&lt;BR /&gt;    &lt;FONT color="#0000FF"&gt;&lt;STRONG&gt;'It will only look for parts, as there is "*.ipt" at the end&lt;/STRONG&gt;&lt;/FONT&gt;
    For Each oFile In System.IO.Directory.EnumerateFiles(oPath, SearchedPart &amp;amp; "&lt;STRONG&gt;&lt;FONT color="#FF0000"&gt;*.ipt&lt;/FONT&gt;&lt;/STRONG&gt;")
        AddOccurrence(oFile)
    Next
End Sub

Public Sub AddOccurrence(oPartToAdd As String)
    Dim oDoc As Document = ThisApplication.ActiveDocument
    Dim oAsmCompDef As AssemblyComponentDefinition = oDoc.ComponentDefinition
    Dim oTG As TransientGeometry = ThisApplication.TransientGeometry
    Dim oMatrix As Matrix = oTG.CreateMatrix
    Call oMatrix.SetToRotation(3.14159265358979 / 4, _
        oTG.CreateVector(0, 0, 1), oTG.CreatePoint(0, 0, 0))
    Call oMatrix.SetTranslation(oTG.CreateVector(3, 2, 1))
    Dim oOcc As ComponentOccurrence
    oOcc = oAsmCompDef.Occurrences.Add(oPartToAdd, oMatrix)
End Sub&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 06 Nov 2015 07:06:35 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-ilogic/ilogic-external-rule-inventor-2013-find-component-place-into-a/m-p/5895713#M59687</guid>
      <dc:creator>Owner2229</dc:creator>
      <dc:date>2015-11-06T07:06:35Z</dc:date>
    </item>
    <item>
      <title>Re: iLogic external rule Inventor 2013 - Find Component Place into a New .iam</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-ilogic/ilogic-external-rule-inventor-2013-find-component-place-into-a/m-p/5899885#M59760</link>
      <description>&lt;P&gt;Could you possibly attach some examples of what you are using?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I feel like this should work for me, but not sure if I am explainging myself clear enough.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you so much for your help!!!&lt;/P&gt;</description>
      <pubDate>Mon, 09 Nov 2015 19:20:11 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-ilogic/ilogic-external-rule-inventor-2013-find-component-place-into-a/m-p/5899885#M59760</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2015-11-09T19:20:11Z</dc:date>
    </item>
    <item>
      <title>Re: iLogic external rule Inventor 2013 - Find Component Place into a New .iam</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-ilogic/ilogic-external-rule-inventor-2013-find-component-place-into-a/m-p/5900723#M59780</link>
      <description>&lt;P&gt;Hi, here is an example:&lt;/P&gt;&lt;P&gt;I have these files in the folder from which I want to load all files which start with "PC-0246":&lt;/P&gt;&lt;P&gt;&lt;IMG src="https://forums.autodesk.com/t5/image/serverpage/image-id/199619i0AD8E734C87A0C2E/image-size/medium?v=mpbl-1&amp;amp;px=-1" border="0" alt="01.jpg" title="01.jpg" /&gt;&lt;/P&gt;&lt;P&gt;So when I start the rule from new, empty assembly, I first select the folder in which I have these parts and then I write in "PC-0246":&lt;/P&gt;&lt;P&gt;&lt;IMG src="https://forums.autodesk.com/t5/image/serverpage/image-id/199620i3E75DBA3B70CBD80/image-size/large?v=mpbl-1&amp;amp;px=-1" border="0" alt="01.jpg" title="01.jpg" align="left" /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&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;&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;&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;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;And now I have all these parts in the assembly, just like I wanted:&lt;/P&gt;&lt;P&gt;&lt;IMG src="https://forums.autodesk.com/t5/image/serverpage/image-id/199621i3FCFE1A30133A6F4/image-size/original?v=mpbl-1&amp;amp;px=-1" border="0" alt="01.jpg" title="01.jpg" /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;If you are looking for parts by iProperties then we can alter the rule to look at them instead.&lt;/STRONG&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 10 Nov 2015 10:08:53 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-ilogic/ilogic-external-rule-inventor-2013-find-component-place-into-a/m-p/5900723#M59780</guid>
      <dc:creator>Owner2229</dc:creator>
      <dc:date>2015-11-10T10:08:53Z</dc:date>
    </item>
    <item>
      <title>Re: iLogic external rule Inventor 2013 - Find Component Place into a New .iam</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-ilogic/ilogic-external-rule-inventor-2013-find-component-place-into-a/m-p/5901230#M59788</link>
      <description>&lt;P&gt;I think I am starting to understand why this isn't working for me.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;In my model browser, none of my parts say .ipt&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Yes, I am trying to search for 'Stock Number' through the iProperties.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Do I have to have a blank assembly already open? I was hoping to maybe have my massive assembly open and be able to type in as follows...&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;RUCW1234, RUCW9999, RUCW9876, RUCW5555 and so on...... (There are TONS of these numbers...)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Now that I have all the 'Stock Numbers' picked out that I want in my new assembly from my old assembly, I would like the option to save the new assembly as a name of my choosing.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Once I have this part of the rule done, there are many more steps I would like to take.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I really appreciate your help!!!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 10 Nov 2015 15:08:43 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-ilogic/ilogic-external-rule-inventor-2013-find-component-place-into-a/m-p/5901230#M59788</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2015-11-10T15:08:43Z</dc:date>
    </item>
    <item>
      <title>Re: iLogic external rule Inventor 2013 - Find Component Place into a New .iam</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-ilogic/ilogic-external-rule-inventor-2013-find-component-place-into-a/m-p/5902418#M59808</link>
      <description>&lt;P&gt;Hi, I believe we can adjust the rule to your need, I just need some info:&lt;/P&gt;&lt;P&gt;1) What is the extension of your parts (or extensions, if you have more than one).&lt;/P&gt;&lt;P&gt;2) Can you add all parts starting with "RUCW" or you need to type in the whole number?&lt;/P&gt;&lt;P&gt;3) Do you want to add subassemblies or parts only?&lt;/P&gt;&lt;P&gt;4) Can you use manual "Save As" to save the assembly or you want it to automaticaly pop up the "Save As" dialog at the end of the rule?&lt;/P&gt;&lt;P&gt;5) Do you want to add parts from pre-specifed folder or you want to choose the folder on each run of the rule or you want to&amp;nbsp;pick the parts from some kind of part list (Excel table, TXT, etc.) or from another assembly?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;You don't need to have open &lt;STRONG&gt;blank&lt;/STRONG&gt; assembly, any assembly would work.&lt;/P&gt;</description>
      <pubDate>Wed, 11 Nov 2015 05:20:37 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-ilogic/ilogic-external-rule-inventor-2013-find-component-place-into-a/m-p/5902418#M59808</guid>
      <dc:creator>Owner2229</dc:creator>
      <dc:date>2015-11-11T05:20:37Z</dc:date>
    </item>
    <item>
      <title>Re: iLogic external rule Inventor 2013 - Find Component Place into a New .iam</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-ilogic/ilogic-external-rule-inventor-2013-find-component-place-into-a/m-p/5903093#M59820</link>
      <description>&lt;P&gt;We name our&amp;nbsp;assemblies after the main part in that assembly.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;IMG title="Model Browser.PNG" alt="Model Browser.PNG" src="https://forums.autodesk.com/t5/image/serverpage/image-id/199921i5B679442DFA9C1FE/image-size/original?v=mpbl-1&amp;amp;px=-1" border="0" /&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;All of our&amp;nbsp;sub-assemblies are made from the frame generator.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;IMG title="Model Browser showing info.PNG" alt="Model Browser showing info.PNG" src="https://forums.autodesk.com/t5/image/serverpage/image-id/199922iC266E0960A3E6D72/image-size/original?v=mpbl-1&amp;amp;px=-1" border="0" /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;So once we have everything in the main assembly, we need to sort through all of our parts so that we can then assign mark #'s to these parts.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;(This one just happens to be complete already)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;IMG title="Model BOM.PNG" alt="Model BOM.PNG" src="https://forums.autodesk.com/t5/image/serverpage/image-id/199923iB3D3BC668287B373/image-size/original?v=mpbl-1&amp;amp;px=-1" border="0" /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I don't know if it would be too much to ask out of a program to place all the RUCW (of my choosing by entering data in when prompted) in to different assemblies.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Example.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;-Run Rule-&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; "Would you like to search this assembly" (Already open assembly)&lt;/P&gt;&lt;P&gt;-Click yes/no-&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; If yes Then - "What STOCK NUMBERS would you like to search for?"&lt;/P&gt;&lt;P&gt;-Enter RUCW123, RUCW4321, RUCW9876, UCW1442 and so on.-&lt;/P&gt;&lt;P&gt;- Program Searches for all of the user defined STOCK NUMBERS and automatically places them in to&amp;nbsp; a new assembly.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; (For instance, the program finds 14 different parts with STOCK NUMBER of RUCW1234 and knows to place them all together, finds 10 RUCW4321 and know to place them in a completely different assembly and so on for however many different STOCK NUMBERS the user has defined.)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;IMG title="Elevation BOM.PNG" alt="Elevation BOM.PNG" src="https://forums.autodesk.com/t5/image/serverpage/image-id/199924iCEFACB734782045A/image-size/original?v=mpbl-1&amp;amp;px=-1" border="0" /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;So to answer your questions.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;1.) I have attached some sample pictures on some projects I have been working on.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;2.) It would be preferable to pick and choose which ones go where.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;3.) Parts only please.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;4.) We can&amp;nbsp;absolutely use a manual Save As.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;5.) Would like to search the OPEN assembly using either a excel file with a list of STOCK NUMBERS&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; OR, would like to be able to tell the program what I want to find. (ie.. Program - "What do you want to find"&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;User - :type: - RUCW1234 (if user wants to search for more than one&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;then&amp;nbsp;separate with a comma)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 11 Nov 2015 16:00:33 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-ilogic/ilogic-external-rule-inventor-2013-find-component-place-into-a/m-p/5903093#M59820</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2015-11-11T16:00:33Z</dc:date>
    </item>
    <item>
      <title>Re: iLogic external rule Inventor 2013 - Find Component Place into a New .iam</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-ilogic/ilogic-external-rule-inventor-2013-find-component-place-into-a/m-p/5904199#M59831</link>
      <description>&lt;P&gt;Hi, this rule below should meet your needs.&lt;/P&gt;&lt;P&gt;1) It will ask for Stock Numbers. Write in e.g.:&amp;nbsp;&lt;FONT color="#000000"&gt;&lt;STRONG&gt;RUCW001;RUCW002;RUCW003&lt;/STRONG&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;(I can change it to use the Excel table or text file if you want)&lt;/P&gt;&lt;P&gt;2) Then it will create new assembly for each specifed Stock Number. But it won't save it (I can change it for you, if you want).&lt;/P&gt;&lt;P&gt;3) And then it will look for parts with matching Stock number and add them to these assemblies.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;Sub Main()
    Dim g_App As Inventor.InventorServer = ThisApplication
    Dim oDoc As Document = ThisApplication.ActiveDocument
    If Not oDoc.DocumentType = DocumentTypeEnum.kAssemblyDocumentObject Then
    	MsgBox("This rule is for assembly only.")
    	Exit Sub
    End If
    Dim OrigASM As String = ThisDoc.PathAndFileName(True)
    Dim oPath As String = ThisDoc.Path &amp;amp; "\"
&lt;STRONG&gt;&lt;FONT color="#FF0000"&gt;    'SearchedPartExample = "RUCW001;RUCW002;RUCW003"&lt;/FONT&gt;&lt;/STRONG&gt;
    SearchedPart = InputBox("Please insert stock number of searched parts", "Input")
    If SearchedPart = vbNullString Then
    	Exit Sub
    End If
&lt;FONT color="#FF0000"&gt;&lt;STRONG&gt;    'specify word splitting character ";"&lt;/STRONG&gt;&lt;/FONT&gt;
    Dim Separators() As Char = {";"c}
    oStockNumbers = SearchedPart.Split(Separators)
    i = 0
    For Each oStockNR In oStockNumbers
	Dim oNewAsmDoc(i) As AssemblyDocument
	oNewAsmDoc(i) = g_App.Documents.Add(DocumentTypeEnum.kAssemblyDocumentObject, , True)
	Call LookForStockNR(oDoc, oStockNumbers(i), oNewAsmDoc(i))
	i += 1
    Next
    oDoc.Activate
End Sub

Sub LookForStockNR(oDoc As Document, oStockNR As String, oNewDoc As AssemblyDocument)
    Dim refDocs As DocumentsEnumerator = oDoc.AllReferencedDocuments
    Dim refDoc As Document
    For Each refDoc in refDocs
	ModelFileName = refDoc.FullFileName
	FNamePos = InStrRev(ModelFileName, "\", - 1)
	docFName = Mid(ModelFileName, FNamePos + 1, Len(ModelFileName) - FNamePos)
	If iProperties.Value(docFName, "Project", "Stock Number") = oStockNR Then
	    Call AddOccurrence(oNewDoc, ModelFileName)
	End If
    Next
End Sub

Sub AddOccurrence(oNewDoc As AssemblyDocument, oPartToAdd As String)
    Dim oAsmCompDef As AssemblyComponentDefinition = oNewDoc.ComponentDefinition
    Dim oTG As TransientGeometry = ThisApplication.TransientGeometry
    Dim oMatrix As Matrix = oTG.CreateMatrix
    Call oMatrix.SetToRotation(3.14159265358979 / 4, _
        oTG.CreateVector(0, 0, 1), oTG.CreatePoint(0, 0, 0))
    Call oMatrix.SetTranslation(oTG.CreateVector(3, 2, 1))
    Dim oOcc As ComponentOccurrence
    oOcc = oAsmCompDef.Occurrences.Add(oPartToAdd, oMatrix)
End Sub&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 12 Nov 2015 06:23:20 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-ilogic/ilogic-external-rule-inventor-2013-find-component-place-into-a/m-p/5904199#M59831</guid>
      <dc:creator>Owner2229</dc:creator>
      <dc:date>2015-11-12T06:23:20Z</dc:date>
    </item>
    <item>
      <title>Re: iLogic external rule Inventor 2013 - Find Component Place into a New .iam</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-ilogic/ilogic-external-rule-inventor-2013-find-component-place-into-a/m-p/5904859#M59841</link>
      <description>&lt;P&gt;So I tried this code this morning, and it doesn't seem to like this line:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;oNewAsmDoc(i) = g_App.Documents.Add(DocumentTypeEnum.kAssemblyDocumentObject, , True)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;These&amp;nbsp;are the error messages I'm getting:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;'kAssemblyDocu' is not a member of 'Inventor.DocumentTypeEnum'.&lt;/P&gt;&lt;P&gt;Comma,')', or a valid expression continuation expected.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you,&lt;/P&gt;&lt;P&gt;Dylan Stewart&lt;/P&gt;</description>
      <pubDate>Thu, 12 Nov 2015 14:25:18 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-ilogic/ilogic-external-rule-inventor-2013-find-component-place-into-a/m-p/5904859#M59841</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2015-11-12T14:25:18Z</dc:date>
    </item>
    <item>
      <title>Re: iLogic external rule Inventor 2013 - Find Component Place into a New .iam</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-ilogic/ilogic-external-rule-inventor-2013-find-component-place-into-a/m-p/5905682#M59861</link>
      <description>&lt;P&gt;Hi, I don't know where the problem is, as the rule is runing correctly for me. The line seems to be fine.&lt;/P&gt;&lt;P&gt;Try to copy it from the attached text file instead.&lt;/P&gt;</description>
      <pubDate>Thu, 12 Nov 2015 20:22:46 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-ilogic/ilogic-external-rule-inventor-2013-find-component-place-into-a/m-p/5905682#M59861</guid>
      <dc:creator>Owner2229</dc:creator>
      <dc:date>2015-11-12T20:22:46Z</dc:date>
    </item>
    <item>
      <title>Re: iLogic external rule Inventor 2013 - Find Component Place into a New .iam</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-ilogic/ilogic-external-rule-inventor-2013-find-component-place-into-a/m-p/5906869#M59875</link>
      <description>&lt;P&gt;AWESOME!!!!! It's working!!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Only a couple of&amp;nbsp;problems that I am having now. One&amp;nbsp;is that it is only bringing in one&amp;nbsp;instance on each, where as my assembly might sometimes have +- 25...&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;It also missed some of the parts. (I had everything merged by Part Number - Not a big deal as I ran it when I took that feature off)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Now this one seemed kind of weird to me...&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Only with 1 of my RUCW did this happen:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;IMG title="Searched RUCW8937.PNG" alt="Searched RUCW8937.PNG" src="https://forums.autodesk.com/t5/image/serverpage/image-id/200447i2B33ED23523EA26B/image-size/original?v=mpbl-1&amp;amp;px=-1" border="0" /&gt;&amp;nbsp;Worked perfectly&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;IMG title="Searched RUCW8938.PNG" alt="Searched RUCW8938.PNG" src="https://forums.autodesk.com/t5/image/serverpage/image-id/200448iA11A69E31B05AD35/image-size/original?v=mpbl-1&amp;amp;px=-1" border="0" /&gt;&amp;nbsp;Worked perfectly&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;IMG title="Searched RUCW8944.PNG" alt="Searched RUCW8944.PNG" src="https://forums.autodesk.com/t5/image/serverpage/image-id/200449i9B5C16E5AECC861F/image-size/original?v=mpbl-1&amp;amp;px=-1" border="0" /&gt;&amp;nbsp;Only brought in one part...?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;IMG title="Searched RUCW8945.PNG" alt="Searched RUCW8945.PNG" src="https://forums.autodesk.com/t5/image/serverpage/image-id/200450i967A66061780BDB9/image-size/original?v=mpbl-1&amp;amp;px=-1" border="0" /&gt;&amp;nbsp;Well, so I thought... The other RUCW8944 parts ended up in the RUCW8955 .iam&amp;nbsp; ??&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;IMG title="Searched RUCW8946.PNG" alt="Searched RUCW8946.PNG" src="https://forums.autodesk.com/t5/image/serverpage/image-id/200451i02B2E947B450DB62/image-size/original?v=mpbl-1&amp;amp;px=-1" border="0" /&gt;&amp;nbsp;Now back to normal, working perfectly.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you so much for your help!!!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I would like to brain storm with you on some other projects I have once we get this one all debugged.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;You have been&amp;nbsp;loads of&amp;nbsp;help!!!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 13 Nov 2015 14:31:30 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-ilogic/ilogic-external-rule-inventor-2013-find-component-place-into-a/m-p/5906869#M59875</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2015-11-13T14:31:30Z</dc:date>
    </item>
  </channel>
</rss>

