Documentation
ForceParent
Require: IP-Symcon >= 4.0
 boolean ForceParent (string $ModuleID) 
  Parameters
| ModuleID | 
Returns
If the command succeeds, it returns TRUE, otherwise FALSE.
Description
This function is not available for IPSModuleStrict. Please consider using the new GetCompatibleParents function
A connection with a compatible parent instance with the GUID ModuleID is forced. If the previous connection does not match the desired ModuleID, it will be disconnected. Following, a new instance with the parent ModuleID is created and linked.
A list of the available module IDs is available here .
The normal case for the function is a splitter module, which, depending on the configuration in the interface, requires a different I/O module.
Normally, this function is called only in the Create() or ApplyChanges() method.
Example
// IPSModuleStrict
ConnectParent/RequireParent/ForceParent is not available, 
but can be replaced by the new function "GetCompatibleParents()"
// IPSModule
public function ApplyChanges() {
    // Never remove the line!
    parent::ApplyChanges();
    // Create different I/O instances depending on the configuration
    switch($this->ReadPropertyInteger("GatewayMode")) {
        case 0: //Create ClientSocket in mode 0
            $this->ForceParent("{3CFF0FD9-E306-41DB-9B5A-9D06D38576C3}");
            break;
        case 1: //Create SerialPort in mode 1
            $this->ForceParent("{6DC3D946-0D31-450F-A8C6-C42DB8D7D4F1}");
            break;
    }
                
}