Saving Multiple Files in 3DEXPERIENCE

You can save multiple SOLIDWORKS files in 3DEXPERIENCE using the Batch Save to 3DEXPERIENCE command or using the Batch Import tool.

This topic describes:

This page discusses:

Saving Data Using the Batch Save to 3DEXPERIENCE Command

The Batch Save to 3DEXPERIENCEcommand is available in the Tools menu of SOLIDWORKS.

In the Batch Save to 3DEXPERIENCE dialog box, you can select the folders and specify the collaborative space in which the data must be saved. The options available on this dialog box are:

Table 1. Batch Save to 3DEXPERIENCE Dialog Box
Option/ Command Name Description
Add Folder Click Add Folder to choose a folder that must be a part of the save process.
Folder The location of the folder selected using Add Folder.
Destination Specify the collaborative space.
Bookmark The object name that is selected as a bookmark.

When you right-click the object, Reset option appears. This option removes the bookmarked object.

Opens the Bookmark Editor to select a bookmark. All the files under the selected windows folder are assigned to the chosen bookmark.


Deletes the entire row.
Move Up Moves the selected folder up in the list. Depending on the order of the folder in the list, it is prioritized during the save process.
Move Down Moves the selected folder down in the list. Depending on the order of the folder in the list, it is prioritized during the save process.
Include referenced files located outside the selected folder This option includes all the referenced files that are placed outside the selected folder for the save process.
Stop if duplicate files are found You can choose one of the following criteria to identify the duplicate files:
  • File ID
  • File Name
  • File Name and File ID
Important: The duplicates are searched only for the files of a selected folder.
Upgrade files to current version This option saves the data locally before saving it to the 3DEXPERIENCE platform. The data of the previous versions is upgraded to the current version.
Back up files before processing This option is enabled only if Upgrade files to current version option is chosen. Select a temporary folder to store the files before saving them to the collaborative space.

The folders are saved with a bottom to top approach and the data is not duplicated until the local cache is cleared. On completion of the save process, the data created in the 3DEXPERIENCE platform is in In-work maturity state and at the specified collaborative space.

Note: You cannot run the Batch Save to 3DEXPERIENCE command if you have any open documents in SOLIDWORKS, and you cannot use SOLIDWORKS while the import is processing.

Saving Data Using the Batch Tool

The Batch Import tool is used to save the existing SOLIDWORKS data in 3DEXPERIENCE. It is a command-line tool that saves the content of a directory in 3DEXPERIENCE or a single file or single assembly structure in 3DEXPERIENCE.

About Batch Tool

The name of the tool is SaveInto3DEXPERIENCE.exe. The location of the tool is:

Location: C:\Program Files\Dassault Systemes\B<release_number>xcadconnectors\win_b64\USWC\

Important: Run the tool from command line or the batch file as it accepts only command-line arguments.

Below are the few command-line arguments.

  • -h or --help: shows basic use of the command
  • -f or --file: processes a single file or a single assembly structure
  • -d or --directory: processes the content of a folder
  • -o or --output: generates JSON output at given path
  • --simul: tool operates in simulation mode the file and nothing is saved
  • --swversion: generates CGR for the specified version. If --file or --directory option is used, the --swversion option is mandatory.
  • --drawing: processes associated drawings present in the file

Important: While the tool is running:
  • Do not start the tool again.
  • Do not perform any 3DEXPERIENCE operations in SOLIDWORKS.
Warning: A pop-up error message Failed to start SOLIDWORKS could appear even if the tool execution is in process.

Click OK. The error message disappears and the execution continues.

Note:

Using -f option may complete the save process fast as compared to -d option, but consumes memory space.

If the transaction is big, the batch processing might take long or process might stop. If the login dialog box appears during the execution of the batch process, enter the login credentials again for the process to continue.

Command Execution

The below table gives information about the operations that you can perform:

Saving a single file in 3DEXPERIENCE Saving the content of a folder in 3DEXPERIENCE
Description

This command saves a single SOLIDWORKS file in 3DEXPERIENCE.

Note: The tool processes and saves the related drawings for a part or an assembly only if --drawing argument is used in the command.

