<?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 automaticly save an assembly macro in Inventor Programming Forum</title>
    <link>https://forums.autodesk.com/t5/inventor-programming-forum/automaticly-save-an-assembly-macro/m-p/3605904#M134652</link>
    <description>&lt;P&gt;I believe this is a stupid question but I just got stuck with it. So please help &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have made a macro that asks for a location on the file server (=client name) and then the project name. It then automatic creates the correct folders, opens my custom assembly template and changes an ipart that is by default in it.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;That's all great and can save us a ton of time, but the last step is to automatic save the assembly! I just can't get it working and can't find the correct code (programming help, this forum, Google, ...)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have defined the target folder earlier and the file name of the assembly is identical to this folder. For example&lt;/P&gt;&lt;P&gt;target folder = O:\Projects\clientName\ClientProject1&lt;/P&gt;&lt;P&gt;file name = &lt;EM&gt;ClientProject1.iam&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;-&amp;gt; result: O:\Projects\clientName\ClientProject1\&lt;EM&gt;ClientProject1.iam&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;the code that I think should work looks like this:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;Sub SaveAssembly()
    Dim oAssDoc As AssemblyDocument
    Set oAssDoc = ThisApplication.ActiveDocument
    oAssDoc.SaveAs ("O:\Projects\clientName\ClientProject1\ClientProject1.iam", False)
End Sub&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;But it doesn't work, I always get the error message "Compile error: Expected: ="&lt;BR /&gt;Whatever I do next I don't get the code to work&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I feel stupid I can get the diffucult part working but that I'm stuck over something easy as an automatic save ...&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;thx for the help!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Tue, 04 Sep 2012 12:09:43 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2012-09-04T12:09:43Z</dc:date>
    <item>
      <title>automaticly save an assembly macro</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-forum/automaticly-save-an-assembly-macro/m-p/3605904#M134652</link>
      <description>&lt;P&gt;I believe this is a stupid question but I just got stuck with it. So please help &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have made a macro that asks for a location on the file server (=client name) and then the project name. It then automatic creates the correct folders, opens my custom assembly template and changes an ipart that is by default in it.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;That's all great and can save us a ton of time, but the last step is to automatic save the assembly! I just can't get it working and can't find the correct code (programming help, this forum, Google, ...)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have defined the target folder earlier and the file name of the assembly is identical to this folder. For example&lt;/P&gt;&lt;P&gt;target folder = O:\Projects\clientName\ClientProject1&lt;/P&gt;&lt;P&gt;file name = &lt;EM&gt;ClientProject1.iam&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;-&amp;gt; result: O:\Projects\clientName\ClientProject1\&lt;EM&gt;ClientProject1.iam&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;the code that I think should work looks like this:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;Sub SaveAssembly()
    Dim oAssDoc As AssemblyDocument
    Set oAssDoc = ThisApplication.ActiveDocument
    oAssDoc.SaveAs ("O:\Projects\clientName\ClientProject1\ClientProject1.iam", False)
End Sub&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;But it doesn't work, I always get the error message "Compile error: Expected: ="&lt;BR /&gt;Whatever I do next I don't get the code to work&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I feel stupid I can get the diffucult part working but that I'm stuck over something easy as an automatic save ...&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;thx for the help!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 04 Sep 2012 12:09:43 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-forum/automaticly-save-an-assembly-macro/m-p/3605904#M134652</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2012-09-04T12:09:43Z</dc:date>
    </item>
    <item>
      <title>Re: automaticly save an assembly macro</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-forum/automaticly-save-an-assembly-macro/m-p/3606008#M134653</link>
      <description>&lt;P&gt;You need to Call it &lt;span class="lia-unicode-emoji" title=":winking_face:"&gt;😉&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#FF0000"&gt;Call oAssDoc.SaveAs()&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;Sub SaveAssembly()
    Dim oAssDoc As AssemblyDocument
    Set oAssDoc = ThisApplication.ActiveDocument
    Call oAssDoc.SaveAs ("O:\Projects\clientName\ClientProject1\ClientProject1.iam", False)
End Sub&lt;/PRE&gt;</description>
      <pubDate>Tue, 04 Sep 2012 12:54:42 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-forum/automaticly-save-an-assembly-macro/m-p/3606008#M134653</guid>
      <dc:creator>jdkriek</dc:creator>
      <dc:date>2012-09-04T12:54:42Z</dc:date>
    </item>
    <item>
      <title>Re: automaticly save an assembly macro</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-forum/automaticly-save-an-assembly-macro/m-p/3606128#M134654</link>
      <description>&lt;P&gt;I knew I was forgetting something stupid &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;It works, thx!&lt;/P&gt;</description>
      <pubDate>Tue, 04 Sep 2012 13:29:22 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-forum/automaticly-save-an-assembly-macro/m-p/3606128#M134654</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2012-09-04T13:29:22Z</dc:date>
    </item>
    <item>
      <title>Re: automaticly save an assembly macro</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-forum/automaticly-save-an-assembly-macro/m-p/3606290#M134655</link>
      <description>&lt;P&gt;You're quite welcome.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Sometimes it's the simple things. Back in PHP I always forgot semicolons lol&lt;/P&gt;</description>
      <pubDate>Tue, 04 Sep 2012 14:39:18 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-forum/automaticly-save-an-assembly-macro/m-p/3606290#M134655</guid>
      <dc:creator>jdkriek</dc:creator>
      <dc:date>2012-09-04T14:39:18Z</dc:date>
    </item>
  </channel>
</rss>

