Skip to end of metadata
Go to start of metadata

You are viewing an old version of this content. View the current version.

Compare with Current View Version History

« Previous Version 5 Next »

Create a PDF

By running script

You can run _SAVEFILEFORDOWNLOAD command from a script to create a PDF from your drawing passing parameters as followed:

_SAVEFILEFORDOWNLOAD _PDF "test.pdf" 0 0 0 false

Command parameters:

  1. Key “_PDF” to determine that you want to save the file as pdf

  2. File name that needs to be in ““ as it could contain spaces

  3. Upload option:

    1. 1: the result will be uploaded to API backend (POST /files is done, see API Documentation )

    2. 0: the result is uploaded to output bucket (SaaS version) or written to a dedicated script output folder (on-premise version)

  4. Text as geometry option:

    1. 1: Texts are exported as geometry

    2. 0: no text conversion

  5. Print option: (pass only if (3) upload option is not 1)
    must be 0 when running from script

  6. Download option: (pass only if (3) upload option is not 1)
    must be false when running from script

A sample script file can be found here.

Sample call to run it locally with on-premise version:

GET http://localhost:8081/startScriptJob?server=http://localhost:3000&file=Construction.dwg&outputPath=c://tmp/&script=https://docs.dev.graebert.com/kudo/samples/pdfcreation.scr

To run on https://app.kudo.graebert.com/ you need to specify “file” correctly and add proper “auth” parameter or wrap the parameters in an api token using your app key.

By fileType parameter (On-premise only)

Optionally you can create a PDF from your drawing easily via a headless script job in the on-premise version by just passing fileType=PDF query parameter to the endpoint.

Sample call that uses our sample backend API server and creates a PDF from the drawing in c://tmp/ :

GET http://localhost:8081/startScriptJob?server=http://localhost:3000&file=Construction.dwg&outputPath=c://tmp/&fileType=PDF

Create an image

By running script

You can run _DOEXPORT command from a script to create images from your drawing passing parameters as followed:

_DOEXPORT "test.bmp" "bmp" "" 0 ""

Command parameters:

  1. File name that needs to be in ““ as it could contain spaces

  2. File type that needs to be in ““ as it allows to contain spaces (e.g. in format “Bitmap .bmp”)

  3. Folder id passed to file upload if next option is true

  4. Upload option:

    1. 1: the result will be uploaded to API backend (POST /files is done, see API Documentation )

    2. 0: the result is uploaded to output bucket (SaaS version) or written to a dedicated script output folder (on-premise version)

  5. Selection of drawing content: enter or _ALL to select all

A sample script file can be found here.

Sample call to run it locally with on-premise version:

GET http://localhost:8081/startScriptJob?server=http://localhost:3000&file=Construction.dwg&outputPath=c://tmp/&script=https://docs.dev.graebert.com/kudo/samples/imagecreation.scr

To run on https://app.kudo.graebert.com/ you need to specify “file” correctly and add proper “auth” parameter or wrap the parameters in an api token using your app key.

By fileType parameter (On-premise only)

Optionally you can create an image from your drawing easily via a headless script job in the on-premise version by just passing appropriate fileType query parameter to the endpoint.

Supported file types for images are: PNG, SVG, BMP and JPG.

Sample call that uses our sample backend API server and creates a BMP from the drawing in c://tmp/ :

GET http://localhost:8081/startScriptJob?server=http://localhost:3000&file=Construction.dwg&outputPath=c://tmp/&fileType=BMP

  • No labels