<?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: Launch Flexsim.exe and Model from Excel VBA without installing flexsim software in FlexSim Forum</title>
    <link>https://forums.autodesk.com/t5/flexsim-forum/launch-flexsim-exe-and-model-from-excel-vba-without-installing/m-p/13496015#M12283</link>
    <description>&lt;P&gt;HI &lt;/P&gt;
&lt;P&gt;It says file not found &lt;/P&gt;
&lt;P&gt;I copied and pasted the VBA code you sent it did not work &lt;/P&gt;
&lt;P&gt;I change the path to make sure it goes to the right model location &lt;/P&gt;
&lt;PRE&gt;Private Sub CommandButton2_Click()
Dim myPath As String
Dim Simpath As String
myPath = Application.ActiveWorkbook.Path
Simpath = """" &amp;amp; myPath &amp;amp; "\..\" &amp;amp; "program\flexsim.exe" &amp;amp; """ """ &amp;amp; myPath &amp;amp; "Model\test.fsm" &amp;amp; """"
Shell Simpath, vbNormalFocus
End Sub

&lt;/PRE&gt;</description>
    <pubDate>Mon, 13 Mar 2017 22:33:28 GMT</pubDate>
    <dc:creator>raashid_mohammed1</dc:creator>
    <dc:date>2017-03-13T22:33:28Z</dc:date>
    <item>
      <title>Launch Flexsim.exe and Model from Excel VBA without installing flexsim software</title>
      <link>https://forums.autodesk.com/t5/flexsim-forum/launch-flexsim-exe-and-model-from-excel-vba-without-installing/m-p/13496013#M12281</link>
      <description>&lt;P&gt;&lt;I&gt;[ FlexSim 17.0.0 ]&lt;/I&gt;&lt;/P&gt;&lt;P&gt;Hi &lt;/P&gt;
&lt;P&gt;1. I copied the entire Flexsim 2017 folder to Desktop &lt;/P&gt;
&lt;P&gt;2. I added start macros excel file inside Flexsim 2017 folder &lt;/P&gt;
&lt;P&gt;3. I added Model folder with script.txt and test.fsm model inside Flexsim 2017 folder&lt;/P&gt;
&lt;P&gt;4. I wrote VBA code in start excel file &lt;/P&gt;
&lt;P&gt;Private Sub CommandButton2_Click() &lt;/P&gt;
&lt;P&gt; Dim myPath As String&lt;/P&gt;
&lt;P&gt; Dim folderPath As String &lt;/P&gt;
&lt;P&gt; Dim Simpath As String &lt;/P&gt;
&lt;P&gt; Dim Modelpath As String&lt;/P&gt;
&lt;P&gt; folderPath = CurDir() &lt;/P&gt;
&lt;P&gt;myPath = Application.ActiveWorkbook.FullName &lt;/P&gt;
&lt;P&gt;Simpath = folderPath &amp;amp; "\" &amp;amp; "program\flexsim.exe" Modelpath = folderPath &amp;amp; "\Model\test.fsm" &lt;/P&gt;
&lt;P&gt;Shell Simpath, vbNormalFocus &lt;/P&gt;
&lt;P&gt;Shell Modelpath, vbNormalFocus &lt;/P&gt;
&lt;P&gt; End Sub&lt;/P&gt;
&lt;P&gt;when I run the code It opens the flexsim.exe file but does not open the test model and run it &lt;/P&gt;
&lt;P&gt;Please help &lt;/P&gt;
&lt;P&gt;Thanks &lt;/P&gt;</description>
      <pubDate>Mon, 13 Mar 2017 19:09:12 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/flexsim-forum/launch-flexsim-exe-and-model-from-excel-vba-without-installing/m-p/13496013#M12281</guid>
      <dc:creator>raashid_mohammed1</dc:creator>
      <dc:date>2017-03-13T19:09:12Z</dc:date>
    </item>
    <item>
      <title>Re: Launch Flexsim.exe and Model from Excel VBA without installing flexsim software</title>
      <link>https://forums.autodesk.com/t5/flexsim-forum/launch-flexsim-exe-and-model-from-excel-vba-without-installing/m-p/13496014#M12282</link>
      <description>&lt;P&gt;
	This line has a syntax error in VBA:&lt;/P&gt;
