After a new variable is defined on the Scheme side (using a
text command), you will need to bring it over to the solver side to
be able to use it in your UDF. ‘ RP’ macros are used to access Scheme variables in UDFs, and
are listed below.
| | Returns true if the variable exists |
| | Returns the double value of |
| | Returns the integer value of |
| | Returns the char* value of |
| | Returns the Boolean value of |
|
| Returns the input parameter value of |
For example, to access the user-defined Scheme variable pres_av/thread-id in your UDF C function, you will use RP_Get_Integer. You can then assign the variable returned
to a local variable you have declared in your UDF (for example, surface_thread_id) as demonstrated below:
surface_thread_id = RP_Get_Integer("pres_av/thread-id");