Merge tags

Post Reply
Posts: 6
Joined: Tue May 28, 2019 3:21 am

Merge tags

Post by BeeJee »

I just wondering if you can merge tags using script.
As example you make a intertal tags "naming" and "type" as string
and "number" as integer.

Can you do something like "naming" = "type" + "Number"

Posts: 137
Joined: Mon Jun 11, 2012 2:10 pm

Re: Merge tags

Post by AMitchneck »

Hi BeeJee,

What do you mean by merge?

Do you mean if "type" has the string value "world" and number has the integer value '9' that you want naming to have the string value "world9"?

If yes, you can use string.Format:

globals.Tags.naming.Value = string.Format("{0}{1}", globals.Tags.type.Value, globals.Tags.number.Value);

another method is to use concatenation:

globals.Tags.naming.Value = globals.Tags.type.Value + globals.Tags.number.Value.ToString();
Adam M.
Controls Engineer

Post Reply