Continue to Site

Welcome to MCAD Central

Join our MCAD Central community forums, the largest resource for MCAD (Mechanical Computer-Aided Design) professionals, including files, forums, jobs, articles, calendar, and more.

Run J-Link method from mapkey w/argument?

joncl

New member
Is there a way to send an argument to a method in a running J-Link app from a mapkey?

I'm building a custom utility to automate the measure tool in Wildfire 3.0 using J-Link. I've successfully added a new menu to the menubar with several sub-menus. Basically, each menu button sends an argument to a method in the running J-Link app. It'd also be great to add a drop-down in the toolbar with custom icons to represent each command. The problem is, custom toolbar buttons can only be associated to mapkeys, I think. Or is there a way to execute the J-Link method with an argument from a mapkey. Probably a tall order, I know. Otherwise, I guess I'd need a separate J-Link app for each measure command so that it'd be visible in the Auxiliary Applications to be able to run it with a mapkey. That's not very pretty though.
smiley5.gif
Any ideas?

measureit1.gif

measureit2.gif





Edited by: joncl
 
Another question: I have a custom menu with sub-menus, like in the above post. Is it possible to add a button that sits at the very bottom of the main menu? For example, I want "A Button" to sit below "Axis to", like below. Is it possible?

View attachment 4264

Here's the Java code I'm using to create the above menu:

session.UIAddMenu( MENU_NAME, "Analysis", MSG_FILE, null );
session.UIAddMenu( "mit.PlaneTo", "", MSG_FILE, MENU_NAME );
session.UIAddMenu( "mit.AxisTo", "mit.PlaneTo", MSG_FILE, MENU_NAME );

UICommand aButtonCmd = session.UICreateCommand( "aButtonCmd", new DefaultUICommandActionListener() );
session.UIAddButton( aButtonCmd, MENU_NAME, "mit.AxisTo", "aButton", "aButtonHelp", MSG_FILE );
 

Sponsor

Articles From 3DCAD World

Back
Top