form_create_from_tsm
Creates a T-spline body from TSM text or a .tsm file, enabling complex control-mesh edits by generating a new form from modified TSM data.
Instructions
Create a T-spline body from TSM (T-spline mesh) text or a .tsm file - exactly one
of tsm and path.
This is the way to complex control-mesh edits the Fusion API lacks: form_get_tsm -> change the text -> form_create_from_tsm (then hide or delete the old form).
Errors: both / neither input, a path that is not absolute / missing / not .tsm, text over 8 MiB -> INVALID_PARAMS; TSM Fusion cannot read -> FUSION_API_ERROR "invalid TSM" (nothing is left).
Returns {"form": ref, "body": , "created_form": bool}.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| tsm | No | TSM text (up to 8 MiB), e.g. edited | |
| form | No | Existing form feature to add the body to (default: a new form feature) | |
| name | No | Name of the new body | |
| path | No | Absolute path of a .tsm file | |
| component | No | Component or occurrence for a new form feature (default: the root) |