I'm converting various algorithms from our front end to IADS. I'm
just getting started in IADS algorithm developement and I'm new to the
Windows platform and MS Visual Studio, C++, C#, basically new to
object oriented programming (I've been working in C on a Unix system),
so I have a huge learning curve to overcome. I have been able to
follow the basic examples for creating an algorithm for IADS or a COM
dll such as the sample function in C++. I'm sure someone has already
asked this question and the answer is already in this group, but I
guess I'm either not entering the right search key words or
understanding what I am finding. Anyway, I need to fetch the units
and sample rate of the input parameter to the algorithm, do I have
access to that information through the IadsFunction.idl interface or
can I access it from the config file easily?
> I'm converting various algorithms from our front end to IADS. I'm > just getting started in IADS algorithm developement and I'm new to the > Windows platform and MS Visual Studio, C++, C#, basically new to > object oriented programming (I've been working in C on a Unix system), > so I have a huge learning curve to overcome. I have been able to > follow the basic examples for creating an algorithm for IADS or a COM > dll such as the sample function in C++. I'm sure someone has already > asked this question and the answer is already in this group, but I > guess I'm either not entering the right search key words or > understanding what I am finding. Anyway, I need to fetch the units > and sample rate of the input parameter to the algorithm, do I have > access to that information through the IadsFunction.idl interface or > can I access it from the config file easily?
No problem... Actually, I don't think anyone has actually asked that question before ;)
Unfortunately, there's no way currently to obtain the exact parameter that's being passed into your function. At this time, the equation engine simply evaluates the expression in the argument position and sends in the resultant value to the function. The current technique is to simply pass in the required information as follows:
It's not pretty, but it should work. Think of the custom function being more similar to C that say C++. At this point in time, your not able to pass "classes" into the function, so you'll have to send the actual value of the desired input.
Let me know if you have any further questions, Jim
Just a small headsup, keep in mind that the units field is sometimes
incorrectly defined. Think of it as more of a 'visual indicator' than
a data type.
Ultimately if you will be using this field to autoconvert data, suchas
from Degrees to Radians, it might be a good idea to spotcheck the
reliability of how that field is being used.
Good Luck,
Miek
On Nov 4, 10:10 am, "James Bretz" <j...@iads-soft.com> wrote:
That's a good point. Issues with this algorithm are almost always
related to typos in the units field. Maybe I'll just create 2, one for
degrees, one for radians.