IronPython Documentation
The information below is aimed at IronPython 2.7.3. This is the version used for scripting in SoftPro Select. The obvious question is why don’t we update? The obvious answer is – why?
The information below is aimed at IronPython 2.7.3. This is the version used for scripting in SoftPro Select. The obvious question is why don’t we update? The obvious answer is – why?
IronPython code will automatically look in the following folders for DLLs and code modules for Custom Order Rules.
I was curious about the methods exposed when you do an import clr command. The source code for ClrModule.cs is here. Methods marked as “Advanced” are highly specialized and will not be covered. Methods AddReference(string[] references) : void Add DLL to internal list of assemblies useable by code. Adds a reference to a .NET assembly. Parameters can be… Read More »
It can be very difficult to get debug information when developing Python scripts in Select – especially developing Automation Code Snippets. This technique provides a welcome solution by writing error/debug information to the system Event Log. Be aware the developer MUST REMOVE the Event Log writer before releasing the code to production. Setup Add the following function to… Read More »
For .NET developers that are unfamiliar with Python, they may not be aware that the LINQ methods they use have already existed in the Python language for a long time. For Python developers who may be unfamiliar with LINQ, they are a very convenient extension methods that allow you to process lists by filtering and modifying the resulting… Read More »
This topic is designed to provide examples of how to use C# libraries in IronPython executing in SoftPro Select. While the examples are valid for all C# uses, the objects used may be unfamiliar to many. TLDR In C#, properties typically hide class variables and allow the developer to validate user inputs. It also allows developers to allow… Read More »
There are times you want to add an additional .NET library to your code. It might be an actual Microsoft assembly or from another vendor. First you import CLR then add the desired assembly. (Note that the DLL must be either in the GAC or the executable folder.) Finally import the type/class namespace(s). If you want to minimize… Read More »
This page is designed to provide examples of using .NET features in IronPython when creating Softpro Select content. The comprehensive example is here but I’ll provide examples in a form you are more familiar with. In all the code below, “order” is always the top level order object. For instance, in a custom order rule (COR), it is… Read More »