I have tried to export iges from the code shown below without success. What am I doing wrong? I am trying to generate iges [later stp] files in subdirectories in the local project directory of a part found in a drawing. I have been able to backup the part, so I am sure that my "model" is correct.
Thanks in advance you any help.
Jeff Ruff
flags = pfcExport.GeometryFlags_Create();
//flags.SetAsSolids ( true );
flags.SetAsSurfaces(true);
flags.SetAsQuilts(true);
if(type.equals(ModelType.MDL_PART))
{
solidType = "prt";
modelType = ModelType.MDL_PART;
//Part part = (Part) model;
step_instrs = pfcExport.STEP3DExportInstructions_Create( AssemblyConfiguration.EXPORT_ASM_FLAT_FILE , flags );
iges_instrs = pfcExport.IGES3DNewExportInstructions_Create(AssemblyConfigu ration.EXPORT_ASM_FLAT_FILE , flags );
}
if(type.equals(ModelType.MDL_ASSEMBLY))
{
solidType = "asm";
modelType = ModelType.MDL_ASSEMBLY;
Assembly assembly = (Assembly) model;
assembly.UnExplode(); //makes sure that the assembly is not exploded
step_instrs = pfcExport.STEP3DExportInstructions_Create( AssemblyConfiguration.EXPORT_ASM_SINGLE_FILE , flags );
iges_instrs = pfcExport.IGES3DNewExportInstructions_Create(AssemblyConfigu ration.EXPORT_ASM_FLAT_FILE, flags);
}
}
catch(Exception exp){}//close try
try
{
igesFilename = igespath+model.GetFullName().toLowerCase()+"_"+solidType+".i gs";
JOptionPane.showMessageDialog (mainFrame, "Found iges file name " +igesFilename,"Model Check", JOptionPane.INFORMATION_MESSAGE );
model.Export(igesFilename, iges_instrs);
files[1] = new File(igesFilename);
}
catch (jxthrowable xexp)
{
xexp.printStackTrace ();
}
Thanks in advance you any help.
Jeff Ruff
flags = pfcExport.GeometryFlags_Create();
//flags.SetAsSolids ( true );
flags.SetAsSurfaces(true);
flags.SetAsQuilts(true);
if(type.equals(ModelType.MDL_PART))
{
solidType = "prt";
modelType = ModelType.MDL_PART;
//Part part = (Part) model;
step_instrs = pfcExport.STEP3DExportInstructions_Create( AssemblyConfiguration.EXPORT_ASM_FLAT_FILE , flags );
iges_instrs = pfcExport.IGES3DNewExportInstructions_Create(AssemblyConfigu ration.EXPORT_ASM_FLAT_FILE , flags );
}
if(type.equals(ModelType.MDL_ASSEMBLY))
{
solidType = "asm";
modelType = ModelType.MDL_ASSEMBLY;
Assembly assembly = (Assembly) model;
assembly.UnExplode(); //makes sure that the assembly is not exploded
step_instrs = pfcExport.STEP3DExportInstructions_Create( AssemblyConfiguration.EXPORT_ASM_SINGLE_FILE , flags );
iges_instrs = pfcExport.IGES3DNewExportInstructions_Create(AssemblyConfigu ration.EXPORT_ASM_FLAT_FILE, flags);
}
}
catch(Exception exp){}//close try
try
{
igesFilename = igespath+model.GetFullName().toLowerCase()+"_"+solidType+".i gs";
JOptionPane.showMessageDialog (mainFrame, "Found iges file name " +igesFilename,"Model Check", JOptionPane.INFORMATION_MESSAGE );
model.Export(igesFilename, iges_instrs);
files[1] = new File(igesFilename);
}
catch (jxthrowable xexp)
{
xexp.printStackTrace ();
}