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\
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
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
}