Auf die VCI-Systemgruppe im Projekt zugreifen - TIAPortal

TIA Portal Openness: API für die Automatisierung von Engineering-Workflows

ft:publication_title
TIA Portal Openness: API für die Automatisierung von Engineering-Workflows
Product
TIAPortal
Version
V20
Publication date
01/2025
Language
de-DE
Auf die VCI-Systemgruppe im Projekt zugreifen

Voraussetzung

Einleitung

Sie können in TIA Portal Openness auf die VCI-Systemgruppe zugreifen, indem Sie aus dem Projekt ein VersionControlInterface als Service aufrufen. Das VersionControlInterface ist ein Service und gibt ein Objekt zurück, das nicht Null ist.

Programmcode

Ändern Sie folgenden Programmcode, um die Workspace-Systemgruppe aus dem VersionControlInterface abzurufen:

Kopiert den nachfolgenden Programmcode in die Zwischenablage.

public void function01()

{

//Accessing VCI system group in project

Siemens.Engineering.Project project = tiaPortal.Projects[0];

Siemens.Engineering.VersionControl.VersionControlInterface versionControlInterface = project.GetService<VersionControlInterface>();

Siemens.Engineering.VersionControl.WorkspaceSystemGroup workspaceSystemGroup = versionControlInterface.WorkspaceGroup;

}