<?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 a new Weldment type document? in Inventor Programming - iLogic, Macros, AddIns &amp; Apprentice</title>
    <link>https://forums.autodesk.com/t5/inventor-programming-ilogic/create-a-new-weldment-type-document/m-p/11484845#M143920</link>
    <description>&lt;P&gt;Hi All,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I tried to create a new "Weldment type" assembly document using below codes.&amp;nbsp; It did create a new assembly document but it was not&amp;nbsp;"Weldment type".&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Could someone know where is the problem? Thanks!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;SPAN&gt;Sub&lt;/SPAN&gt; &lt;SPAN&gt;Main&lt;/SPAN&gt;()	
	&lt;SPAN&gt;Dim&lt;/SPAN&gt; &lt;SPAN&gt;oDocs&lt;/SPAN&gt; &lt;SPAN&gt;As&lt;/SPAN&gt; &lt;SPAN&gt;Documents&lt;/SPAN&gt; = &lt;SPAN&gt;ThisApplication&lt;/SPAN&gt;.&lt;SPAN&gt;Documents&lt;/SPAN&gt;
	
	&lt;SPAN&gt;'THIS IS A WELDMENT SUB TYPE&lt;/SPAN&gt;
	&lt;SPAN&gt;Dim oWeldment As String = "{28EC8354-9024-440F-A8A2-0E0E55D635B0}"&lt;/SPAN&gt;
	
	&lt;SPAN&gt;Dim&lt;/SPAN&gt; &lt;SPAN&gt;oTemplateFile&lt;/SPAN&gt; &lt;SPAN&gt;As&lt;/SPAN&gt; &lt;SPAN&gt;String&lt;/SPAN&gt; = &lt;SPAN&gt;ThisApplication&lt;/SPAN&gt;.&lt;SPAN&gt;FileManager&lt;/SPAN&gt;.&lt;SPAN&gt;GetTemplateFile&lt;/SPAN&gt;(&lt;SPAN&gt;kAssemblyDocumentObject&lt;/SPAN&gt;, _
	&lt;SPAN&gt;kDefaultSystemOfMeasure&lt;/SPAN&gt;, &lt;SPAN&gt;kDefault_DraftingStandard&lt;/SPAN&gt;, &lt;SPAN&gt;oWeldment&lt;/SPAN&gt;)
	
	&lt;SPAN&gt;Dim&lt;/SPAN&gt; &lt;SPAN&gt;oADoc&lt;/SPAN&gt; &lt;SPAN&gt;As&lt;/SPAN&gt; &lt;SPAN&gt;Document&lt;/SPAN&gt; = &lt;SPAN&gt;oDocs&lt;/SPAN&gt;.&lt;SPAN&gt;Add&lt;/SPAN&gt;(&lt;SPAN&gt;kAssemblyDocumentObject&lt;/SPAN&gt;, &lt;SPAN&gt;oTemplateFile&lt;/SPAN&gt;, &lt;SPAN&gt;True&lt;/SPAN&gt;)	
