Here is a sample code for using UF_ask_application_module().
but it just tell what module you are using, not switching between module.
int module;
UF_CALL(UF_ask_application_module([$module))]
switch (module)
{
case UF_APP_DRAFTING:
uc1601("module = DRAFTING\n"); break;
case UF_APP_MECHANISMS:
uc1601("module = MECHANISMS\n"); break;
case UF_APP_CAM:
uc1601("module = CAM\n"); break;
case UF_APP_ICAD:
uc1601("module = ICAD\n"); break;
case UF_APP_MODELING:
uc1601("module = MODELING\n"); break;
}