Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Generate API Token
Login

This document explain what steps are required to setup and call jobs that allow use CLI Service API to input a BIM model (Revit or IFC files) and produce the PDF with 2D drawings with annotations (dimensions, labels and materials).

1. Generate API Token


Access the Tokens tab after logging in to https://arescli.graebert.com/ platform

and access Tokens tab.
Click

. If this is your initial login to Graebert’s portal, you might have to register and revisit the https://arescli.graebert.com/ page post email verification. Proceed by clicking on 'Generate new API key,' then copy and

use

apply it

on

to the designated API endpoints.

image-20240530-170629.png

2. Load Environment

Use

Call the POST method on /{type}/upload,

with

specifying type = environment to

load

upload the .zip file.

Get

Retrieve the response environment ID

to use on job execution.
image-20240530-171035.pngImage RemovedLoad File
Use POST

for utilization in job execution. Upon successful loading of this environment, reloading is unnecessary unless customization is needed.

View file
namebim2pdf.zip

Info

The complete API CLI Service documentation can be find here.


image-20240530-171035.pngImage Added

3. Load File

Call the POST endpoint /{type}/upload,

with

where type = file, to

load

upload the file that needs to be processed (either .rvt file or .ifc).


Get

Obtain the response file ID

to

for use

on

during job execution. Remember, each time you have a new file that needs processing, it must be uploaded before executing the job.

image-20240530-171212.pngImage Modified

4. Execute Job

Use Call the POST /execute method to create establish and run execute a new jobfresh task.
FillComplete the following fields: “environment:“ with

  • Set "environment:" to the corresponding environment ID.

”configuration
  • Assign "configuration:

” with configuaration content (see
  • " with the configuration string (refer to the details displayed in the right panel).

    View file
    nameconfig string sample.json

“files:“ with file ID
  • Specify "files:" as per file ID.


Within the configuration string, ensure that you substitute BIM_Input variable's value with the specific name of the file intended for processing (the uploaded file dispatched via files for execution endpoint).


image-20240530-171720.png
Code Block
{
    "Inputs": {
        "comment": "the input file format as uploaded on the ARESCLI portal Environment NOTE: should be same of script var BIM_input in the script section for this script",
        "inputfileformat": "rvt",
        "script": {
            "comment": "location and extension of the script as uploaded on the ARESCLI portal Environment. Also the variables used the script are defined in this section",
            "scriptpath": "scripts/bim2pdf.scr",
            "scriptformat": "scr",
            "scriptvariables": [{
                "name": "OUTPUTDIR",
                "value": "output.dwg",
                "comment":"name of the desired output file, NOTE: this name should be same as the first name of the outputfilename(extension should be dwg) in Outputs section"
            },
            {
                "name": "BIM_input",
                "value": "input.rvt",
                "comment":"name of the rvt file as uploaded on the ARESCLI portal, NOTE:this is not the fileId" 
            },
            {
                "name": "BIM_AUTO_TEMPLATE",
                "value": "templates/bimautotemplates/ISO_A1_Landscape(1_100)_Header_wfields.dwg",
                "comment":"location of the bim templates in zip uploaded on the ARESCLI portal Environment"

            }]
        },
        "templates": {
            "comment": "location of the templates in zip and their extensions as uploaded on the ARESCLI portal Environment",
            "drawingtemplate": "templates/drawingtemplates/standardiso_mm.dwt",
            "drawingtemplateformat": "dwt",
            "bimautotemplates": "templates/bimautotemplates/ISO_A1_Landscape(1_100)_Header_wfields.dwg", 
            "bimautotemplatesformat": "dwg"
        }
    },
    "Outputs": {
        "outputfileformat": "pdf",
        "outputfilename": "output.pdf",
        "comment": "name of the desired output file NOTE: the name of file without the extension should be same as the script var OUTPUTDIR for this bim2pdf script"
    }
}

Track

6. How to track Job status

Use


Call the endpoint GET /jobs/{jobId}/download/{type}/{jobid} to

track

monitor the

status

progress of the job.

The possible status are:

-
  • PENDING

-
  • COMPLETE

-
  • FAILURE

7. Download job result

Use


Call the endpoint GET /jobs/{jobId}/download/{type}

with

endpoint by specifying type = result to

download

retrieve the output file.


In case

If the job

failed, download

encountered an issue, access files with type = log and type = zip to

get

analyze the

files to investigate the

error further.