Hi,
we would like to have a method call inside the init() method of every .UserCode.cs file of our projects.
We also want this method call to be contained by default in every newly created Recording Module.
Is there any possibility to achieve the latter by modifing e.g. a template or something?
Thanks in advance!
Customize the user code defaults
- Support Team
- Site Admin
- Posts: 12167
- Joined: Fri Jul 07, 2006 4:30 pm
- Location: Graz, Austria
Re: Customize the user code defaults
Hello,
It is possible to create a template for a User Code module that inherits a custom base class.
You would need to adjust the template that is stored in the following location:
Would it be an option for you to create a Framework DLL that contains your method and reference it in your projects? Please take a look at the folliwng post:
http://www.ranorex.com/forum/can-i-chan ... t4494.html
Regards,
Markus (T)
It is possible to create a template for a User Code module that inherits a custom base class.
You would need to adjust the template that is stored in the following location:
Code: Select all
C:\Program Files (x86)\Ranorex 4.1\RanorexStudio\AddIns\AddIns\Misc\RxSharpdevelop\Templates\Files\CSharp
http://www.ranorex.com/forum/can-i-chan ... t4494.html
Regards,
Markus (T)
-
- Posts: 3
- Joined: Thu Sep 26, 2013 12:03 pm
Re: Customize the user code defaults
Hey,
thanks for your response.
our goal is to have the code line with the method call contained by default whenever a Recording Module is created.
This is the standard content of the init() method:
In our projects it should look like this by default (without doing anything in addition):
The DLL solution would make the method available, but we would have to add the code line with the method call manually every time a new Recording Module was created, or is there something I misunderstood?
thanks for your response.
our goal is to have the code line with the method call contained by default whenever a Recording Module is created.
This is the standard content of the init() method:
Code: Select all
private void Init()
{
// Your recording specific initialization code goes here.
}
Code: Select all
private void Init()
{
// Default initialization method call
Testsuite_XYZ.Code_Modules.UtitlityModule.Instance.Method();
}
- Support Team
- Site Admin
- Posts: 12167
- Joined: Fri Jul 07, 2006 4:30 pm
- Location: Graz, Austria
Re: Customize the user code defaults
Hello,
Unfortunately, we currently provide a template for User Code modules only but not for <Recording>.UserCode.cs files. A possible future implementation of such a template will be discussed.
Thank you for your feature request.
Regards,
Markus (T)
Unfortunately, we currently provide a template for User Code modules only but not for <Recording>.UserCode.cs files. A possible future implementation of such a template will be discussed.
Thank you for your feature request.
Regards,
Markus (T)
-
- Posts: 3
- Joined: Thu Sep 26, 2013 12:03 pm
Re: Customize the user code defaults
Hi,
thank you for the clarification.
This feature would be very helpful for us,
we will keep an eye on it
thank you for the clarification.
This feature would be very helpful for us,
we will keep an eye on it

Re: Customize the user code defaults
Great. I'd like to have such a template tooSupport Team wrote: A possible future implementation of such a template will be discussed.
