public class transfer {
static {
try {
System.loadLibrary("CadExCore");
} catch (UnsatisfiedLinkError e) {
System.err.println("Native code library failed to load.\n" + e);
System.exit(1);
}
}
public static void main(String[] args) {
String aKey = LicenseKey.Value();
if (!LicenseManager.Activate(aKey)) {
System.out.println("Failed to activate CAD Exchanger license.");
System.exit(1);
}
if (args.length != 2) {
System.out.println("Usage: " + " <input_file> <output_file>, where:");
System.out.println(" <input_file> is a name of the STEP file to be read ");
System.out.println(" <output_file> is a name of the JT file to be written");
System.exit(1);
}
ModelData_Model aModel = new ModelData_Model();
String aSource = args[0];
String aDest = args[1];
ModelData_ModelReader aReader = new ModelData_ModelReader();
if (!aReader.Read(new Base_UTF16String(aSource), aModel)) {
System.out.println("Failed to open and convert the file " + aSource);
System.exit(1);
}
Base_Settings.Default().SetValue(Base_Settings.Id.UseExceptions, true);
try {
ModelData_ModelWriter aWriter = new ModelData_ModelWriter();
if (!aWriter.Write(aModel, new Base_UTF16String(aDest))) {
System.out.println("Failed to convert and write the file to specified format" + aSource);
System.exit(1);
}
} catch (Base_Exception anEx) {
System.out.println(anEx.What());
System.exit(1);
}
}
}
Defines classes, types, and global functions related to CAD Exchanger.
Definition: A3DSTestLib.hxx:22