Using .NET in IAS Scripting
IAS is as flexible as or more flexible than any other platform out on the market in terms of the breadth of programming possibilities. The concept of inheritance makes it possible to make changes at a template level and all of its children (templates & instances) will be changed too. Equally as powerful is IAS’s inclusion of .NET in their QuickScript language.
Including .NET in scripting has opened up a ton of interesting possibilities. All of the .NET functions are available to be used in scripting. If there is some specialty code you need to write in C++ or C# or want to wrap up for intellectual property reasons, you can write your own dll’s. Some of the .NET libraries are not included by default & anything you write yourself most certainly won’t be there. Non-standard libraries can be added to the Galaxy through the IDE by going to Galaxy –> Import –> Script Function Library.
One of the downsides to using .NET functions in IAS is having to fully qualify every reference to the .NET library. At a minimum, static calls and data type references require this. See the example below.
Dim RE as System.Text.RegularExpressions.Regex;
Dim Result as Boolean;
‘ Create Regex Object
RE = New System.Text.RegularExpressions.Regex();
‘ Setup Regex Object
Result = RE.IsMatch("Test,string", ",");
If you’re browsing around or can’t remember the exact syntax of a function, then you can use the function browser to look up the function:
With .NET in your tool bag, you now access LDAP (Active Direcory), WMI/WQL (local & remote computer management including services), regex (regular expressions text pattern matching), other text functions (split / join), file system access, collections, and many more. Future articles will go into much more detail on specific uses of .NET in IAS including covering gaps in IAS’s security scheme.


Nice blog. We’re using the latest version of Archestra and we created a very simple test class in VS 2010 that has one method call. We imported the dll using Import Scripts. But we don’t see it in the class viewer. Is there something special we need to do in order to see our test class?
Off the top of my head I would check for a couple things.
1) What build of .Net are you using for your DLL. I think you can go up to 3.5 now but with VS2010 you probably defaulted to 4.0. I always try to stay back at 2.0 if I can just to be safe.
2) Make sure your methods are public.
- Andy
Thanks Andy, going down to .NET v3.5 worked for us.
Good deal!
Excellent tip ! Had been stuck on this for a few hours. Also reverted to .NET v3.5 and got my script function library working. Thanks.
This is really some awesome functionality I didn’t know existed. We have a simple pop-up that isn’t working exactly like we’d like. Basically when you click on a symbol in the main graphic we open a pop-up using the show symbol command. When the pop-up opens we animate a string variable to show the tagname of the object using me.tagname. The problem is the pop-up opens and it takes about 2 seconds to resolve the me.tagname reference. The operators think the system is slow because of this. I think if the show symbol was passed the tagname instead of having to resolve it again it this would go away. Is it possible to extend, override, and/or inherit the Archestra dll functions and create my own custom show symbol?
As far as I know I don’t think there’s anyway to override the show symbol functionality. I’m curious why it takes 2 seconds to resolve something as simple as me.tagname. If you put {XXX}.tagname on a graphic does it resolve quicker?
It might not help on this occasion but System Platform 2012 has a new ShowGraphic function that is very flexible. It would certainly allow you to do what you were proposing.