Tag description

A forum devoted to the discussion of all topics having to do with scripting and other advanced programming using iX Developer.
Post Reply
smolenak
Posts: 22
Joined: Tue Nov 20, 2012 3:06 am

Tag description

Post by smolenak »

Hello,

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

User avatar
Edmund
Posts: 92
Joined: Thu Nov 29, 2012 2:27 pm

Re: Tag description

Post 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
Edmund Andersson

AITECH AB

Part of Beijer Integrator Group

wlederer
Posts: 175
Joined: Fri Jan 27, 2012 4:20 am

Re: Tag description

Post by wlederer »

As I understand, Visual C# must be installed ?
If yes, which version, release..?
regards, Waldemar

mark.monroe
Posts: 824
Joined: Tue Mar 13, 2012 9:53 am

Re: Tag description

Post by mark.monroe »

iX Developer has a C# compiler, and it installs it by default. You do not need to install Microsoft Visual Studio.
Best Regards,
Mark Monroe

Beijer Electronics, Inc. | Applications Engineer

wlederer
Posts: 175
Joined: Fri Jan 27, 2012 4:20 am

Re: Tag description

Post by wlederer »

Thank You Mark,
how can I make the "Description" option for a tag in the:
Text1.Text = Globals.Tags.Tag1.Description;
visible?

mark.monroe
Posts: 824
Joined: Tue Mar 13, 2012 9:53 am

Re: Tag description

Post 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;
		}
Best Regards,
Mark Monroe

Beijer Electronics, Inc. | Applications Engineer

wlederer
Posts: 175
Joined: Fri Jan 27, 2012 4:20 am

Re: Tag description

Post 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?

mark.monroe
Posts: 824
Joined: Tue Mar 13, 2012 9:53 am

Re: Tag description

Post 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.
Best Regards,
Mark Monroe

Beijer Electronics, Inc. | Applications Engineer

Post Reply