&lt;PRE&gt;Simpath = folderPath &amp;amp; "\" &amp;amp; "program\flexsim.exe" Modelpath = folderPath &amp;amp; "\Model\test.fsm"
&lt;/PRE&gt;&lt;P&gt;
	I guess this was supposed to be two different lines? You are trying to execute flexsim and then execute a model file as two separate Shell commands. You need to execute flexsim and pass the model file as a parameter into a single Shell command.&lt;/P&gt;&lt;P&gt;
	To open the model, you specify a path to it after the path to the flexsim.exe executable, such that your Simpath string looks something like this:&lt;/P&gt;
&lt;PRE&gt;"C:\Users\USERNAME\Desktop\FlexSim 2017\program\flexsim.exe" "C:\Users\USERNAME\Desktop\FlexSim 2017\Model\test.fsm"
&lt;/PRE&gt;&lt;P&gt;
	Here is VBA code that will open FlexSim with the specified model based on the structure you set up on your desktop:&lt;/P&gt;
&lt;PRE&gt;Private Sub CommandButton2_Click()
Dim myPath As String
Dim Simpath As String
myPath = Application.ActiveWorkbook.Path
Simpath = """" &amp;amp; myPath &amp;amp; "\..\" &amp;amp; "program\flexsim.exe" &amp;amp; """ """ &amp;amp; myPath &amp;amp; "\test.fsm" &amp;amp; """"
Shell Simpath, vbNormalFocus
End Sub
&lt;/PRE&gt;&lt;P&gt;Ben's answer in &lt;A href="https://answers.flexsim.com/questions/21116/automatically-configure-and-run-a-flexsim-model.html"&gt;Automatically Configure and Run a FlexSim Model&lt;/A&gt; has additional information regarding other command line parameters that you can pass FlexSim. The commands that you can enter through a command prompt can also be entered as a concatenated string to the Shell command in VBA.&lt;/P&gt;</description>
      <pubDate>Mon, 13 Mar 2017 21:51:36 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/flexsim-forum/launch-flexsim-exe-and-model-from-excel-vba-without-installing/m-p/13496014#M12282</guid>
      <dc:creator>philboboADSK</dc:creator>
      <dc:date>2017-03-13T21:51:36Z</dc:date>
    </item>
    <item>
      <title>Re: Launch Flexsim.exe and Model from Excel VBA without installing flexsim software</title>
      <link>https://forums.autodesk.com/t5/flexsim-forum/launch-flexsim-exe-and-model-from-excel-vba-without-installing/m-p/13496015#M12283</link>
      <description>&lt;P&gt;HI &lt;/P&gt;
&lt;P&gt;It says file not found &lt;/P&gt;
&lt;P&gt;I copied and pasted the VBA code you sent it did not work &lt;/P&gt;
&lt;P&gt;I change the path to make sure it goes to the right model location &lt;/P&gt;
&lt;PRE&gt;Private Sub CommandButton2_Click()
Dim myPath As String
Dim Simpath As String
myPath = Application.ActiveWorkbook.Path
Simpath = """" &amp;amp; myPath &amp;amp; "\..\" &amp;amp; "program\flexsim.exe" &amp;amp; """ """ &amp;amp; myPath &amp;amp; "Model\test.fsm" &amp;amp; """"
Shell Simpath, vbNormalFocus
End Sub

&lt;/PRE&gt;</description>
      <pubDate>Mon, 13 Mar 2017 22:33:28 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/flexsim-forum/launch-flexsim-exe-and-model-from-excel-vba-without-installing/m-p/13496015#M12283</guid>
      <dc:creator>raashid_mohammed1</dc:creator>
      <dc:date>2017-03-13T22:33:28Z</dc:date>
    </item>
    <item>
      <title>Re: Launch Flexsim.exe and Model from Excel VBA without installing flexsim software</title>
      <link>https://forums.autodesk.com/t5/flexsim-forum/launch-flexsim-exe-and-model-from-excel-vba-without-installing/m-p/13496016#M12284</link>
      <description>&lt;P&gt;If your Excel file isn't in the Model directory, you need to take the .. out of the path to flexsim.exe in addition to adding \Model to the path to the model.&lt;/P&gt;&lt;PRE&gt;Private Sub CommandButton2_Click()