This command saves the content of the folder in 3DEXPERIENCE. The tool scans the content of the given folder and searches for SOLIDWORKS files (files with .sldasm, .sldprt or, .slddrw extensions). Other file types are not processed. Each of the SOLIDWORKS files with their referenced files is saved in 3DEXPERIENCE.

Note: The tool does not process the subfolders present in the given folder. Only if the files in the given folder have reference to files in the subfolders, the referenced files are processed.
Syntax Saving a file in 3DEXPERIENCE

C:\>SaveInto3DEXPERIENCE.exe –-file filepath --swversion sw20xx_spxx

Saving a file with associated drawings in 3DEXPERIENCE

C:\>SaveInto3DEXPERIENCE.exe –-file filepath --drawing --swversion

C:\>SaveInto3DEXPERIENCE.exe –-directory folderpath –-swversion sw20xx_spxx
Example C:\>SaveInto3DEXPERIENCE.exe --file "C:\3DEXPERIENCE\My Work\Skateboard.SLDASM" –-swversion sw2019_sp05 C:\>SaveInto3DEXPERIENCE.exe --directory "C:\3DEXPERIENCE\My Work\Test" -–swversion sw2019_sp05

Note: In the example, it is considered that the tool location is declared in %PATH%. Provide a complete path for the execution of the tool.

Command Output

At the end of the execution, the output is in the form of JSON. It provides the following details:

  • Complete path of saved files.
  • Type, Name, and Revision of the corresponding objects in 3DEXPERIENCE.

Use the below commands to save the generated JSON output in a text file.

  • For File:

    Syntax: C:\>SaveInto3DEXPERIENCE.exe --file save_location_of_file –-swversion sw20xx_spxx -o location_and_format_of_output

    Example: C:\>SaveInto3DEXPERIENCE.exe --file "C:\3DEXPERIENCE\MyWork\Skateboard.SLDASM" –-swversion sw2019_sp05 –o C:\temp\Report1.json

  • For Directory:

    Syntax: C:\>SaveInto3DEXPERIENCE.exe --directory save_location_of_directory –-swversion sw20xx_spxx -o location_and_format_of_output

    Example: C:\>SaveInto3DEXPERIENCE.exe --directory "C:\3DEXPERIENCE\MyWork\Folder1" –-swversion sw2019_sp05 –o C:\temp\Report1.json

Note: The processed section in JSON output displays only those files that are processed files by the tool. If some files are not processed, they appear in the not processed section.

The below example is the JSON output that is displayed on successful execution of the tool. Here, xxx is TenantID.

{
  "processed": [{
     
      "FilePath": "C:\\3DEXPERIENCE\\My Work\\B2\\(xxx)pliers.sldasm",
      "Name": "xcadmodel-89069441-00001311",
      "Revision": "A.1",
      "Type": "XCADModelRepReference"
    }, {
      "FilePath": "C:\\3DEXPERIENCE\\My
      Work\\B2\\(xxx)first branch.sldprt",
      "Name": "xcadmodel-89069441-00001312",
      "Revision": "A.1",
      "Type": "XCADModelRepReference"
    }, {
      "FilePath": "C:\\3DEXPERIENCE\\My
      Work\\B2\\(xxx)second branch.sldprt",
      "Name": "xcadmodel-89069441-00001313",
      "Revision": "A.1",
      "Type": "XCADModelRepReference"
    }, {
      "FilePath": "C:\\3DEXPERIENCE\\My Work\\B2\\(xxx)Pin.SLDPRT",
      "Name": "xcadmodel-89069441-00001314",
      "Revision": "A.1",
      "Type": "XCADModelRepReference"
    }, {
      "FilePath": "C:\\3DEXPERIENCE\\My Work\\B2\\(xxx)bolt.sldprt",
      "Name": "xcadmodel-89069441-00001315",
      "Revision": "A.1",
      "Type": "XCADModelRepReference"
    }, {
      "FilePath": "C:\\3DEXPERIENCE\\My Work\\B2\\(xxx)bolthole.sldprt",
      "Name": "xcadmodel-89069441-00001310",
      "Revision": "A.1",
      "Type": "XCADModelRepReference"
    }
  ]
 }

{
    "not_processed": [{
        "FilePath": "C:\\3DEXPERIENCE\\My Work\\BATCH\\SIMUL\\~$P1.SLDPRT",
        "Reason": "Invalid file"
    }
    ],
    "processed": null
}