×
INTELLIGENT WORK FORUMS
FOR ENGINEERING PROFESSIONALS

Log In

Come Join Us!

Are you an
Engineering professional?
Join Eng-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!
  • Students Click Here

*Eng-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

Jobs

Launch a MACRO from GRIP

Launch a MACRO from GRIP

Launch a MACRO from GRIP

(OP)
Does any know a method to launch a pre-defined MACRO from a GIRP programme?

cheers in advance.

Pondering.......

RE: Launch a MACRO from GRIP

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

RE: Launch a MACRO from GRIP

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.

RE: Launch a MACRO from GRIP

Yes, a macro can call a GRIP.

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

Ben Loosli
Sr IS Technologist
L-3 Communications

RE: Launch a MACRO from GRIP

Does any one knows how to use Open C functions (UFUNC)in Knowledge Fusion.

RE: Launch a MACRO from GRIP

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.

RE: Launch a MACRO from GRIP

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
http://plmexchange.net
http://groups-beta.google.com/group/NX_CAX/

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Eng-Tips Forums free from inappropriate posts.
The Eng-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Eng-Tips forums is a member-only feature.

Click Here to join Eng-Tips and talk with other members!


Resources