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.

JLink Help


New member
Does anyone know how to use Jlink to modify an existing model in ProE. I want to modify relational dimensions like diameter of a gear could someone help me?


New member
Most J-Link apps are very task specific. A focused answer is difficult without an in-depth knowledge of what you are trying to accomplish. The short answer is yes. J-link can modify parameters in 2001 and dimensions in Wildfire. Web.Link, the javaScript UI can also modify parameters. All I can offer at this point is locations of the J-Link and Web-Link api information.

J-Link and Web.Link are installed when you install Pro/ENGINEER. They are check boxes under API Toolkits at the bottom of the second installation screen (2001 and Wildfire).

If you installed these APIs, they can be found inside the Pro/ENGINEER load point. For example:

If Pro/ENGINEER is loaded under C:\ptc, then the file location would be something like this.




Both APIs provide examples for beginners.


New member
I have a gear model where the Pitch,Pressure Angle, Diameter and Width are supplied. Its a parametric model so one you give these 4 paramters the gear is constructed. I want the JLink application to feed these 4 values to the model part. How can I do that?


New member
I'm not trying to guide you away from J-Link. But it is probably easier to use Web.Link to do this. If you have access to Wildfire, it has a parameter example web page that runs in the embedded browser. It can attach to differnt models, create/delete parameters, list parameter values, and set parameter values. If it suites your needs, it is easier to modify this existing javaScript example web page than to write a UI for setting parameters.

What release of Pro/ENGINEER are you using? It makes a difference for the available function calls and supported java versions

Here is the thought process for using J-Link.

1. You need to build a user interface. This can be a stand-alone java app or a web page. Using a web page interface with J-Link requires building a servlet to parse a form's input. The servlet must reside in a servlet engine like Tomcat. This level of architecture is great for server based applications, but it is probably too complex for a simple gear.

2. Then you need to determine how/when you want to access the application. It can be on file retrieval/regenerate/save or mapped to a button. There may be other access options I'm overlooking. Lets say it should be accessed from a button on the Pro/E UI.

3. The application has to connect to the gear model and read the parameters in the model. Then it must bring up the java UI for user input. Don't forget to limit input values to the acceptable, pre-tested ranges.

4. Once the user enters the four parameters and hits OK or Update, the application will assign the values to the appropriate parameters in the gear model and regenerate the model. It is up to you if you want the java UI to close.

The J-Link application should be registered with the model. It should be a synchronous application (starts when Pro/E starts).

If you need more details, just specify the direction you are taking.


New member
Hi There,

I dont want the ProE window to be running. This is something thats done remotely. I have to manipulate the part without actually opening it in ProE. Atleast this will not be seen I dont care what goes on at the back end. Also do you know any reference for JLink on the web or somewhere I have the reference manual but its probaly worthless.


New member
Then Web.Link is not for you. Web.Link must be run on the same machine as Pro/ENGINEER.

How good are you with Java? What you are trying to do sounds simple, but isn't easy as far as coding. I did something similar to this a couple of years ago (2000i). I was and still am a Java novice. The application took me a couple of weeks of devoted coding time to get it to work. That was with help from a Java guru. A lot of that time was spent trying to get Pro/ENGINEER to start remotely.

Java is relatively anal about security. It doesn't like to start applications remotely. The only way I have found around this is to create a java servlet and host it from the machine doing all the Pro/ENGINEER work. But review the Wildfire J-Link release notes first. It may include remote sessions now.

This may reduce some of your UI coding issues. A web page can be the user interface. Forms can capture your parameter inputs and send them to the servlet. The servlet starts or connects to a Pro/ENGINEER session using J-Link. Then it passes the inputs to the Pro/ENGINEER session. I think I had to use a threaded session to determine when Pro/ENGINEER was finished. But J-Link has been expanded since then and you may have other options. I guess you want back a solid model? Just have J-Link back it up to a directory.

If more than one request can come in at the same time, you need to implement a queue to capture requests before sending them to Pro/ENGINEER. Pro/ENGINEER can remain running if the application expects a lot of hits. But for occasional hits, just have it close Pro/ENGINEER after each request. You must have a Pro/E license available for this app to run. You will have to code a response to the user saying the process completed/failed and where to pick up their model.

I wish I knew of some other J-Link reference materials. The only materials I know about are the ones I pointed out before.

It helps to use a graphical java editor if you are going to create a Java user interface. If you don't have a java editor, I would suggest getting one. The good ones don't just highlight code sections in different colors, they check code for syntax and runtime errors.

I can't speak to introductory Java books. There are just so many. But if you are heading down the servlet path, go to the local Borders or Barnes and Noble book store and pick up Java Servlet Programming by O'Reilly. It helped me a lot. If networking is the hangup, there is a Java Network Programming book too. It covers accessing port numbers, other machines, things like that.

FYI: If you are anticipating going beyond a single gear, maybe doing an entire product line, PTC offers an out of box product called DynamicDesignLink. You can import your gear, set value ranges, and release it to your designers in about 15 minutes. It can configure the gear, generate part numbers, reuse existing parts, interface with ERP/MRP systems, produce models, drawings, BOMs, and other documentation, ... It is WAY overkill for this app, but is an extremely powerful configure-to-order product. Of course it isn't cheap. Just thought you should know.