×
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

J-Link

J-Link

(OP)
I am working toward the development of a J-link application.  I would like to have this application open every file in session and run a macro on each of these files.  Before I get started, I wondered if anyone out there had any suggestions, or better yet code to share.

RE: J-Link

Hi!
I don't know anything about Macros but this is one way to get all the models in session ...

public void runMacros(Session proeSession) {
    Model md;
    Models mds;
    try{
        mds = proeSession.ListModels();
        for (int i=0;i<mds.getarraysize();i++){
            md = mds.get(i);
            proeSession.RunMacro("Your macro" ??? );
    } catch (jxthrowable x){}
}

//matte

RE: J-Link

(OP)
matte, what exactly does your script do? I see that you are putting models into an array, but.......

RE: J-Link

Sorry if I misunderstood you!
As I said I haven't worked anything with macros and I just assumed that you need to send some modelparameters in to your macro...

This script just gives you handles to all models in session.

//matte   

RE: J-Link

(OP)
matte, I am trying to run a mapkey on every component in an assembly with out opening each component seperately.  What you had provided is a start in the right direction, thank you.

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