Beckhoff Automation GmbH & Co. KG — 8.5 How to change the path to a plc project and/or rescan the project

How to If all linkages from "TIPC^Project 1^Standard^Outputs^MyOutput" should be removed, the following code can be used: dim tsm set tsm = CreateObject("TCatSysManager.TcSysManager") call tsm.OpenConfiguration("c:\twincat\myConfig.wsm") call tsm.UnlinkVariables("TIPC^Project1^Standard^Outputs^MyOutput") call tsm.SaveConfiguration See Also How to... section [ } 69] , ITcSysManager [ } 30] , ITcSysManager::UnlinkVariables [ } 34] Built on Tuesday, Mai 01, 2001 8.4 How to disable/enable a tree item (e.g. an I/O device) Requirements To disable/enable a tree item in a configuration, an instance of the TwinCAT System Manager must be created, and the configuration has to be opened.

The LookupTreeItem [ } 35] method of the ITcSysManager [ } 30] interface returns a ITcSmTreeItem [ } 37] interface pointer implemented by the tree item referenced by its pathname. This interface contains a Disabled property of the tree item. Procedure The ProgId " TCatSysManager.TcSysManager " can be used to create an instance of the System Manager that implements the ITcSysManager [ } 30] interface. This interface has a LookupTreeItem [ } 35] method that returns a ITcSmTreeItem [ } 37] pointer to a specific tree item given by its pathname. To disable/enable the tree item " TIID^Device 1 (C1220) " the following vbscript code can be used: Sample (vbscript):

dim tsm dim item set tsm = CreateObject("TCatSysManager.TcSysManager") call tsm OpenConfiguration("c:\twincat\myConfig.wsm") set item = tsm.LookupTreeItem("TIID^Device 1(C220)") item.Disabled = SMDS_DISABLED '(or item.Disabled =SMDS_NOT_DISABLED to enable the tree item) call tsm.SaveConfiguration See Also How to...

section [ } 69] , ITcSysManager [ } 30] , LookupTreeItem [ } 35] , ITcSmTreeItem [ } 37] , Disabled Built on Tuesday, Mai 01, 2001 8.5 How to change the path to a plc project and/or rescan the project Requirements To change the path to a plc project and/or rescan the project in a configuration, an instance of the TwinCAT System Manager must be created, and the configuration has to be opened. The LookupTreeItem [ } 35] method of the ITcSysManager [ } 30] interface returns a ITcSmTreeItem [ } 37] interface pointer implemented by the tree item referenced by its pathname This interface contains a ConsumeXml [ } 61] method of the tree item. Automation Interface 71 Version: 1.2