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.

Model Save

arno21000

New member
Hi!
I've got a problem, I want to save a DRW to a TIFF model. In ProE it's possible directly with File/Save and after you just put TIFF format.
I want to do this with JLINK because the name of my future TIFF file is the combination of parameters.

Please, help me to use the pfcModel.Model.Save

Thank you very much !!!!
 
No, it's impossible because I want that the name of the TIFF be a combination of parameters of the DRW model.

I try to do this, it run, but do anything.
Someone has an idea?...it's more more important for me and for mi society.

Thank you for your help.




Model model = session.GetCurrentModel();
RasterType type = RasterType.RASTER_TIFF;


//private static RasterImageExportInstructions getRasterInstructions
//(RasterType type) throws jxthrowable, UnsupportedRasterTypeException
//(RasterType type) throws jxthrowable, UnknownError
//{
Parameter param_ref = model.GetParam("REFERENCE");
Parameter param_issue = model.GetParam("ISSUE");
String reference=param_ref.GetValue().GetStringValue();
String issue=param_issue.GetValue().GetStringValue();
System.out.println("REFERENCE:"+ reference);
System.out.println("ISSUE:"+ issue);

String nom;
nom = (reference+"_"+issue+".");
System.out.println("Nom du tiff:"+ nom);

File rootFile = new File("C:/TOTO/");
System.out.println("path " +rootFile);

double rasterHeight = 7.5;
double rasterWidth = 10.0;
DotsPerInch dpi = DotsPerInch.RASTERDPI_100;
RasterDepth depth = RasterDepth.RASTERDEPTH_24;
RasterImageExportInstructions instructions = pfcWindow.TIFFImageExportInstructions_Create (rasterHeight, rasterWidth);;

TIFFImageExportInstructions tiff_instrs = pfcWindow.TIFFImageExportInstructions_Create (rasterHeight, rasterWidth);
instructions = tiff_instrs;
 
Hello Arno,


I saw your code above message,What is the error are you getting.I understand that you are rerived the paramters required for your...you made the required string in which format your required.If you can save with the name you want for TIFF file...you suppose to get that.


Let me know where does it stop you to proceed further.


In general J-Link has limited scope to automate the requirments....as you know Pro/Toolkit has high degree of automation capability.


Kishore V
 
Hi kishorev!
My problem is that this code do anything. I only want to create a tiff of my current model whose name of the TIFF is the combination of two parameters. Parameters which exist in the model.

For example, into my current model, I have two parameters :
NAME : toto
SURNAME : titi

The TIFF created wear the name : toto_titi.tiff

And to finish, my code above, currently, not create a tiff ans so, consequently, can't put the correct name.

I am in obligation to do this in J-Link. And I'm sure that is possible.

If you can help me....
 
You can create the tiff file wih the default name and rename it after the save.


With toolkit,I use ProPrintExecute to create a tif file. In Jlink the similarfunction is pfcModel.Model.Export. You can try to use this function.





Simon
<A name=413></A>
 

Sponsor

Articles From 3DCAD World

Back
Top