Dim myPath As String
Dim Simpath As String
myPath = Application.ActiveWorkbook.Path
Simpath = """" &amp;amp; myPath &amp;amp; "\program\flexsim.exe" &amp;amp; """ """ &amp;amp; myPath &amp;amp; "\Model\test.fsm" &amp;amp; """"
Shell Simpath, vbNormalFocus
End Sub
&lt;/PRE&gt;</description>
      <pubDate>Mon, 13 Mar 2017 22:36:31 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/flexsim-forum/launch-flexsim-exe-and-model-from-excel-vba-without-installing/m-p/13496016#M12284</guid>
      <dc:creator>philboboADSK</dc:creator>
      <dc:date>2017-03-13T22:36:31Z</dc:date>
    </item>
    <item>
      <title>Re: Launch Flexsim.exe and Model from Excel VBA without installing flexsim software</title>
      <link>https://forums.autodesk.com/t5/flexsim-forum/launch-flexsim-exe-and-model-from-excel-vba-without-installing/m-p/13496017#M12285</link>
      <description>&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="5686-f.png"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/1495115i2767570E4E23E063/image-size/large?v=v2&amp;amp;px=999" role="button" title="5686-f.png" alt="5686-f.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;HI &lt;/P&gt;
&lt;P&gt;Thanks it works now &lt;/P&gt;
&lt;P&gt;Looks like i have to install the flexsim software to run the models on my computer &lt;/P&gt;
&lt;P&gt;It works for Flexsim 2016 update 2 but not for Flexsim 2017 &lt;/P&gt;
&lt;P&gt;it gives me licensing error &lt;/P&gt;
&lt;P&gt;I would like to run the model without installing the software &lt;/P&gt;
&lt;P&gt;FYI..the user is admin for his computer &lt;/P&gt;
&lt;P&gt;Thanks&lt;/P&gt;</description>
      <pubDate>Tue, 14 Mar 2017 00:26:27 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/flexsim-forum/launch-flexsim-exe-and-model-from-excel-vba-without-installing/m-p/13496017#M12285</guid>
      <dc:creator>raashid_mohammed1</dc:creator>
      <dc:date>2017-03-14T00:26:27Z</dc:date>
    </item>
    <item>
      <title>Re: Launch Flexsim.exe and Model from Excel VBA without installing flexsim software</title>
      <link>https://forums.autodesk.com/t5/flexsim-forum/launch-flexsim-exe-and-model-from-excel-vba-without-installing/m-p/13496018#M12286</link>
      <description>&lt;P&gt;In order to open FlexSim, the license service needs to be installed. The installer installs it. FlexSim itself will also install it when you run FlexSim as an administrator.&lt;/P&gt;&lt;P&gt;Running a program as an administrator is different than just running a program while logged in with an admin user. You have to actually explicitly tell it to run as an administrator by right-clicking the program and selecting "Run as administrator."&lt;/P&gt;&lt;P&gt;You can also right-click a shortcut to go to its Properties and set "Run as administrator" in the Advanced Properties of the shortcut.&lt;/P&gt;&lt;P&gt;You might also be able to install the licensing service directly from the DLL in FlexSim's install directory. The file FNP_Act_Installer.dll has an exported function called fnpActSvcInstallForMSI() which you might be able to call directly from VBA. Figuring out how to do that in Excel is beyond the scope of FlexSim technical support though. If you want to go that route, it is up to you to try to figure out how to do that.&lt;/P&gt;</description>
      <pubDate>Tue, 14 Mar 2017 16:48:13 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/flexsim-forum/launch-flexsim-exe-and-model-from-excel-vba-without-installing/m-p/13496018#M12286</guid>
      <dc:creator>philboboADSK</dc:creator>
      <dc:date>2017-03-14T16:48:13Z</dc:date>
    </item>
  </channel>
</rss>

