Activating license response files

The following article describes how license response files can be loaded via the TwinCAT Automation Interface. This function is provided via the XML description of the "License" node.

<TreeItem>
  <ItemName>License</ItemName>
  <PathName>TIRC^License</PathName>
  <ItemType>59</ItemType>
  <LicenseDef>
    <Commands>
      <ActivateResponseFile>
        <Path>...</Path>
        <OemGuid>...</OemGuid>
      </ActivateResponseFile>
    </Commands>
  </LicenseDef>
</TreeItem>

The <Path> to the license response file can be specified in the XML area <ActivateResponseFile>. This XML document can then be loaded via a ConsumeXml() to the "License" node in order to activate the license response file. The parameter <OemGuid> is only required in special cases and can be given any value, e.g. 0.

Code snippet (C#):

ItcSmTreeItem license = systemManager.LookupTreeItem("TIRC^License");
license.ConsumeXml(xmlDescriptionFromAbove);

System requirements

Required TwinCAT version

TwinCAT v3.1.4022.4