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

Community Tip - Have a PTC product question you need answered fast? Chances are someone has asked it before. Learn about the community search. X

J-Link, managing 3D model dimensions

VladiSlav
17-Peridot

J-Link, managing 3D model dimensions

Hello!

 

Please tell me where to start.
I need to resize in a 3D model using J-Link

I loaded the class into the model, but it threw an error.

 

Best Regards.

ACCEPTED SOLUTION

Accepted Solutions

Hi,

in install_test_05.zip you can find the result of my coding ... see pfcInstallTest.java

Following files contain paths related to my directory structure - you have to modify these files to adapt to your environment:

  • compilation_1.8.bat
  • Creo 5.0.2.0.bat
  • protk.dat

how_to_launch_app.png shows you how to start application from running Creo session.


Martin Hanák

View solution in original post

12 REPLIES 12

Hi,

please upload source code you want to repair. Also publish Creo version and java version.


Martin Hanák

Thanks for your reply!
Sorry to have provided so little information initially.

I read in the instruction manual that the code for the model needs to be loaded from the model itself.

Then I decided to consider an example for creo:

C:\Program Files\PTC\Creo 5.0.2.0\Common Files\otk_java_free\exercises\exercise_6

I compiled classes and put them in the creo working folder.

After which I wanted to add the class to the model as follows:

1.PNG

Pointed out the parameters of my class:

2.PNG

And got the following error:

3.PNG

Creo Version: 5.0.2.0.
Java version: jdk 11.

It seems to me that the error is not in the code, but in my actions. First I need to understand the following:
-how to run classes in a 3D model?
- What is the method for resizing a 3D model?

I will be very grateful if you show some simple example.

Best Regards.

Hi,

please upload your "instruction manual".


Martin Hanák

Yes of course
page 18.

Hi,

I have a control question ... do you own Creo Object TOOLKIT Java license ? See Licensing for Creo Object TOOLKIT Java section on page 22.

Note 1: Unfortunately I have never set up a Model Program, so I can't help you.

Note 2: See https://support.ptc.com/appserver/cs/view/solution.jsp?source=Sitecore Article Viewer&art_lang=en&n=CS188737 

 

 


Martin Hanák

Yes, but it doesn't matter, because I'm testing examples for OTK java free.
okay, thanks for the help.


@VladiSlav wrote:

Yes, but it doesn't matter, because I'm testing examples for OTK java free.
okay, thanks for the help.


Hi,

you want resize model. I can try to create application, which:

  1. opens my_model.prt containing Extrude feature
  2. changes feature height
  3. regenerates model
  4. save model

Are you interested ?


Martin Hanák

Yes, of course, very much.
I will be very grateful.
Sorry for not immediately responding.

 

Best regards!

Hi,

in install_test_05.zip you can find the result of my coding ... see pfcInstallTest.java

Following files contain paths related to my directory structure - you have to modify these files to adapt to your environment:

  • compilation_1.8.bat
  • Creo 5.0.2.0.bat
  • protk.dat

how_to_launch_app.png shows you how to start application from running Creo session.


Martin Hanák

Additional note ... I used following resources

  • E:\PTC\Creo5_020\Creo 5.0.2.0\Common Files\otk_java_doc\otk_javaug.pdf
  • E:\PTC\Creo5_020\Creo 5.0.2.0\Common Files\otk_java_doc\objecttoolkit_Creo\manual0\loadApiWizard.html

 


Martin Hanák

Thank you very much, I will check and write about the results.

your code works:
Displays sizes for your model.
Thanks a lot, this will help.

Announcements


Top Tags