&lt;SPAN&gt;End&lt;/SPAN&gt; &lt;SPAN&gt;Sub&lt;/SPAN&gt;&lt;/PRE&gt;&lt;PRE&gt;&lt;SPAN&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Sat, 15 Oct 2022 13:19:57 GMT</pubDate>
    <dc:creator>jingying_1213</dc:creator>
    <dc:date>2022-10-15T13:19:57Z</dc:date>
    <item>
      <title>Create a new Weldment type document?</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-ilogic/create-a-new-weldment-type-document/m-p/11484845#M143920</link>
      <description>&lt;P&gt;Hi All,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I tried to create a new "Weldment type" assembly document using below codes.&amp;nbsp; It did create a new assembly document but it was not&amp;nbsp;"Weldment type".&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Could someone know where is the problem? Thanks!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;SPAN&gt;Sub&lt;/SPAN&gt; &lt;SPAN&gt;Main&lt;/SPAN&gt;()	
	&lt;SPAN&gt;Dim&lt;/SPAN&gt; &lt;SPAN&gt;oDocs&lt;/SPAN&gt; &lt;SPAN&gt;As&lt;/SPAN&gt; &lt;SPAN&gt;Documents&lt;/SPAN&gt; = &lt;SPAN&gt;ThisApplication&lt;/SPAN&gt;.&lt;SPAN&gt;Documents&lt;/SPAN&gt;
	
	&lt;SPAN&gt;'THIS IS A WELDMENT SUB TYPE&lt;/SPAN&gt;
	&lt;SPAN&gt;Dim oWeldment As String = "{28EC8354-9024-440F-A8A2-0E0E55D635B0}"&lt;/SPAN&gt;
	
	&lt;SPAN&gt;Dim&lt;/SPAN&gt; &lt;SPAN&gt;oTemplateFile&lt;/SPAN&gt; &lt;SPAN&gt;As&lt;/SPAN&gt; &lt;SPAN&gt;String&lt;/SPAN&gt; = &lt;SPAN&gt;ThisApplication&lt;/SPAN&gt;.&lt;SPAN&gt;FileManager&lt;/SPAN&gt;.&lt;SPAN&gt;GetTemplateFile&lt;/SPAN&gt;(&lt;SPAN&gt;kAssemblyDocumentObject&lt;/SPAN&gt;, _
	&lt;SPAN&gt;kDefaultSystemOfMeasure&lt;/SPAN&gt;, &lt;SPAN&gt;kDefault_DraftingStandard&lt;/SPAN&gt;, &lt;SPAN&gt;oWeldment&lt;/SPAN&gt;)
	
	&lt;SPAN&gt;Dim&lt;/SPAN&gt; &lt;SPAN&gt;oADoc&lt;/SPAN&gt; &lt;SPAN&gt;As&lt;/SPAN&gt; &lt;SPAN&gt;Document&lt;/SPAN&gt; = &lt;SPAN&gt;oDocs&lt;/SPAN&gt;.&lt;SPAN&gt;Add&lt;/SPAN&gt;(&lt;SPAN&gt;kAssemblyDocumentObject&lt;/SPAN&gt;, &lt;SPAN&gt;oTemplateFile&lt;/SPAN&gt;, &lt;SPAN&gt;True&lt;/SPAN&gt;)	
&lt;SPAN&gt;End&lt;/SPAN&gt; &lt;SPAN&gt;Sub&lt;/SPAN&gt;&lt;/PRE&gt;&lt;PRE&gt;&lt;SPAN&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sat, 15 Oct 2022 13:19:57 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-ilogic/create-a-new-weldment-type-document/m-p/11484845#M143920</guid>
      <dc:creator>jingying_1213</dc:creator>
      <dc:date>2022-10-15T13:19:57Z</dc:date>
    </item>
    <item>
      <title>Re: Create a new Weldment type document?</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-ilogic/create-a-new-weldment-type-document/m-p/11485152#M143921</link>
      <description>&lt;P&gt;The method "GetTemplateFile" will not make a weldment document but will just point to the weldment template. Therefore you need to check that your template is a weldment template. Therefore you could add a message box and look if the method really points to a weldment assembly.&lt;/P&gt;
