![]() |
![]() ![]() ![]() ![]() ![]() ![]() ![]() |
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.
RP_Get_Real("variable-name") | Returns the double value of variable-name |
RP_Get_Integer("variable-name") | Returns the integer value of variable-name |
RP_Get_String("variable-name") | Returns the char* value of variable-name |
RP_Get_Boolean("variable-name") | Returns the Boolean value of variable-name |
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 (e.g., surface_thread_id) as demonstrated below:
surface_thread_id = RP_Get_Integer("pres_av/thread-id"); |