10 Replies Latest reply on Feb 6, 2014 6:43 PM by Roy Kim

    Open part file in same instance

    James Bailey

      Most of the time when I open a part file (or assembly) from Windows Explorer, a new instance of SolidWorks is created. To exonerate those who doubt the integrity of my statement, I'll provide evidence that a new instance of SolidWorks is, in fact, being created. Here's one scenario:

      1. I open an assembly (or part), from Windows Explorer.
      2. I then proceed to open another file from Windows Explorer.
      3. This second file is opened in another instance of SolidWorks which is verified by the inability to switch between the two files from within SolidWorks' Window drop-down menu.

      One thing to note though, is this doesn't happen all the time. That's the part that I've been having trouble to pinpoint is sometimes it opens within one instance, and other times it doesn't. If I can find a specific case where this does and doesn't happen, then I'm sure we can figure out a solution.

      This also sometimes happens when I right-click on a part from within an assembly and click Open Part.

       

      Of course there are workarounds to this:

      • I could drag and drop these files into my SolidWorks session while I have my assembly/part, but the problem with that is I don't necessarily want the item I'm trying to open be inserted into my assembly/part (only opened).
      • I could go to File->Open and find my part and open it, but the problem there is I prefer Windows Explorer's navigation system and it's less inconvenient.
      • And some other obscure ways that I can't quite think of as of now.

       

      I'm not looking for a workaround per se, but some advice would be appreciated.

      Thanks.

        • Re: Open part file in same instance
          Jeremy Feist

          for the drag and drop work around, if you drag to an unused portion of the toolbar areas, it will open the file and not try to add it to the previously opened file.

          • Re: Open part file in same instance
            Dean Dickemore

            I've experienced the same behavior you cite here, Jeremy has a good solution.  There is another option yet though.  RC on the file you wish to open, and select "Open With".  This should present you with two SldWorks icons in the popup menu.  The first will open the selected file in the current running/open session of SWX and the second icon will start yet a second session of SWX and open your file there.

            Enjoy..

            • Re: Open part file in same instance
              Roy Kim

              Hello all,

               

              After a quick googling, it doesn't seem that this issue has been resolved in a way that works for non-SW specific files. In my case I want open Parasolid files (.x_t) from windows explorer and have them automagically open in my currently running instance of Solidworks. The solution I arrived at involves editing the registry so make a backup of it, just in case.

               

              I'm using Solidworks 2012 on Windows 7 x64.

               

              1. First, in windows explorer select the file you wish to open and RMB for the "Open with..." dialogue. Browse to your SW executable and create the file association.

               

              2. Now, you have a file association that when you double click on a file in windows explorer, that file will open itself in a new instance of Solidworks. In my case, I want to open .x_t files.

               

              3. Open your registry and browse to HKEY_CURRENT_USER\Software\Classes\x_t_auto_file. This is the file association you just created using the "Open with..." dialogue in windows explorer.

              sw1.png

              It should look something like this.

               

              4. Modify the DefaultValue and change it to "C:\Program Files\SolidWorks Corp\SolidWorks\SLDWORKS.exe" /dde

              sw2.png

               

              5. Under the "open" key, create a new key called ddeexec and write into the DefaultValue [open("%1")]

              sw3.png

               

              6. This next part is magic numbers. In the "command" key, right click and create a new Multi-String Value and name the variable as command. Write into command the following magic value

              Bl6W@eHee?5@sY^.y_tqi386_SWFiles>Eank_y-r*@)h~`UR&xxW "%1"

              sw4.png

              It should now look like this.

               

              7. You're done! Opening a, in this case, .x_t from windows explorer should open it in your currently running instance of Solidworks. Wow. So easy, right?

               

              WARNING: I dont know if that magic value is the same for everyone especially if you've changed Solidworks installation path from the default one in Program Files. If this doesn't work for you, look at HKEY_CLASSES_ROOT\SldPart.Document for the magic value that suits your situation. All I've done is copy the contents of HKEY_CLASSES_ROOT\SldPart.Document\shell\open into the registry key for my new file association.

               

              Good luck