<?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 Create an assembly template that when used also spawns the 1st part from another template in Inventor Programming - iLogic, Macros, AddIns &amp; Apprentice</title>
    <link>https://forums.autodesk.com/t5/inventor-programming-ilogic/create-an-assembly-template-that-when-used-also-spawns-the-1st/m-p/12947766#M170447</link>
    <description>&lt;P&gt;I frequently create a new assembly from a template, then immediately need to create the 1st part from another template.&amp;nbsp; &amp;nbsp;Is there a way to create a template that does this for me, in other words, when I create a new assembly, it automatically spawns the 1st part at the same time,&amp;nbsp; and I can start editing the part right away?&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, 08 Aug 2024 19:52:06 GMT</pubDate>
    <dc:creator>RichardLee3904</dc:creator>
    <dc:date>2024-08-08T19:52:06Z</dc:date>
    <item>
      <title>Create an assembly template that when used also spawns the 1st part from another template</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-ilogic/create-an-assembly-template-that-when-used-also-spawns-the-1st/m-p/12947766#M170447</link>
      <description>&lt;P&gt;I frequently create a new assembly from a template, then immediately need to create the 1st part from another template.&amp;nbsp; &amp;nbsp;Is there a way to create a template that does this for me, in other words, when I create a new assembly, it automatically spawns the 1st part at the same time,&amp;nbsp; and I can start editing the part right away?&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, 08 Aug 2024 19:52:06 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-ilogic/create-an-assembly-template-that-when-used-also-spawns-the-1st/m-p/12947766#M170447</guid>
      <dc:creator>RichardLee3904</dc:creator>
      <dc:date>2024-08-08T19:52:06Z</dc:date>
    </item>
    <item>
      <title>Re: Create an assembly template that when used also spawns the 1st part from another template</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-ilogic/create-an-assembly-template-that-when-used-also-spawns-the-1st/m-p/12948865#M170467</link>
      <description>&lt;P&gt;I recommend you to create external iLogic script which:&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;create new assembly&lt;/LI&gt;&lt;LI&gt;create new part&lt;/LI&gt;&lt;LI&gt;place the part to the assembly&lt;/LI&gt;&lt;LI&gt;start editing the part&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;The script can looks like this&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="visual-basic"&gt;Dim asmTemplate As String = "" 'Add your assembly template here (keep empty for default)
Dim partTemplate As String = "" 'Add your part template here (keep empty for default)

Dim asm As AssemblyDocument = ThisApplication.Documents.Add(DocumentTypeEnum.kAssemblyDocumentObject, asmTemplate)
Dim part As PartDocument = ThisApplication.Documents.Add(DocumentTypeEnum.kPartDocumentObject, partTemplate, False)
Dim partOccurrence As ComponentOccurrence = asm.ComponentDefinition.Occurrences.AddByComponentDefinition(part.ComponentDefinition, ThisApplication.TransientGeometry.CreateMatrix())
part.ReleaseReference()
partOccurrence.Edit()&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 09 Aug 2024 09:11:58 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-ilogic/create-an-assembly-template-that-when-used-also-spawns-the-1st/m-p/12948865#M170467</guid>
      <dc:creator>Michael.Navara</dc:creator>
      <dc:date>2024-08-09T09:11:58Z</dc:date>
    </item>
  </channel>
</rss>

