Author Topic: 2012 plotting preferences node  (Read 1956 times)

0 Members and 1 Guest are viewing this topic.

Krushert

  • Seagull
  • Posts: 13679
  • FREE BEER Tomorrow!!
2012 plotting preferences node
« on: July 06, 2011, 04:59:34 PM »
Has anybody had a trouble in setting this tab with code for 2021?

If I manually enter the paths through the options dialog and then use the vla-get-function
Code: [Select]
  (SETQ READNODE (vla-GET-PrinterStyleSheetPath myFiles))I get
Quote
READNODE = "L:\\ACAD BUSINESS FILES\\CWS Plot Styles;C:\\ProgramData\\Autodesk\\ACA 2012\\enu\\Plotters\\Plot Styles"



Now if I try to set that very same stings with code like this piece of code
Code: [Select]
(defun c:TEST-PLOT-PREFS ()
  (vl-load-com)

;;; Getting locations of System and/or Application Folders and setting to Varaibles
  (setq myProfile (vla-get-preferences (vlax-get-acad-object)))
  (setq myFiles (vla-get-files myProfile))
  (setq ProgramData
(strcat "C:\\ProgramData\\Autodesk\\ACA 2012\\enu\\")
  )

;;; Setting Company Folder to variable                                                                  .
  (setq CWSCommonFolders (strcat "L:\\ACAD BUSINESS FILES"))

;;; Setting search path for Plot Styles node.
  (vla-PUT-PrinterStyleSheetPath
    myFiles
    (strcat
      (strcat CWSCommonFolders "\\CWS Plot Styles")
      ";"
      (strcat ProgramData "Plotters\\Plot Styles")
    )
  )
  (vlax-release-object myFiles) ; Release the object
)
and I get this blow-back at the command line
Quote
Automation Error. Invalid Argument

If I take out either one of the paths, it works like a charm.   Something goofy I am missing,

FYI: With 2012 you are allowed to set multiple plotter "***" paths now.
I + XI = X is true ...  ... if you change your perspective.

I no longer CAD or Model, I just hang out here picking up the empties beer cans

dgorsman

  • Water Moccasin
  • Posts: 2437
Re: 2012 plotting preferences node
« Reply #1 on: July 06, 2011, 05:16:29 PM »
Don't have it on hand, but from that I suspect the interface wasn't updated to parse multiple paths.  If so... whoopsie.
If you are going to fly by the seat of your pants, expect friction burns.

try {GreatPower;}
   catch (notResponsible)
      {NextTime(PlanAhead);}
   finally
      {MasterBasics;}

Krushert

  • Seagull
  • Posts: 13679
  • FREE BEER Tomorrow!!
Re: 2012 plotting preferences node
« Reply #2 on: July 07, 2011, 10:48:34 AM »
I am thinking the same.  Thanks!
I + XI = X is true ...  ... if you change your perspective.

I no longer CAD or Model, I just hang out here picking up the empties beer cans