Closed mcsSolutions closed 4 years ago
To determine if a device is a parent or a child call hs.IsRefDevice()
Parents are devices, and children are features. I am going to close this issue as I believe that solves your objective, but I understand the depth of the reported issue.
You are correct that you will be unable to read the new DeviceType property as if it is an HS4 device when it was created using an HS3 plugin. We may implement a way to go between the two type definitions in the near future, but, as of right now, there are no plans to change this.
Is there a specific reason why you are seeking to analyze whether an item is a device or a feature this way as opposed to using the Relationship property?
Using IsRefDevice() is an acceptable means to achieve the desired objective. For what I see now there is no other reason to need a bridge for ApiType.
The objective is to determine if a device created in HS3 is a parent or child. The Child/Parent property of HS3 is not longer available and this information is now in DeviceType in HS4. When DeviceType is viewed in HS4 for a device created in HS3, the Api field is not populated. This is expected to contain info as to it being a child or parent. The function below illustrates with some lines commented out because of the HS4 issue reading HS3-created devices.