pub fn program(source: &str) -> StringExpand description
An editor script as a program for the ScriptHost. A module (a line
starting import or export) runs as written. Anything else is a classic
editor body: it runs with cad.document (the history snapshot with
addFeature(type, params, persistentData), updateFeature(id, params)
(a merge, as feature_set_params merges) and deleteFeature(id)),
cad.selection, cad.brep (every app tool) and ui.notify; the document
commands apply in order after it returns, and a returned value prints as
Result:. The body may await.