Table of Contents

Back to JESS API

Get 3D Model from DXF


Use GET /dxf/<job_ID>/<file name> or GET /dxf/<job_ID>/<case_name>/<file name> to retrieve convert the DXF model and return the reference to the converted 3D model.


Synopsis

Return object

A successful /dxf transaction converts the DXF file into a 3D model and returns an object containing the reference to the new model.

{
    "ok": true,
    "status": "Model is ready to view. Use the model reference in the data field.",
    "data": "500bd01e0bd2df1632108d523544fe0a"
}

Example using curl://

Send the /dxf command using curl:

curl -b cookies https://api.ensims.com/jess_web/api/dxf/12251/eplusout.dxf

or if it is a jEPlus project,

curl -b cookies https://api.ensims.com/jess_web/api/dxf/12264/EP_0-T_0-W_0-P1_5-P2_0-P3_0-P4_0/eplusout.dxf

On success, a reference to the newly converted 3D model will be returned in a JSON object. If the requested file does not exist, an HTTP 404 Not Found error will be returned. If the job is not accessible to the current user, or the existing JWT is invalid, an HTTP 401 Unauthorized code will be returned.

Example using Python Requests

Make sure Requests is correctly installed in your Python environment, and run the following lines:

import requests

# Existing cookies are expected to be stored in the variable 'cookies'
r = requests.get('https://api.ensims.com/jess_web/api/dxf/12251/eplusout.dxf', cookies=cookies)

# Or if it is a jEPlus project
r = requests.get('https://api.ensims.com/jess_web/api/dxf/12264/EP_0-T_0-W_0-P1_5-P2_0-P3_0-P4_0/eplusout.dxf', cookies=cookies)

# Show returned object  
r.json()