Commands  ›   ›  Apply View Template

Apply View Template

writes to model Public API · not yet exposed

Coming soon

Before you run this

Active document must be open. The named view template must exist in the project. The target view must not itself be a template (cannot apply a template to a template).

After it runs

The target view's ViewTemplateId is set to the resolved template's element ID. All template-controlled settings are applied to the view.

When to use this

Don't use this when

Creating new view templates (use a dedicated CreateViewTemplateCommand). Adding filters to templates (use AddFilterToTemplateCommand). Removing templates from views.

Inputs

NameKindTypeRequiredDefaultDescription
templateName config string no View template name
viewId config integer no Optional target view id (defaults to active view)

Returns

NameTypeDescription
ResultJSONApply template result with view and template details

What you'll see in the chat

on start
Applying view template to the target view...
Setting up the view template now...
thinking
Resolving target view...
Looking up template by name...
Applying template to the view...
on success
Template '{templateName}' applied to the view successfully.
on failure
Could not apply view template: {error}

REST API

Not yet exposed

This command does not carry a [RestApi] attribute today. Once tagged, this section will auto-populate with:

  • POST /api/v1/commands/apply_view_template
  • Request body schema (from [RestApiParam])
  • Response schema (from [RestApiResponse])
  • curl / JS / Python code examples

Keywords & intent patterns

apply view template · set template on view · assign template · view template · apply template to view

Related commandsAddFilterToTemplateCommand
Pillar