Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations cowski on being selected by the Eng-Tips community for having the most helpful posts in the forums last week. Way to Go!

JLink problems moving from WF2 to WF4

Status
Not open for further replies.

Morfmor

Mechanical
Joined
Feb 26, 2008
Messages
8
Location
DK
I have made a small JLink application that opens a drawing with the same name as the current part/assy.
We're moving from WF2 to WF4 now, and in WF4 it just freezes Pro/E. Other JLink applications runs as usual, so the installation is OK.

Does anyone know of any changes that would affect this application?:


//26-Sep-02. Per Bøwadt Møller

import java.awt.*;
import javax.swing.*;
import com.ptc.cipjava.*;
import com.ptc.pfc.pfcSession.*;
import com.ptc.pfc.pfcGlobal.*;
import com.ptc.pfc.pfcModel.*;

public class OpenDraw{
private static Session curSession=null;
private static Model model=null;
private static String modelName="";
private static ModelDescriptor descr;
private static ModelType modTyp=com.ptc.pfc.pfcModel.ModelType.MDL_DRAWING;
static Frame pfcFrame = new Frame();

public static void start (){

try{
curSession = pfcGlobal.GetProESession();
model=curSession.GetCurrentModel();
modelName=model.GetInstanceName();
descr = pfcModel.ModelDescriptor_Create (modTyp, modelName, null);
curSession.OpenFile(descr);

}
catch (jxthrowable jxth){
mes("Tegningen kunne ikke findes!");
jxth.printStackTrace ();
}
stop();
}//end start

//=========================================================================
public static void stop (){
}
//=========================================================================
private static void mes(String message){ //Pop-op boks
JOptionPane.showMessageDialog ( pfcFrame, message,
"Message from Jlink!", JOptionPane.INFORMATION_MESSAGE );
}//end mes
}

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top