&lt;LI-CODE lang="visual-basic"&gt;        Dim oWeldment As String = "{28EC8354-9024-440F-A8A2-0E0E55D635B0}"

        Dim oDocs As Documents = ThisApplication.Documents
        Dim oTemplateFile As String = ThisApplication.FileManager.GetTemplateFile(DocumentTypeEnum.kAssemblyDocumentObject,
            SystemOfMeasureEnum.kDefaultSystemOfMeasure, DraftingStandardEnum.kDefault_DraftingStandard, oWeldment)

        MsgBox(oTemplateFile)

        Dim oADoc As Document = oDocs.Add( DocumentTypeEnum.kAssemblyDocumentObject, oTemplateFile, True)&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sat, 15 Oct 2022 18:30:53 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-ilogic/create-a-new-weldment-type-document/m-p/11485152#M143921</guid>
      <dc:creator>JelteDeJong</dc:creator>
      <dc:date>2022-10-15T18:30:53Z</dc:date>
    </item>
    <item>
      <title>Re: Create a new Weldment type document?</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-ilogic/create-a-new-weldment-type-document/m-p/11485178#M143922</link>
      <description>&lt;P&gt;In testing if the en-US folder is present and there is no no Weldment.iam file then this will default to a regular Assembly or the kAssemblyDocumentObject&amp;nbsp; because no subtype document is available. This also happens if the standard name "Weldment.iam" is not used. In your case it might be the case that the default name is not being used. You can test the path and if no path is shown then this will default to the&amp;nbsp;kAssemblyDocumentObject.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;SPAN&gt;MessageBox&lt;/SPAN&gt;.&lt;SPAN&gt;Show&lt;/SPAN&gt;(&lt;SPAN&gt;oTemplateFile&lt;/SPAN&gt;, &lt;SPAN&gt;"Template Path")&lt;/SPAN&gt;&amp;nbsp;&amp;nbsp;&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="AAcheson_0-1665858972636.png" style="width: 600px;"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/1127866i591BE8A0020E489E/image-size/medium?v=v2&amp;amp;px=400" role="button" title="AAcheson_0-1665858972636.png" alt="AAcheson_0-1665858972636.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Alternatively if you know the exact path of the weldment document you can load this directly.&lt;/P&gt;</description>
      <pubDate>Sat, 15 Oct 2022 18:58:19 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-ilogic/create-a-new-weldment-type-document/m-p/11485178#M143922</guid>
      <dc:creator>A.Acheson</dc:creator>
      <dc:date>2022-10-15T18:58:19Z</dc:date>
    </item>
    <item>
      <title>Re: Create a new Weldment type document?</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-ilogic/create-a-new-weldment-type-document/m-p/11485569#M143923</link>
      <description>&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I add a message box and it shows blank.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;There is no issue when I try to add other template.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I also confirm that the Weldment.iam template is in the correct path.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="jingying_1213_0-1665890333450.png" style="width: 600px;"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/1127921i640FB0F053548543/image-size/medium?v=v2&amp;amp;px=400" role="button" title="jingying_1213_0-1665890333450.png" alt="jingying_1213_0-1665890333450.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sun, 16 Oct 2022 03:22:00 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-ilogic/create-a-new-weldment-type-document/m-p/11485569#M143923</guid>
      <dc:creator>jingying_1213</dc:creator>
      <dc:date>2022-10-16T03:22:00Z</dc:date>
    </item>
    <item>
      <title>Re: Create a new Weldment type document?</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-ilogic/create-a-new-weldment-type-document/m-p/11485607#M143924</link>
      <description>&lt;P&gt;Can you confirm if there is a folder called en-US in the templates folder? In my testing if the weldment file is not in this folder but in the templates folder (1 level up)&amp;nbsp; then the function will not find the path. If the en-US folder is removed then the function will search and find the weldment file in the templates folder.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sun, 16 Oct 2022 04:06:56 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-ilogic/create-a-new-weldment-type-document/m-p/11485607#M143924</guid>
      <dc:creator>A.Acheson</dc:creator>
      <dc:date>2022-10-16T04:06:56Z</dc:date>
    </item>
    <item>
      <title>Re: Create a new Weldment type document?</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-ilogic/create-a-new-weldment-type-document/m-p/11485618#M143925</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;It is strange that I test below 4 templates and only the "Weldment.iam" template cannot show the path.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="jingying_1213_0-1665893908095.png" style="width: 600px;"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/1127926i10E19C90DDE1E5B1/image-size/medium?v=v2&amp;amp;px=400" role="button" title="jingying_1213_0-1665893908095.png" alt="jingying_1213_0-1665893908095.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;However, like you said, when I use the exact path of the "Weldment.iam" template, the correct weldment assembly is created. This is an alternative way and it works well but I still want to know where is the problem.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks!!&lt;/P&gt;</description>
      <pubDate>Sun, 16 Oct 2022 04:24:29 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-ilogic/create-a-new-weldment-type-document/m-p/11485618#M143925</guid>
      <dc:creator>jingying_1213</dc:creator>
      <dc:date>2022-10-16T04:24:29Z</dc:date>
    </item>
    <item>
      <title>Re: Create a new Weldment type document?</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-ilogic/create-a-new-weldment-type-document/m-p/11486023#M143930</link>
      <description>&lt;P&gt;Hi, I have a "zh-CN" in my template folder not "en-US" because I use the Chinese version Inventor.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Below is the path of template.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="jingying_1213_0-1665920967940.png" style="width: 600px;"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/1127993i0E32443C9C5B9B42/image-size/medium?v=v2&amp;amp;px=400" role="button" title="jingying_1213_0-1665920967940.png" alt="jingying_1213_0-1665920967940.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Below is the folder.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="jingying_1213_1-1665921032842.png" style="width: 600px;"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/1127994i22EE72A98CFC1F22/image-size/medium?v=v2&amp;amp;px=400" role="button" title="jingying_1213_1-1665921032842.png" alt="jingying_1213_1-1665921032842.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;All templates are in this folder, I tried the 4 templtes highlighted in yellower, all are ok using those codes except the Weldment.iam. That is the issue.&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;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sun, 16 Oct 2022 11:54:39 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-ilogic/create-a-new-weldment-type-document/m-p/11486023#M143930</guid>
      <dc:creator>jingying_1213</dc:creator>
      <dc:date>2022-10-16T11:54:39Z</dc:date>
    </item>
  </channel>
</rss>

