Skip to main content

Notebook Output

Use the -o flag with an argument of a file path to print data about the notebook output to the specified file in JSON format.
    "C:/Program Files/nTopology/nTopology/ntopcl.exe" -j inputs.json -o output.json myNotebook.ntop
An example of the output for surface area, run without the properties flag:
[
    {
        "components": [],
        "name": "SurfaceArea",
        "type": "real",
        "value": {
            "isFinite": true,
            "units": {
                "length": 2
            },
            "val": 6.338634060263063e-05
        }
    }
]

Notebook Output with Properties

You can optionally use the -p flag to include data about the properties of the output, in addition to the standard output. A usage example:
    "C:/Program Files/nTopology/nTopology/ntopcl.exe" -j inputs.json -o output.json -p myNotebook.ntop
The format of the output is an array of JSON objects, with one object for each time the notebook is run (notebooks will run once per set of inputs provided when the -j flag is used). Each object has keys name, type, value, components and if the -p flag was used, properties (keys are not in any guaranteed order). Value is an object representing the serialized value of the output, or null when that is not available. If the output is a list or group, components will contain an array of items in the group of the same format as the outer output, with the exception that the name key will not be there. Properties contains an array of property objects, each with keys name, type, and value, as shown below. When a property’s serialized value is not available, null is printed instead.
[
    {
        "components": [],
        "name": "SurfaceArea",
        "properties": [
            {
                "name": "negative",
                "type": "real",
                "value": {
                    "isFinite": true,
                    "units": {
                        "length": 2
                    },
                    "val": -6.338634060263063e-05
                }
            },
            {
                "name": "scalar field",
                "type": "real_field",
                "value": {
                    "expression": "",
                    "units": {
                        "length": 2
                    }
                }
            },
            {
                "name": "text",
                "type": "text",
                "value": {
                    "string": "0.000063"
                }
            }
        ],
        "type": "real",
        "value": {
            "isFinite": true,
            "units": {
                "length": 2
            },
            "val": 6.338634060263063e-05
        }
    }
]