Forge — Block Type Library
Forge is your reusable Block Type Library: you capture existing blocks from a PLC project, collect and organize them in one place, and later deploy the whole library into any connected PLC — the library's folder structure is recreated as the group structure inside the PLC. Along the way, Forge redraws existing projects as plant graphs that you can browse, validate, edit, and deploy back into a PLC.
Open the Forge view container from the Activity Bar. The Block Type Library appears in the Side Bar as a tree of folders and types.
Prerequisite: Forge is part of the paid editions. Without a license the Forge commands stay disabled — see Licensing.
Connect to Forge
- Open the Command Palette (
Ctrl+Shift+P) and run "Connect to Forge" — or click Connect in the Forge view container. - Once connected, the Status Bar shows Forge: Connected and the library loads.
To disconnect, run "Disconnect from Forge".
Capture blocks into the library
You fill the library straight from an open TIA project (see Project Explorer). Both Forge and the TIA project must be connected.
- Right-click a PLC, a group, or a single block in the Project Explorer.
- Select "Capture to Forge Library".
- Confirm how many items to capture.
- Forge creates a reusable type for each item and mirrors the project's group structure as folders in the library.
Capture covers blocks, data types, and tag tables — including those inside Software Units.
When it finishes, a notification reports how many types were newly created and how many were updated. Items that cannot be captured are listed with their name and reason; identical duplicates are skipped automatically and not counted as failures.
Organize the library
All operations are reached by right-clicking in the Block Type Library:
- New Block Type — adds a new, self-maintained type.
- Edit / Duplicate / Delete Block Type — on a type.
- Folder / Subfolder — structure the library to any depth.
- Rename — on a type or a folder.
- Move to … — assigns a type to a different folder; a picker lists every existing folder.
You can reorder entries by dragging. The folder structure you build here determines the group structure inside the PLC later.
The AI chat helps with writing your own type templates: ask the Forge Engineer agent — it knows the templating language and assists with creating, reviewing, and fixing your templates.
Edit a block type
Double-click a type in the Block Type Library and it opens as a tab: the type's fields on the left, one template tab per output target on the right. The Save button in the toolbar saves the whole type — fields and all templates together.
Unsaved edits are safe: the tab marks them with the usual dot, switching to another tab and back keeps everything — fields and template text alike — and closing the tab asks first whether to save or discard, like any other file.
Open a template in a text editor
A template can also be edited in a regular editor tab — handy for placing it side by side with other files:
- click "Open Template in Text Editor" in the toolbar of the block-type tab, or
- right-click the type in the Block Type Library and choose "Open Template in Text Editor" — if the type has several templates, a list first asks which one to open.
The text tab and the block-type tab always show the same content — what you type in one appears in the other immediately. Ctrl+S in the text tab saves just that template; the Save button in the block-type tab still saves everything.
A brand-new block type must be saved once before its templates can be opened this way — the same applies to a freshly added output target until the next save.
The chat sees your template
While the block-type tab (or one of its template text tabs) is active, the chat assistant automatically has that template as context — it appears above the chat input. Ask about the template right away: the assistant knows its content and the available template helpers — without you pasting anything.
Reverse-engineer a project
Forge can redraw an existing PLC program as a plant graph in one step, capturing all its contents as coupled library types at the same time — the foundation for deploying the program back out of the graph later.
- Right-click a PLC in the Project Explorer (both Forge and the TIA project must be connected).
- Select "Reverse-Engineer Project to Coupled Library" and confirm — library types with a matching name are overwritten.
- A progress indicator follows the run; at the end the new graph opens as a tab, and a notification summarizes how many types were captured and how many objects and connections were drawn.
Items that cannot be captured are named in the notification with their name and reason — they still appear on the graph, but stay without a coupled library type. When one object references the same other object several times, the graph shows a single connection instead of a bundle of parallel lines.
View the project graph
When Forge reads in an existing project, it draws a visual map of it as a graph. Open a graph from the Plant Graphs list in the Forge view container — double-click a graph and it opens as a tab. You can pan by dragging the empty canvas and zoom with the mouse wheel; click any item to inspect it. Long names are shortened on the map — the full name appears when you hover over them.
Remove several graphs from the list
In the Plant Graphs list you can also select several graphs at once: Ctrl+click adds or removes an individual entry, Shift+click selects a range, and Ctrl+A selects all. Then press Delete (while the list has focus), or right-click the selection and choose "Delete N Plant Graphs" — a single confirmation covers the whole selection. To remove a single graph, use the trash button that appears when you hover over its row.
Read the graph by category band
The graph arranges everything into clear horizontal category bands, stacked top to bottom by type: organization blocks, function blocks, instance data blocks, functions, data blocks, data types, technology objects, tags, and hardware. Bands that hold nothing are hidden.
- Each band is labelled on the left, with light alternating shading so neighbouring bands are easy to tell apart.
- Inside a band, items are grouped by their project folder, and each folder cluster carries its folder name.
Switch the layout
A toolbar button toggles between Layout: Category — the band view above — and Layout: Hierarchy, which lays the graph out as a dependency tree following parent-to-child relationships. The graph opens in a sensible layout automatically, and your choice is remembered for that graph, so it comes back the way you left it next time you open it.
Collapse the Tags band
The Tags band starts collapsed to a compact chip (for example "Tags ×15") so it doesn't crowd the view. Click the chip — or any band's label — to expand or collapse that band. Your collapsed and expanded choices are remembered for that graph.
Drill into folders
On large projects a row could otherwise be crowded with hundreds of items at once. Instead, each row groups its blocks into folder boxes, each labelled with the folder name and a count — for example "Sensors ×340". Click a folder box to open it and see the blocks inside; click it again to close it. Your open and closed choices are remembered for that graph.
Bundled connections
While a folder is closed, all the connections running into and out of it are shown as a single, thicker line with a number — how many individual connections it stands for. Open the folder and those connections fan out into the individual lines.
Overview when zoomed out
Zoom far out and each category collapses to a single labelled bar, giving you a clean, high-level overview of the whole project at a glance. Zoom back in and the individual blocks reappear.
Smooth on big projects
Even very large projects — thousands of blocks and data types — open and pan and zoom smoothly, including projects that previously couldn't be shown at all.
Find a block
A search box in the toolbar lets you type a block name. The graph opens the folders on the way to the match and centres on it, so you can jump straight to any block without hunting through the view.
Browse objects in the Plant Tree
The Plant Tree view in the Forge Side Bar shows a plant graph's objects as a folder tree — the same folder structure as in the project. When a folder level holds several kinds of objects, the tree additionally groups them by category (function blocks, data blocks, data types, and so on).
- When several graphs exist, a dropdown at the top of the view picks which graph is shown — each entry carries the graph's name plus its creation date.
- The trash button in the view's title bar deletes the shown graph (after confirmation).
- Click an object to inspect its details; double-click (or
Enter) opens the graph as a tab and jumps straight to the object. - Right-click an object for "Reveal in Graph", "Open Plant Objects" (opens the table pre-filtered to the object's folder), and "Delete Node" (confirmed). Right-click a folder for "Open Plant Objects in Folder".
The tree updates live as the graph changes.
Edit objects in the table
"Open Plant Objects" (Command Palette, or the Plant Tree's context menu) opens a graph's objects as a table in an editor tab — the place to review properties and edit them across many objects at once.
- Filter: toggles per object kind, a sub-type dropdown, a folder prefix box, a search across symbol and description, and a "Without edges" toggle for objects with no connections. A sort dropdown with an ascending/descending toggle orders the rows.
- Columns: Symbol, Kind, Sub-Type, Folder, Description, and Edges. When the table shows objects of a single sub-type only, it adds one column per property.
- Inline editing: click a cell (symbol, description, or a property) and change the value in place — it is saved immediately. If the object was changed elsewhere in the meantime, the table reloads the latest values instead of overwriting them.
- "Set Column…": select several rows and set one property to the same value for all of them. The operation runs with a progress indicator and can be cancelled; if a conflict occurs, it stops and reports how many objects were set — the rest are left unchanged.
If the plant graph is deleted while its table is open, the tab shows a note saying so and can simply be closed — no error message appears.
Preview generated source live
With a plant object selected (in the Plant Tree, the table, or on the map), "Preview Generated Source" (Command Palette) opens that object's generated source — read-only, right beside your work. The first time, Forge asks which code-generation targets to preview; the choice is remembered per graph. If the object has no generated source, a brief note appears in the Status Bar.
To make the preview follow your selection automatically, enable the Preview: Auto Open option in the Forge section of the Settings — the preview then refreshes by itself as you click through objects.
Validate the plant graph
"Validate Plant Graph" (Command Palette) scans a graph for anomalies — for instance a connection that comparable objects have but this one lacks, an empty required property, or an unusual numeric value. A notification summarizes warnings and notices, and the findings appear in the Diagnostics view under Anomaly Checks. Clicking a finding jumps straight to the affected object on the map. The check is read-only — it never changes the graph.
AI assistance
The chat assistant knows your plant graphs: it can read objects and their properties, validate the graph, and — on your instruction — add, change, or remove objects and connections. Every change to the graph asks for your confirmation first — it can never be approved automatically.
Deploy the library to a PLC
One command materializes the whole library as blocks in a connected PLC.
- Make sure Forge is connected and the TIA project has a PLC (connect the project via "Connect to TIA Openness Manager").
- Click Deploy (cloud icon) in the title bar of the Block Type Library or of the Project Explorer (shown there once Forge and the TIA project are both connected) — or run "Deploy Library to TIA Portal" from the Command Palette.
- If the project has several PLCs, pick the target PLC from the list.
- If blocks with the same names already exist, a confirmation appears with the number of blocks to be overwritten — confirm with "Deploy and Overwrite" or cancel.
- A progress notification follows the deploy; at the end a notification reports how many blocks were imported into the PLC. The project is then compiled and saved.
The blocks land in the same group structure as in the library — nested folders are created as nested groups in the PLC. Deploying again reuses the existing groups and overwrites the blocks.
Supported content: program blocks (FB/FC/OB, global and instance DBs), PLC data types (UDTs), and PLC tag tables. Types in unsupported categories are skipped before the deploy and counted in the final notification; statement-list (STL) blocks are likewise skipped up front and named in the final notification with their reason. Contents from Software Units are also skipped up front and named in the final notification with their name and reason — deploying into Software Units is not yet supported.
Deploy a plant graph
A plant graph can be deployed straight into a connected PLC, too — with everything it holds: blocks, data types, and tag tables.
- Open the graph as a tab and click Deploy (rocket icon) in its title bar (visible while the TIA project is connected) — or click the rocket in the title bar of the Plant Graphs list or of the Project Explorer: the open graph is deployed; with none open, the only stored graph is used, and with several you pick one from a list. Alternatively run "Deploy Graph to TIA Portal" from the Command Palette.
- If the project has several PLCs, pick the target PLC from the list.
- If blocks with the same names already exist, confirm the overwrite with "Deploy and Overwrite".
- At the end a notification reports how many blocks were imported into the PLC. If a block fails, the message names it with its name and reason — everything else is still imported. Items skipped up front — such as STL blocks, or tag tables from Software Units — are also listed in the message with their name and reason.
See what Forge is doing
The Output panel has its own Forge channel: it shows live what the generator and the Forge connection are doing — helpful when a capture or a deploy doesn't produce the result you expected.
Notes & limitations
- Forge and the TIA project must both be connected. If either connection is missing, or the project has no PLC, a notification says so and nothing is changed.
- Overwriting requires confirmation — same-named blocks are only replaced after you confirm.
- Graphical blocks (LAD/FBD) may be rejected by TIA Portal depending on the target CPU; SCL blocks, instance and global DBs, UDTs, and tag tables deploy reliably. The final notification reports any blocks that were not imported, with the reason.
- Statement-list blocks (STL) are skipped up front during a deploy and named in the final notification with their name and reason — instead of producing a TIA Portal error.
- Same names in several places: when two items share one name — say a data type under the PLC data types and a same-named one inside a Software Unit — both are captured; the item from the Software Unit gets a unique label in the library that shows which Software Unit it belongs to. Only identical duplicates in the same place are skipped quietly.
- Tag tables from Software Units are currently skipped up front on deploy and named in the final notification with their name and reason — deploying into Software Units is not yet supported.
- Deploying nested groups requires TIA Portal V17 or newer.