cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

Creating a simple 3D model using J-Link

SOLVED
Pearl

Creating a simple 3D model using J-Link

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!

1 ACCEPTED SOLUTION

Accepted Solutions

Re: Creating a simple 3D model using J-Link

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.

View solution in original post

13 REPLIES 13
Highlighted

Re: Creating a simple 3D model using J-Link

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)

 

Re: Creating a simple 3D model using J-Link

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!

Re: Creating a simple 3D model using J-Link

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.

View solution in original post

Re: Creating a simple 3D model using J-Link

congrats.

Are you saying that the model was in session but not displayed in the graphics window?

 

about creating feature with JOTK (formerly known as Jlink) there is no direct API according to CS250424.

The resolution consists in using ProToolkit (more powerful). It is the C API.

or call User Defined Features

 

Also find more information from the eportal thanks to your PTC account.

Re: Creating a simple 3D model using J-Link

Thank you very much for your help and information!

Re: Creating a simple 3D model using J-Link

Thank you very much for your congratulations and information!

Re: Creating a simple 3D model using J-Link

Hello, @remy 

I'm not agree with you about JOTK. I think, you are talking about JOTK free = J-Link.

 

I dont have my own expiriens in this using JOTK, but, at least JOTK documentation describes feature creation using Feature Element Tree.

 

And, yep, C TOOLKIT is a most powerful, for now...

Re: Creating a simple 3D model using J-Link

that's not exactly the subject of this topic but i'll happily address your point.


@ysinitsyn wrote:

I think, you are talking about JOTK free = J-Link.

You are free not to agree and i  understand your point.  The reality is that the Java API offering is broader that your comment entiles.

There has been an official change in the branding and the moniker JOTK for Java Object Toolkit is of use.

 

Now the formely known J-link (the free API) is still in existence and available. It is considered a subset of the JOTK offering and this subset is still free. 

 

About Element Tree, you're indeed right. This enables to create features. This is however far from being a direct API. It requires to fill-in structures and build a hierarchy tree, this is indeed very powerful but one has to admit that this is far from what cane be called a direct API (a one method capability). 

Re: Creating a simple 3D model using J-Link

Hello!

 

Can you please tell me how to use Feature Element Tree?
Is there any very simple example?
Or other clues.
At this point, I’ve read the Feature Element Tree chapter and looked at the otkCreateSweep example. But it’s still not very clear.
Thanks in advance!

 

Regards!

Announcements