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

Community Tip - Your Friends List is a way to easily have access to the community members that you interact with the most! X

Jlink - How to retrieve drawing into opened session

ffinke
1-Newbie

Jlink - How to retrieve drawing into opened session

Hi,

how can I retrieve a drawing via jlink? I am able to retrieve a part into the session but when trying to retrieve a drawing the JRE just crashs.

if (type.equalsIgnoreCase("CADCOMPONENT")) {

ModelDescriptor descriptor = pfcModel.ModelDescriptor_Create(ModelType.MDL_PART, inputFilePath, null);

System.out.println("descriptor: " + descriptor);

descriptor.SetPath(f.getPath());

model = session.RetrieveModel(descriptor);

System.out.println(model);

} else if (type.equalsIgnoreCase("CADDRAWING")) {

ModelDescriptor descriptor = pfcModel.ModelDescriptor_Create(ModelType.MDL_DRAWING, inputFilePath, null);

descriptor.SetPath(f.getPath());

model = session.RetrieveModel(descriptor);

System.out.println("model: " + model);

}

As mentioned the CADCOMPONENT is working, the drawing not.

C:\TEMP\test>java CreoConverterTest C:\TEMP\test\piston_drawing.drw CADDRAWING PDF

start

C:/Program Files/PTC/Creo 2.0/Parametric/bin/parametric.exe -g:no_graphics -i:rpc_input

Starting CREO command: C:/Program Files/PTC/Creo 2.0/Parametric/bin/parametric.exe -g:no_graphics -i:rpc_input

pm_is_portmapper_port_busy: bind failed, error = 10013

pm_is_portmapper_port_busy: bind failed, error = 10013

connection: com.ptc.pfc.Implementation.pfcAsyncConnection$AsyncConnection@576a9d42

session: com.ptc.pfc.Implementation.pfcSession$Session@79616c7

modelName: C:\TEMP\test\piston_drawing.drw

f: C:\TEMP\test\piston_drawing.drw

#

# A fatal error has been detected by the Java Runtime Environment:

#

# EXCEPTION_UNCAUGHT_CXX_EXCEPTION (0xe06d7363) at pc=0x0000000077d4dce0, pid=8632, tid=8352

#

# JRE version: 6.0_35-b10

# Java VM: Java HotSpot(TM) 64-Bit Server VM (20.10-b01 mixed mode windows-amd64 compressed oops)

# Problematic frame:

# C [kernel32.dll+0xdce0]

#

# An error report file with more information is saved as:

# C:\TEMP\test\hs_err_pid8632.log

#

# If you would like to submit a bug report, please visit:

# http://java.sun.com/webapps/bugreport/crash.jsp

# The crash happened outside the Java Virtual Machine in native code.

# See problematic frame for where to report the

I attached the full log. I hope some of you guys could guide me to the right solution.



This thread is inactive and closed by the PTC Community Management Team. If you would like to provide a reply and re-open this thread, please notify the moderator and reference the thread. You may also use "Start a topic" button to ask a new question. Please be sure to include what version of the PTC product you are using so another community member knowledgeable about your version may be able to assist.
1 ACCEPTED SOLUTION

Accepted Solutions
ffinke
1-Newbie
(To:ffinke)

To answer myself and close the thread:

The problem with the drawing is that you have to be careful that every describing object is located in your runtime path while opening the drawing. Otherwise jlink will cause the jvm crash as described above.

When opening a drawing directly in Creo, Creo itself takes care of that. With jLink you have to handle this by yourself. Maybe this helps someone in the future.

View solution in original post

1 REPLY 1
ffinke
1-Newbie
(To:ffinke)

To answer myself and close the thread:

The problem with the drawing is that you have to be careful that every describing object is located in your runtime path while opening the drawing. Otherwise jlink will cause the jvm crash as described above.

When opening a drawing directly in Creo, Creo itself takes care of that. With jLink you have to handle this by yourself. Maybe this helps someone in the future.

Top Tags