Print form patterns

From SteelMorgan/1c-agent-based-dev-framework · View interactive version

Print form patterns is an AI agent skill from the GitHub repository SteelMorgan/1c-agent-based-dev-framework. Design and implementation of 1C print forms based on MXL layouts: obtaining the layout, filling parameters, outputting areas, integrating with the БСП print mechanism, and runtime validation.

How to use this skill

Skill file

Print forms based on MXL layouts

Purpose

Use this skill for print forms where the result is built as a ТабличныйДокумент from MXL areas.

Design the layout structure through mxl-layout-patterns. This skill describes the application layer of a print form:

Difference from СКД on your own layout

The print form itself controls filling and output order:

Макет = ПолучитьМакет("Макет");
Область = Макет.ПолучитьОбласть("Строка");
Область.Параметры.Поле = Значение;
ТабличныйДокумент.Вывести(Область);

СКД on your own layout fills parameters through СКД expressions and groupTemplate. Use skd-custom-layout for this.

Workflow

  1. Define the purpose of the print form and the print command.
  2. Prepare the data without direct access to the DBMS.
  3. Design the MXL layout through mxl-layout-patterns.
  4. Define the areas:
  1. Define the parameters of each area.
  2. Write the code for filling parameters and outputting areas.
  3. Integrate the result into the standard print mechanism.
  4. Verify runtime generation and the visual result.

If the visual framework came from imported Excel/MXL, do not consider the task solved by the mere fact of import.

A print form begins where the code explicitly takes responsibility for:

Minimal Template

ТабличныйДокумент = Новый ТабличныйДокумент;
Макет = ПолучитьМакет("Макет");

ОбластьШапка = Макет.ПолучитьОбласть("Шапка");
ЗаполнитьЗначенияСвойств(ОбластьШапка.Параметры, ДанныеШапки);
ТабличныйДокумент.Вывести(ОбластьШапка);

ОбластьСтрока = Макет.ПолучитьОбласть("Строка");
Для Каждого СтрокаДанных Из ТаблицаДанных Цикл
    ЗаполнитьЗначенияСвойств(ОбластьСтрока.Параметры, СтрокаДанных);
    ТабличныйДокумент.Вывести(ОбластьСтрока);
КонецЦикла;

Возврат ТабличныйДокумент;

Use the standard configuration patterns and the БСП patterns for obtaining the layout and registering the print form if the configuration works through the print subsystem.

What to Check

by the print form code.

Related Skills


depends_on:


Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.