Kubotek Forum

KeyCreator & KeyCreator Viewer Technical discussion of CAD/CAM and integrated partner products
Kubotek Forum > KeyCreator & KeyCreator Viewer > Set the options for exporting PDF View modes: 
User avatar
Advanced member
Advanced member
Soli - 7/21/2020 11:24:53 PM
   
Set the options for exporting PDF
I want to automate the PDF export.
I want this, because I need to set the name and path of PDF file, automatically from
entity properties and file properties..

I found how to export to PDF

---------------------------------------------------
CLEAR nNumSel
  INT nNumSel
 // maskentity 0, 11,12,13,14,15,16,17,22
  // This will invoke the Universal Selection Menu
  GENSEL "Select dimensions to be changed...", nNumSel, 0, 1, 0, 0, 1, 0
  if (@error != 0)
      EXIT
 
  CLEAR aGenSelEnts
  //Populate variable with the entities just selected
  GETSELECTED aGenSelEnts

//SetExportOptionsPdf

ExportEntities aGenSelEnts , PDF , "TEST.PDF"
 
pause "%d" , @error
------------------------------------------------------
For now, in this example the name and path of PDF are fixed.

I need to set the options for PDF export before PDF export (see SetExportOptionsPdf)
I can't find a such function in KXL documentation.

Can Kubotek help me?
Thanks


 
Solomon Steinberg,
Israel

DELL OPTIPLEX 7050
NVIDIA QUADRO P2000
KEYCREATOR 13.5
KEYCREATOR 2020 SP2



User avatar
Advanced member
Advanced member
Hans_Winkler - 7/22/2020 8:29:19 AM
   
RE:Set the options for exporting PDF
Hi Soli,
I know there are undocumented settings, the only export setting for PDF I remember is to set the Black and White option:
SET PDFBlack, 0 //off
SET PDFBlack, 1 //on
Of course the 0 and 1 may be replaced with a integer variable.

I hope someone at Kubotek can jump in to list the other options that are available. I do believe Greg M. had listed some of them in the old forum (still sad that forum is gone).

Hans

User avatar
Advanced member
Advanced member
Hans_Winkler - 7/22/2020 9:10:17 AM
   
RE:Set the options for exporting PDF
I messed around with it a little and figured out a few more:
SET PDFResolution, 600
SET PDFOrientation, 0
SET PDFScale, 1
SET PDFPointsize, 1
SET PDFPrintconfig, "Soli"

User avatar
Advanced member
Advanced member
Hans_Winkler - 7/22/2020 9:28:54 AM
   
RE:Set the options for exporting PDF
A few more:
SET PDFMarginTop, .75
SET PDFMarginBottom, .75
SET PDFMarginRight, .75
SET PDFMarginLeft, .75

User avatar
Advanced member
Advanced member
Dana - 7/22/2020 9:48:01 AM
   
RE:Set the options for exporting PDF
There is also:

SET PDFHeight, 11
SET PDFWidth, 17

At one point I was using:

EXPORT PDF, "s:\\test.pdf"

but I had it commented out of my kxl, because apparently using EXPORT PDF ignores the line width settings in the printer configuration (Set PDFPrintConfig) (for all I know that may be fixed now)  Instead, I use a compiled Autoit (a Windows scripting language)  script to click the KC menus to export the PDF:

Send("{ESC}{ESC}{ESC}{ESC}{ALT}FEF{F7}{F1}")

Autoit is great for automating other KC functions that aren't supported by KXL.

User avatar
Advanced member
Advanced member
Hans_Winkler - 7/22/2020 10:08:01 AM
   
RE:Set the options for exporting PDF
Hi Dana,
sorry I didn't see your post until I posted mine.
Hans

User avatar
Advanced member
Advanced member
Hans_Winkler - 7/22/2020 10:06:18 AM
   
RE:Set the options for exporting PDF
Maybe I'll have them soon on my own:
SET PDFPaper, 0 // 0 = Keyin, then the other two lines will set the the width and height. All numbers above correspond to the different items in the "Size" dropdown box.
SET PDFWidth, 8.5
SET PDFHeight, 11

Soli, Maybe that is all you need :)!

All the best to you,
Hans

User avatar
Advanced member
Advanced member
Soli - 7/22/2020 4:11:45 PM
   
RE:Set the options for exporting PDF

Hans and Dana,

Your help is highly appreciated.

All set functions work very well.
But ExportEntities aGenSelEnts , PDF , "TEST.PDF" produces
an additional unwanted
view 1 of the model at x=0 y=0 of the drawing.

(for both All display or Window selection method )

 

Other problem.

The line thickness is very thin and is not related to the width scale in the setting configuration.

I have to try harder.

Thank you.


Solomon Steinberg,
Israel

DELL OPTIPLEX 7050
NVIDIA QUADRO P2000
KEYCREATOR 13.5
KEYCREATOR 2020 SP2



User avatar
Advanced member
Advanced member
Hans_Winkler - 7/22/2020 5:52:56 PM
   
RE:Set the options for exporting PDF
Are you trying to print from model mode or layout mode?

User avatar
Advanced member
Advanced member
Hans_Winkler - 7/22/2020 10:08:06 PM
   
RE:Set the options for exporting PDF
Solomon, I guess you are trying to print from layout mode. I did a test file from layout mode and it does indeed produce a view 1 of the 3D model. That seems to be a bug!!

1 2
Login