Continue to Site

Eng-Tips is the largest engineering community on the Internet

Intelligent Work Forums for Engineering Professionals

  • Congratulations IDS on being selected by the Eng-Tips community for having the most helpful posts in the forums last week. Way to Go!

Launch a MACRO from GRIP

Status
Not open for further replies.

Pondering

Aerospace
May 25, 2006
23
Does any know a method to launch a pre-defined MACRO from a GIRP programme?

cheers in advance.

Pondering.......
 
Replies continue below

Recommended for you

It is not possible.
There is no mechanism built into GRIP to launch a macro.

"Wildfires are dangerous, hard to control, and economically catastrophic."

Ben Loosli
Sr IS Technologist
L-3 Communications
 
I think you can launch a grip program from a macro, but not the other way around. If this is the case (a quick look in the help docs didn't prove useful) maybe you can rework your macro so that it will call the grip program then continue to run with whatever other commands you need.

Just an idea, I have not tried it myself.
 
Yes, a macro can call a GRIP.


"Wildfires are dangerous, hard to control, and economically catastrophic."

Ben Loosli
Sr IS Technologist
L-3 Communications
 
Does any one knows how to use Open C functions (UFUNC)in Knowledge Fusion.
 
The other users are correct.

You may think that this won’t work because you cannot launch Macro from GRIP. You can make a macro that runs a grip then continue with the macro. Also you can create a User Tools, then have the macro launch the UTD and stop so the user can choose the next Macro or GRIP.

Old Program hack I use to do.

 
To run a Ufunc program from KF (Knowledge Fusion) you will need to wrap the Ufunc in a KF function. Example:

~~~~~~
Defun: myLayerControl( Integer $layer, String $status; String ($lib; "my_kf_layer");

String ($func_name; "MY_KF_set_layer" ))
@{ CFunc("UF_KF_invoke_user_function"; "libufun"); } Boolean;
~~~~~~~

First line defines a KF function called myLayerControl. The kf function takes an integer and a string, the next string sets the library attribute to the library compiled name "my_kf_layer", then the next string defines the function name in the library "MY_KF_set_layer".

Then the expression block calls the method UFunc with the first parameter of "UF_KF_invoke_user_function" and that it is a "libufun", and all this returns a Boolean.

So you now have a KF method or function that calls a ufunc with the library name of my_kf_layer that has a function name MY_KF_set_layer and passing it two parameters of type integer and string.

The CPP code prototype looks like:
void MY_KF_set_layer( UF_KF_value_t *data, int num,
UF_KF_value_t *returnValue )
{

You need to map the KF values to C types. Ufunc provides type to do this. UF_KF_ask_integer, and UF_KF_ask_string, plus others.

PLM Exchange
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor