Page 1 of 1

Tag description

Posted: Thu Jan 24, 2013 12:54 am
by smolenak
Hello,

is there any possibility to show the tag description on the screen?
Thanks!

Re: Tag description

Posted: Thu Jan 24, 2013 3:48 am
by Edmund
Hi Smolenak!

Yes you can, You access it via the Description property.

Create a textfield and try this.

Code: Select all


void Screen1_Opened(System.Object sender, System.EventArgs e)
{
       Text1.Text = Globals.Tags.Tag1.Description;
}
The Description property is not visible in the script editor in iX but if you switch over to Visual Studio you will see it.

Best Regards

Edmund

Re: Tag description

Posted: Thu Jan 31, 2013 8:14 am
by wlederer
As I understand, Visual C# must be installed ?
If yes, which version, release..?
regards, Waldemar

Re: Tag description

Posted: Thu Jan 31, 2013 8:54 am
by mark.monroe
iX Developer has a C# compiler, and it installs it by default. You do not need to install Microsoft Visual Studio.

Re: Tag description

Posted: Thu Jan 31, 2013 9:29 am
by wlederer
Thank You Mark,
how can I make the "Description" option for a tag in the:
Text1.Text = Globals.Tags.Tag1.Description;
visible?

Re: Tag description

Posted: Thu Jan 31, 2013 9:33 am
by mark.monroe
You code works to do what you want. Maybe you do not have a description for that tag.

Code: Select all

		void Button1_Click(System.Object sender, System.EventArgs e)
		{
			Text1.Text = Globals.Tags.Tag1.Description;
		}

Re: Tag description

Posted: Thu Jan 31, 2013 9:56 am
by wlederer
I put some description to a tag.
But, when I put dot after the tag's name, no "Description" option is seen. Is it normal? Where all available options can be seen? May be, in Visual C# manual?

Re: Tag description

Posted: Thu Jan 31, 2013 10:11 am
by mark.monroe
Only properties that are marked as "visible" can be seen. When you are in your script, you can press F1 and it will bring up the script help which has all of the properties and methods an object has.

Just because the autocomplete doesn't display a properties doesn't mean it is not there.