Community Tip - You can change your system assigned username to something more personal in your community settings. X
Here Is my code to Export drawing File .But I want to export sheets Individually .Please guide me to solve this .
My code :
PDFExportInstructions Mypdfexportinstructions = pfcExport.PDFExportInstructions_Create();
PDFOptions Myoptions = PDFOptions.create();
//FONT
/*set option to set Monochrome color plot*/
PDFOption MyPdfOption_Color = pfcExport.PDFOption_Create();
MyPdfOption_Color.SetOptionType(PDFOptionType.PDFOPT_COLOR_DEPTH);
MyPdfOption_Color.SetOptionValue(pfcArgument.CreateIntArgValue(PDFColorDepth._PDF_CD_COLOR));
Myoptions.append(MyPdfOption_Color);
PDFOption MyPdfOption_Layer = pfcExport.PDFOption_Create();
MyPdfOption_Layer.SetOptionType(PDFOptionType.PDFOPT_LAYER_MODE);
MyPdfOption_Layer.SetOptionValue(pfcArgument.CreateIntArgValue(PDFLayerMode._PDF_LAYERS_NONE));
Myoptions.append(MyPdfOption_Layer);
Mypdfexportinstructions.SetOptions(Myoptions);//null is default
String modelLocation=""+Workingdr+"\\"; String drw_name = "Asm0001.drw"; ModelDescriptor desc1 = pfcModel.ModelDescriptor_Create(ModelType.MDL_DRAWING, drw_name, null); desc1 = pfcModel.ModelDescriptor_CreateFromFileName(drw_name); desc1.SetPath (modelLocation); draw=(Drawing)curSession.RetrieveModelWithOpts(desc1, pfcSession.RetrieveModelOptions_Create()); draw.Display(); draw.Export(""+draw.GetFullName()+""+ i1+"", Mypdfexportinstructions);
Its working fine .The code Exports all the sheets into one pdf. I want to to Export the sheets Individually
Solved! Go to Solution.
PDFOption MyPdfOption_Launcher = pfcExport.PDFOption_Create(); MyPdfOption_Launcher.SetOptionType(PDFOptionType.PDFOPT_LAUNCH_VIEWER); MyPdfOption_Launcher.SetOptionValue(pfcArgument.CreateBoolArgValue(false)); Myoptions.append(MyPdfOption_Launcher); Mypdfexportinstructions.SetOptions(Myoptions);//null is default //Load Drawing Files.... String modelLocation=""+Workingdr+"\\"; String drw_name = ""+drawfiles[i]+".drw"; ModelDescriptor desc1 = pfcModel.ModelDescriptor_Create(ModelType.MDL_DRAWING, drw_name, null); desc1 = pfcModel.ModelDescriptor_CreateFromFileName(drw_name); desc1.SetPath (modelLocation); draw=(Drawing)curSession.RetrieveModelWithOpts(desc1, pfcSession.RetrieveModelOptions_Create()); //Get total number of Sheets.. int nooffiles=draw.GetNumberOfSheets(); for(int no=1;no<=nooffiles;no++) { draw.SetCurrentSheetNumber(no); draw.Display(); draw.Export(""+draw.GetFullName()+"-"+no+"", Mypdfexportinstructions); continue; } //draw.Export(draw.GetFullName(), Mypdfexportinstructions);
I code the individual sheets to print as PDF in Jlink .Thanks for everyones help .
The code in CREOSON might shed some light.
PDFOption MyPdfOption_Launcher = pfcExport.PDFOption_Create(); MyPdfOption_Launcher.SetOptionType(PDFOptionType.PDFOPT_LAUNCH_VIEWER); MyPdfOption_Launcher.SetOptionValue(pfcArgument.CreateBoolArgValue(false)); Myoptions.append(MyPdfOption_Launcher); Mypdfexportinstructions.SetOptions(Myoptions);//null is default //Load Drawing Files.... String modelLocation=""+Workingdr+"\\"; String drw_name = ""+drawfiles[i]+".drw"; ModelDescriptor desc1 = pfcModel.ModelDescriptor_Create(ModelType.MDL_DRAWING, drw_name, null); desc1 = pfcModel.ModelDescriptor_CreateFromFileName(drw_name); desc1.SetPath (modelLocation); draw=(Drawing)curSession.RetrieveModelWithOpts(desc1, pfcSession.RetrieveModelOptions_Create()); //Get total number of Sheets.. int nooffiles=draw.GetNumberOfSheets(); for(int no=1;no<=nooffiles;no++) { draw.SetCurrentSheetNumber(no); draw.Display(); draw.Export(""+draw.GetFullName()+"-"+no+"", Mypdfexportinstructions); continue; } //draw.Export(draw.GetFullName(), Mypdfexportinstructions);
I code the individual sheets to print as PDF in Jlink .Thanks for everyones help .