I have created several ObjectTypes with multiple Variables and Objects. I am able to set DisplayName as LocalizedText for the ObjectType's instance created.
However, I couldn't find a method to set the DisplayName of the child objects and variables.
Is there any overridable method or any mechanism to perform this?
Pls Note: Changing the DisplayName of children, once object creation is complete, would be difficult because, there is a lot of child objects and variables, with several levels of hierarchies. In that case, I would have to browse, through each level, and find the InMemoryNodes, and then have to set the localized text.
How to add LocalizedText for Variables in Object?
Moderator: uasdknet
-
- Jr. Member
- Posts: 3
- Joined: 13 Nov 2020, 21:06
- Support Team
- Hero Member
- Posts: 3071
- Joined: 18 Mar 2011, 15:09
Re: How to add LocalizedText for Variables in Object?
Hello,
You should update the DisplayNames of the instance declarations, i.e. the children of the type. You can use the ServerManager.InternalClient to browse to the children and to write the DispalyName attributes.
If an instance of the type is created, the DisplayName attribute is copied, so all children of the instance are getting the same DisplayNames than the instance declarations have.
You should update the DisplayNames of the instance declarations, i.e. the children of the type. You can use the ServerManager.InternalClient to browse to the children and to write the DispalyName attributes.
If an instance of the type is created, the DisplayName attribute is copied, so all children of the instance are getting the same DisplayNames than the instance declarations have.
Best regards
Unified Automation Support Team
Unified Automation Support Team