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