How to add LocalizedText for Variables in Object?

Questions regarding the use of the .NET SDK 2.0 for Server or Client development or integration into customer products ...

Moderator: uasdknet

Post Reply
Muralikrx
Jr. Member
Jr. Member
Posts: 3
Joined: 13 Nov 2020, 21:06

How to add LocalizedText for Variables in Object?

Post by Muralikrx »

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.

User avatar
Support Team
Hero Member
Hero Member
Posts: 3068
Joined: 18 Mar 2011, 15:09

Re: How to add LocalizedText for Variables in Object?

Post by Support Team »

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.
Best regards
Unified Automation Support Team

Post Reply