1.System Requirements
Windows 7 or Windows server2008 and above 64 bit
JDK1.8

2.Licensing Program Installation
Install the software package under the ”Licensing Control System” folder.
Open“Virbox User Tool”,Click Create Offline-Bound c2d File, and send the file to Gstarsoft company.
Gstarsoft will generate licensing files based on the c2d file, click Import Offline-Bound d2c File, choose the package file and click on Update button to activate the license.

3.Start Task scheduling program
Open apache-zookeeper-3.7.1/conf/zoo.cfg, change the log location.

Open apache-zookeeper-3.7.1/bin/zkServer.cmd, and do not close the command-line interface.
zookeeper must be started first, so before starting, run WebCADDWGTransfer.exe as administrator and see if the service is started, click Stop button if it’s started, and wait for zookeeper to start and then start conversion service.

4.start API port service
Create a folder as the root directory to save drawing files, such as D:\WebCADAPI\files, then open the folder to create two more folders, namely cad and Swap.
Remember the path of folder cad and folder Swap, which we would use later on. The cad file folder is used to save drawings and files after conversion while Swap file folder is swap space for converting program.

Open configuration file gtfs-win64-en\application.properties,if it’s not in the default path of D:/WebCADAPI/files/cad, then change it and pay attention to the direction of slash symbols.

Then double-click start.bat to start the service, or start command-line in the current directory, input java -Xmx1024m -Xms1024m -Xss256k -javaagent:sjt_agent.jar -jar GstarTransformServer-1.0.0.jar to start the service. Please do not close the command-line interface.

5.Start configuration and conversion program
Right-click WebCADDWGTransfer-en/WebCADManager.exe, and then select Run as administrator to open.
There are many configuration settings in the program, do not change parameters other than those mentioned below, using default values is OK.
1.Task Client
Select Zookeeper,add 127.0.0.1:2181 to configuration, please do not change other parameters.

2.Directory settings, pay attention to the slash symbol direction
Data, Cache, Temp:enter root directory for all of the three D:\WebCADAPI\files\cad
Swap space:D:\WebCADAPI\files\Swap
Font, Font space:font folder in the current directory D:\WebCADAPI\WebCADDWGTransfer\font

3.Drawing Data Converter
Click the button at the end of Process, and select WebCADDWGTransfer.exe in the file directory.
Click Apply button in the lower right corner, then click “Install” button and click “Start” button.
Please click Stop before modifying any parameter.
If the software needs to be moved to other directory, please stop and uninstall it, then configure the settings in the new directory to install and start the software.

The maximum count is generally set according to the number of cores the CPU has, for example, with 4-core CPU, the value can be set to 4 for all of the three. Memory is another thing to consider, every count needs at least 3G memory, so to set the value to 4, at least 12G memory is needed.

Parameters that are not mentioned do not need modification, just leave them as default.
6.Conversion API port scheduling
Visit with browser:http://localhost:7088/docs.html related port functions are displayed.
Take ocf conversion function as an example, send http post request to this port using the following parameters. There are file stream and url supported for CAD files, just choose either one.

Click Debug to directly send text request using the interface, choose file, or enter the download address for the CAD drawing, and click Submit button to return the result, there is task ID which can be used to check the results.

Click and check the task execution results, enter task ID to get the conversion results. Then download ocf to the file server using ocf url download address.

{
"rtnCode": "0000000",
"msg": "success",
"ts": 1679977119909,
"bizData": {
"taskType": "MAKEOCF",
"requestId": "f52d3778-9931-45a6-b4d8-614bdb385f92",
"status": 2,
"resultCode": 0,
"resultMsg": "OK",
"transformStartTime": "2023-03-28 12:02:48",
"transformEndTime": "2023-03-28 12:02:48",
"extData": "123sdfsdfsdfgsdsdfsd",
"localPath": "D:/WebCADAPI/files/cad/ocf/2023/03/28/0000000001.1.ocf",
"ocfUrl": "http://localhost:7088/openapi/v1/download?fileId=55223d90-b990-4d3f-b40b-4ecd0f4ee184",
"ocfName": "0000000001.1.ocf",
"version": "1.07",
"layout": "*Model_Space",
"layouts": [
"31",
"*Model_Space",
"Model",
"88",
"*Paper_Space",
"Layout1",
"93",
"*Paper_Space0",
"2222"
]
}
}rtnCode code
Value | Description |
0000000 | Successful |
0000001 | The function is not authorized, please contact administrator |
0000002 | Server busy, please try again later |
0000003 | Abnormal parameters |
0000004 | Filename cannot be empty |
0000005 | File not found |
0000006 | Conversion task does not exist |
0000007 | Please upload dwg file |
0000008 | Please upload ocf file |
0000009 | Please upload 3D drawing file |
0000010 | Please upload ocf3 file |
0000011 | Please upload dwg/ocf file |
0000012 | Please uplaod rvt/stl/ifc/ocf3 file |
0000013 | Save as other file types: only supported in dwg/dxf |
0000014 | save as other versions: 0^ ~5 |
0000015 | Please upload pdf file |
0000018 | Wrong domain of the file url ,please verify and try again |
0000019 | Error occurred during downloading url file, please verify the url and try again. |
0000020 | Error occurred during receiving filestream, please verify and try again |
The status in bizData shows the the status of drawing conversion:
0 : Not started
1 : In process
2 : Completed conversion only means the back end conversion program has returned the results, it doesn’t mean the ocf has been generated, the conversion may have failed and no ocf generated.
resultCode is the same as the code in old version Linux return parameters except that 0 means ocf is generated and all other cases means failed to generate ocf.
Code | Description | |
0 | Successful conversion, otherwise unsuccessful | |
2 | Incorrect taskclass parameter | |
404 | Corresponding drawing not found | |
800 | Unsuccessful conversions, are mostly due to the drawing files, and individual drawing files are needed to find the cause behind the failure. | |
801 | Incorrect input parameter | |
802 | Incorrect configuration file | |
The current version only supports 2D drawing conversion of dwg and dxf formats, 3D drawing conversion is still under development and is expected to complete in the second half of the year, so 3D related port can be safely ignored.
