
import com.ptc.cipjava.*;
import com.ptc.pfc.pfcGlobal.*;
import com.ptc.pfc.pfcSession.*;
import com.ptc.pfc.pfcModel.*;

public class MakeVRML {

	static final String VRMLdirectory = ".\\vrml";
	static Session session;
	static Model model;
	static String file_name="";
	static VRMLModelExportInstructions vrml_instrs;

	public static void start () {
		ModelType modelType = ModelType.MDL_PART;

		try {
			session = pfcGlobal.GetProESession();
			model=session.GetCurrentModel();

			vrml_instrs = pfcModel.VRMLModelExportInstructions_Create(VRMLdirectory);
			model.Export(file_name, vrml_instrs);
		}
		catch (jxthrowable x)
		{
			System.out.println ("Caught exception: "+x);
			x.printStackTrace ();
		}
	}

	public static void stop () {
		System.out.println("Program: Stopped");
	}
}
