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 export Pro e drawing as Tiff file

christo_t

New member
Hi All,


Anybody aware, how to export a Pro E Drawing to Tiff or any other rastor formats using J-link APIs.


Please let me know if you have anything
 
christo_t said:
Hi All,


Anybody aware, how to export a Pro E Drawing to Tiff or any other rastor formats using J-link APIs.


Please let me know if you have anything





Hi christo_t!


May be this method will be useful for you? pfcWindow.Window.ExportRasterImage


It enables you to get a snapshot of a window in any format (JPEG, TIFF and so on).
 
christo_t said:
Hi,


I have tried this before , but it is not working, if you have any code can you share it with me.


I use pro/toolkit and cannot inform you fully about your problem.


may be you show me your bug code and we will try to understand what's the problem.
 
To me it is not possible. I solved it with a mapkey exptiffa1jl which is called in j-link


proeSession.RunMacro("%" + "exptiffa1jl" +";"). This is working fine.
 
Hi


the Code i am trying to convert the drawing file to Tiff is


private void CreateDTIF(Model proeModel, String ItemName, Session proeSession) throws Exception {

DotsPerInch dpi = DotsPerInch.RASTERDPI_100;
RasterDepth depth = RasterDepth.RASTERDEPTH_24;
RasterType type = null;
RasterImageExportInstructions instructions = getRasterInstructions (RasterType.RASTER_TIFF);

instructions.SetImageDepth (depth);
instructions.SetDotsPerInch (dpi);

String sModelName = proeModel.GetFullName() + ".tif";
proeSession.ExportCurrentRasterImage (sModelName, instructions);


//return instructions;
}




private RasterImageExportInstructions getRasterInstructions(RasterType type) throws jxthrowable {
double rasterHeight = 7.5;
double rasterWidth = 10.0;
DotsPerInch dpi = DotsPerInch.RASTERDPI_100;
RasterDepth depth = RasterDepth.RASTERDEPTH_24;
RasterImageExportInstructions instructions;
TIFFImageExportInstructions tiff_instrs = pfcWindow.TIFFImageExportInstructions_Create (rasterHeight, rasterWidth);
instructions = tiff_instrs;
return instructions;
}
 

Sponsor

Back
Top