Continue to Site

Welcome to MCAD Central

Join our MCAD Central community forums, the largest resource for MCAD (Mechanical Computer-Aided Design) professionals, including files, forums, jobs, articles, calendar, and more.

J-Link extract Co ordinate System name

christo_t

New member
Hi All,


I am trying to export a pro e model to STLBinary format, here I need to pass the parameter as Csys name. here is the Code


//Get file name of model with out extension and add the STL extension
String sModelName = proeModel.GetFullName() + ".stl";
String Csys = "Default";
STLASCIIExportInstructions STLASCIIInstr;
STLASCIIInstr = pfcModel.STLASCIIExportInstructions_Create(Csys);
//Export STL from Model
proeModel.Export(sModelName, STLASCIIInstr);


Something wrong in this code i am not able to pass the Csys name as default, is there any way to extract the part csys name and assign it here. Or if you have any direct solution for exporting pro e model to STL format , please let me know.


Thanks and regards


Christo Thomas
 
Hello Thomas,


As per Pro-Toolkit or J-Link is capable of handle the Pro-Engineer native parts,I don't think you can't hanble the exported parts into "STL" or any other part,Pro-Engineer API will not able to work or retireve the respective handles to use the function.


I guess check the error value it is returns. By checking that you could able to come to the conclusions.


With regards,


Kishore V
 
christo_t,


First of all if you are trying to export an STL file in binary format then you should use STLBinaryExportInstructions instead of STLASCIIExportInstructions. I would make sure that 'Default' was a coordinate that actually existed in the model tree. Otherwise 'Default' might not exist. Read the API Wizard under User's Guide->Interface->Exporting Files->Export Instructions.
 
Hi All,


i have solved the problem for extracting the Csys from the model and convert the file to STL format.


thanks for your support. here is the code for that..


String sModelName = proeModel.GetFullName() + ".stl";
ModelItems c_systems;
String Csys = null;

c_systems = proeModel.ListItems(ModelItemType.ITEM_COORD_SYS);
for (int i = 0; i < c_systems.getarraysize(); i++)
{
Csys = c_systems.get(i).GetName();
System.out.println(Csys);
break;
}

STLASCIIExportInstructions STLASCIIInstr;
STLASCIIInstr = pfcModel.STLASCIIExportInstructions_Create(Csys);
//Export STL from Model
proeModel.Export(sModelName, STLASCIIInstr);















Edited by: christo_t
 

Sponsor

Back
Top