Hi
I have come across this problem several times and it's not too difficult to work around but I wondered if there is a way to have a variable (say a string value) that a UserCode method has set and make it available in the recoding module so that I can send that as an argument to another user code method while keeping the obvious flow of the program within the recording module.
for example in my recording module I want something like this
UserCode FindX()
UserCode UseXToSetY(X, Y)
however this is not as simple as the example makes it appear because the UseXToSetY function is a commonly used function in the parent class of the user module that includes FindX.
hopefully that actually makes sense to someone, I'm not looking for a work around I can already do that I just wondered if there is a simple solution that I am missing.
Thanks
Caleb
Make variable in UserCode file available in recoding module
- Support Team
- Site Admin
- Posts: 12145
- Joined: Fri Jul 07, 2006 4:30 pm
- Location: Houston, Texas, USA
- Contact:
Re: Make variable in UserCode file available in recoding module
Hello,
You could create a recording variable (X and Y) in your recording module and set the value of it in a User Code method. In another User Code method, you could pass the value of your variable as an argument to your method.
Regards,
Markus (T)
You could create a recording variable (X and Y) in your recording module and set the value of it in a User Code method. In another User Code method, you could pass the value of your variable as an argument to your method.
public void FindX() { X = "2"; } public void UseXtoSetY(string myX, string myY) { Y = myX; }Please let me know if this is what you want.
Regards,
Markus (T)