anim_export_frames
Export every animation frame from a COMSOL plot group as a numbered PNG sequence, then compose the frames into a GIF or MP4.
Instructions
Export a numbered PNG image sequence from a COMSOL plot group (native imageseq).
This is COMSOL's own frame exporter: it writes <base>1.png,
<base>2.png, ... and is the fastest way to dump every animation frame
to disk (later compose them with media_frames_to_gif / media_frames_to_mp4,
or use anim_create which does both steps automatically).
Args: plotgroup: plot group tag to export, e.g. "pg1". directory: directory for the frames (default: artifact workspace). base: frame base name/path, e.g. "C:/out/frame" -> frame1.png, ...; the actual COMSOL naming is discovered automatically. maxframes: maximum number of frames to write (>= 2, default 25). width: frame width in px (default 640). height: frame height in px (default 480). solnumtype: "all" | "level1" | "level2" | "level3" | "inner" | "outer". solnum: explicit 1-based solution numbers, e.g. [1,2,3,4]. sweeptype: "solutions" (default) | "parameter" | "globalparameter". tag: explicit Animation export feature tag. model: model name/tag (None = current model).
Returns: JSON with directory, frame_paths, frame count, base path and validity.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"plotgroup": "<plotgroup>"
},
"name": "anim_export_frames"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| tag | No | ||
| base | No | ||
| model | No | ||
| width | No | ||
| height | No | ||
| solnum | No | ||
| directory | No | ||
| maxframes | No | ||
| plotgroup | Yes | ||
| sweeptype | No | ||
| solnumtype | No |