User Guide - DWG FastView Web SDK

System Requirements

  • Operating System: Windows 7 or Windows Server 2008 and above, 64-bit
  • Software Requirements: JDK 1.8

Licensing Program Installation

  1. Install the licensing control program in the “Licensing Control System” folder.
  2. Open “Virbox User Tool,” click “Create Offline-Bound c2d File,” and send the file to Gstarsoft.
  3. Gstarsoft will generate licensing files based on the c2d file. Update and activate the license using “Import Offline-Bound d2c File.”

Starting Task Scheduling Program

  1. Open apache-zookeeper-3.7.1/conf/zoo.cfg and modify the log path.
  2. Run apache-zookeeper-3.7.1/bin/zkServer.cmd in the command line to start Zookeeper. Keep the command-line window open.
  3. Run WebCADDWGTransfer.exe as administrator to ensure Zookeeper starts before the conversion service.

Starting API Port Service

  1. Create a root directory to store drawing files, such as D:\WebCADAPI\files, and create two subfolders: cad and Swap.
  2. Open the configuration file gtfs-win64-en\application.properties and modify the paths as needed.
  3. Start the service by double-clicking start.bat or running the following command: java -Xmx1024m -Xms1024m -Xss256k -javaagent:sjt_agent.jar -jar GstarTransformServer-1.0.0.jar.

Starting Configuration and Conversion Program

  1. Right-click WebCADDWGTransfer-en/WebCADManager.exe and select “Run as Administrator.”
  2. In “Task Client,” select Zookeeper and add 127.0.0.1:2181 to the configuration.
  3. Set paths for data, cache, temp, and swap space, ensuring the correct path format.
  4. Configure the drawing data converter and ensure the correct path for WebCADDWGTransfer.exe.

Conversion API Port Scheduling

  1. Access http://localhost:7088/docs.html in a browser to view API documentation.
  2. Send HTTP POST requests to the port with CAD file streams or file URLs for conversion.
  3. Debug using the API interface, obtain task IDs, and check conversion results.

HTML5 Integration Procedures

  1. The CAD drawing displayed in the browser is an ocf file generated from the CAD drawing, which needs to be sent to the front end for analysis and display.
  2. Supported browsers include Chrome, Firefox, Edge, etc. IE is not supported.
  3. Sample code must be deployed on a server and cannot upload or display ocf files from a local HTML file.
  4. Initialize display control:
    • wrapid: Drawing container DOM ID (required)
    • language: Language setting, options include 'zh'/'en'/'ko' (optional)
    • apiHost: API domain name (optional)
  5. Open ocf file:
    • type: Type of rendered data (currently only "ocf" is supported)
    • bufferData: Binary data object in arraybuffer format
    • fileId: Unique identifier for the current drawing
  6. Use the layout function to switch layouts, sending requests to retrieve the ocf file for the corresponding layout.

Download DWG FastView Web SDK demo