×
INTELLIGENT WORK FORUMS
FOR ENGINEERING PROFESSIONALS

Log In

Come Join Us!

Are you an
Engineering professional?
Join Eng-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!
  • Students Click Here

*Eng-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

Jobs

JLink problems moving from WF2 to WF4

JLink problems moving from WF2 to WF4

JLink problems moving from WF2 to WF4

(OP)
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
}
 

RE: JLink problems moving from WF2 to WF4

I don't know what the problem would be unfortunately but I would suggest checking the documentation for each method used, I do remember for JLink in WF3 there are some arguments that are reserved for future use and they may now be used and so passing a null argument may not be allowable any more

Only a guess I'm afraid

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Eng-Tips Forums free from inappropriate posts.
The Eng-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Eng-Tips forums is a member-only feature.

Click Here to join Eng-Tips and talk with other members!


Resources