Skip to main content
17-Peridot
November 18, 2019
Solved

Creating a simple 3D model using J-Link

  • November 18, 2019
  • 13 replies
  • 5710 views

Hello!

I am trying to create a simple model (for example, a cube) only using J-Link.
Started by creating a window:
      Model tryModel = curSession.CreatePart ("Testing1");
      tryModel.Display ();
But it does not appear (I call using the button from Creo).
Does anyone have experience creating models using J-Link?
Help me please.
Regards!

Best answer by YaroslavSin

Yep, in OTK JAVA is possible.

Take a look at chapter Feature Element Tree in documentation.

 

For J-Link:

1) Template parts with common geometry. Then you can drive a part by changing dimensions and parameters.

2) Build models using UDFs.

13 replies

17-Peridot
November 19, 2019

Looks not bad.

1) Do you have any exception after Model tryModel = curSession.CreatePart ("Testing1"); ?

2) After call CreatePart ("Testing1"); take a look at the session of Creo. Model is exist but not shown?

3) pfcSession.BaseSession.CreatePart return Part type not Model. Maybe, a trick is there.

 

ps: But in J-Link you can't create features (sketches, extrude and so on)

 

VladiSlav17-PeridotAuthor
17-Peridot
November 19, 2019

Thanks for the answer!
I managed to create the part using this code.
Now the question is how to extrude there ...
You said that J-Link cannot do this. It seemed to me that way too, while I was dealing with him all this time.
Please tell me can I do this with OBJECT TOOLKIT Java?

Do you know any suitable methods from there?
Best Regards!

17-Peridot
November 19, 2019

Yep, in OTK JAVA is possible.

Take a look at chapter Feature Element Tree in documentation.

 

For J-Link:

1) Template parts with common geometry. Then you can drive a part by changing dimensions and parameters.

2) Build models using UDFs.