import com.ptc.cipjava.*; import com.ptc.pfc.pfcGlobal.*; import com.ptc.pfc.pfcSession.*; import com.ptc.pfc.pfcModel.*; public class MakeVRML2 { static final String VRMLdirectory = "C:\\ptc\\proe2001\\bin\\vrml"; static Session session; static Model model; static VRMLModelExportInstructions vrml_instrs; static String file_name="test.wrl"; public static void start () { ModelType modelType = ModelType.MDL_PART; String modelName = "starter"; System.out.println("VRMLdirectory:"+VRMLdirectory); try { session = pfcGlobal.GetProESession(); //model = session.GetModel(); model=session.GetCurrentModel(); vrml_instrs = pfcModel.VRMLModelExportInstructions_Create(VRMLdirectory); model.Export(file_name, vrml_instrs); return; } catch (jxthrowable x) { System.out.println ("Caught exception: "+x); x.printStackTrace (); } } public static void stop () { System.out.println("Program: Stopped"); } }