1 Reply Latest reply on May 18, 2015 5:01 PM by Keith Rice

    How to save recording as .csproj

    Leif Nordstrom

      Hello - I am very new to macros and am going through the Solidworks tutorials.  I have some experience in C# and would like to save my recorded macro as a .csproj file, but this potion is not available in the "Save As Type" dropdown on the save window.  What am I missing?

        • Re: How to save recording as .csproj
          Keith Rice

          You are missing VSTA. If this is not installed, you will not see those Save As types.

           

          If you are using SolidWorks 2014 or 2015, then the option to install VSTA should be present in your installation manager. You may have unchecked it unwittingly. If you are using SolidWorks 2013 or earlier, then VSTA gets bundled with other parts of the software, though I am not certain which ones. Nevertheless I know that when I don't uncheck any features to get installed, VSTA always gets installed.

           

          If you are certain that VSTA did get installed then you can try re-initializing it. The following is from the SolidWorks knowledge base help article S- 047516. Do not proceed if you are unfamiliar with the registry. You could really mess up your computer if you accidentally delete ore rename the wrong key.

           

          32-bit

          1. Rename "HKEY_LOCAL_Machine\Software\Microsoft\VSTAHost" to "VSTAHost_old" (do not rename "VSTAHostConfig")
          2. Open a command prompt and change directory to the folder in which the "vsta.exe" resides; normally this is "C:\Program Files\Microsoft Visual Studio 8\Common7\IDE"
          3. In the command prompt type: vsta.exe /hostid SolidWorks_VSTA /setup
          4. Hit Enter

           

          64-bit

           

          1. Rename "HKEY_LOCAL_Machine\Software\Wow6432Node\Microsoft\VSTAHost" to "VSTAHost_old" (do not rename "VSTAHostConfig")
          2. Open a command prompt and change directory to the folder in which the "vsta.exe" resides; normally this is "C:\Program Files (x86)\Microsoft Visual Studio 8\Common7\IDE"
          3. In the command prompt type:      vsta.exe /hostid SolidWorks_VSTA /setup
          4. Hit Enter

           

          You could also try repairing your installation, I suppose. If none of this helps then you will want to contact your reseller for further assistance.

           

          Keith

          SolidWorks API Tutorials