Script() + add()
Append native command IDs, in order.
script = Script()
script.add("sketch.create", plane="XY", name="Base")Read explanation →← Overview / Cheatsheet
SCPC QUICK REFERENCE
The small public Script interface and native CLI commands at a glance. For context and limitations, read the complete API Guide.
--commands and --describe. These examples are not a complete catalogue of SolidCraft commands.Script() + add()Append native command IDs, in order.
script = Script()
script.add("sketch.create", plane="XY", name="Base")Read explanation →script.commandsGet a detached copy of the command list.
entries = script.commandsRead explanation →to_dict() / to_json()Export native data without running CAD.
document = script.to_dict()
text = script.to_json()Read explanation →save(path)Write native command JSON.
script.save("output/commands.json")Read explanation →Script.load(path)Import JSON as data, without executing Python.
plan = Script.load("output/commands.json")Read explanation →from_json() / from_dict()Import a native JSON string or dictionary.
plan = Script.from_json(text)
plan = Script.from_dict(document)Read explanation →load_script(path)Load ONE non-empty Script from trusted Python.
plan = load_script("model.py")Read explanation →--outExport native command JSON without CAD.
python -m scpc model.py --out output/plate.jsonRead explanation →--run --saveRun in native CLI and save editable SolidCraft .sc.
python -m scpc model.py --run --save output/plate.scRead explanation →JSON replayRun previously exported commands, not Python source.
python -m scpc output/plate.json --runRead explanation →--connectApply one authenticated batch to an open GUI.
python -m scpc model.py --connectRead explanation →--commandsQuery the installed native command registry.
python -m scpc --commandsRead explanation →--describeRead one command schema from the running GUI.
python -m scpc --describe solid.extrudeRead explanation →