Samples | Measurement The following element types are available as an enum in TwinCAT.Measurement.AutomationInterface.dll for the CreateChild method: Creating a TwinCAT Measurement project TwinCAT Measurement is a global "container" that can host one or more measurement projects, e.g. a TwinCAT Scope configuration. Similar to a regular TwinCAT configuration, each project is first described with the aid of a template file. This template file is used when adding a new project to the solution, which can be done by calling the AddFromTemplate() method from the Visual Studio DTE object. Note that this procedure is the same when adding a regular TwinCAT project.
The following code snippet assumes that you have already acquired a DTE instance and created a Visual Studio solution, as shown in our article about Accessing TwinCAT configuration [ } 22] . A reference to the DTE instance is stored in the "dte" object. Code snippet (C#): EnvDTE.Project scopeProject = dte.Solution.AddFromTemplate(template, destination, name); Definition of the parameters: Creating a TwinCAT Scope configuration A TwinCAT Scope project stands for a recording configuration. This means that all elements inserted into the project are subject to the same recording settings.
You can add a Scope project via the Automation Interface by specifying the appropriate "TwinCAT Scope Project" template when adding a project using the AddFromTemplate() method, as described above. TE1000 287 Version: 1.7.0 int CloseControl(); Closes the editor of the project int LookUpChild(string name, out object childNode); Searches for the element matching the name in the project tree.
CursorAlignment Vertical = 1, Horizontal = 2 MarkerType TimeMarker = 100, XMarker = 101, YMarker = 102 ChartElement AxisGroup = 0 ChartType YT = 0, XY = 1, ARRAY = 2, SingleBar = 3 AcquisitionType ADS = 0, OPC = 1 ConditionType Area = 0, Threshold = 1 AxisGroupMember Channel = 0, RoundShape = 1, AngularShape = 2 TriggerSetType ChannelSet = 0, DirectorySet = 1 ChannelMember AcquisitionInterpreter = 0, DynamicStyle = 1 template The standard template files are located in the installation directory of TE130X-Scope-View (e.g. C: \TwinCAT\Functions\TE130X-Scope- View\Templates\Projects\) and have the file type "tcmproj".
destination Path in which the new configuration is to be saved on the hard disk. name Name of the project configuration.