COLNEO console

'COLNEO console' is a console application for the Windows desktop.
The application provides a CLI (Command Line Interface) for COLNEO pro.
This means that the functionality, including the use of script properties and macros, can be used.

The documentation for the complete API can be found here: COLNEO pro API.

The application is launched on the command line with arguments.
A script to be executed and script parameters can be passed as arguments.

Run colneoconsole

Run COLNEO console with a script and script parameters:


$> colneoconsole.exe -s ./script_ifc_cnjson.js -p ./script_ifc_cnjson.json
    

Scripts and Parameters

Parameters can be accessed with a dollar sign followed by the parameter name in curly brackets: ${paramname}.

Example script ( script_ifc_cnjson.js ):


console.log( "TEST SCRIPT-  IMPORT IFC MODEL, WRITE CNJSON")
console.log( `IMPORT FILE : [${filename_import}]` )
console.log( `EXPORT FILE : [${filename_export}]` )

let ret = cnProjectAPI.importModel( filename_import , {} )

console.log( `response: ${JSON.stringify(ret)}`)
let modelid = ret.data

let ret_export = cnProjectAPI.exportModels ( filename_export , [ modelid ], {} )

console.log("ok")
        
Example Parameters:

{            
    "filename_import" 	: "./sampledata/Bürogebäude-V3-R2024_v03.ifc",
    "filename_export"	: "./sampledata/export.tree.cnjson"
}