I am using Autocad 2012 64bit and I have a small printing routine to create predefined B size pdfs. The problem I face is that when I change the "PrinterStyleSheetDir" path using acedSetEnv method (see http://adndevblog.typepad.com/autocad/2012/06/a-si
the plot preview appears in color, as the pen table is not found. Even if I try a regular Autocad plot, it does the same output (although the pen table name is shown correctly in the list). Actually I have to open the OptionsDialog and reselect the path into the "Plot Style Table Search Path" and click Apply, then the plots will be ok.
I am using the same method to adjust the "PrinterConfigDir" (pointing to only one Dwg to Pdf.pc3) and this part is ok but it seems that changing the "PrinterStyleSheetDir" is not "saved" until I click Apply in the OptionsDialog.
This will affect not only the pdfs but all the other prints I have to do(for ex. when using publish).
Is anything that I might be missing?
Thanks for any suggestions.
Sorry for the delay.
There doesnt seem to be a solution for this behavior.
While the "setvar" can set multiple folders to the PrinterStyleSheetDir, it does not ensure that AutoCAD recognises all those paths. The COM API using "vla-put-PrinterStyleSheetPath" ensures that AutoCAD recognises the path but it does not support adding multiple folder paths. This has been logged in our internal database and will likely be addressed in future release.
For now, the only way that I can think of is to provide a single folder path with "vla-put-PrinterStyleSheetPath" API and then reset it to what it was after your work is done.
Developer Technical Services
Autodesk Developer Network