What is wrong with this simple code?

Discussion in 'AutoCAD' started by kemp, Jan 5, 2005.

  1. kemp

    kemp Guest

    (vla-put-PrinterDescPath (vla-get-files (vla-get-preferences
    (vlax-get-acad-object))) "S:\\CAD-Setup\\Plotters\\2004")

    (vla-put-PrinterStyleSheetPath (vla-get-files (vla-get-preferences
    (vlax-get-acad-object))) "S:\\CAD-Setup\\Plot Styles")

    I am using ACAD 2k5, but I am testing for 2k4 users and can't see why it
    won't path the PrinterDescPath to the 2004 folder. It will work when I
    set the path to the folder "S:\\CAD-Setup\\Plotters\\2005"

    The second script will not set the value at all on the S drive, but will
    set it to local directories on my C drive.

    In both cases I am getting a "Automation Error. Invalid Argument"
    message. All of the folders do exist, and I have quintuple checked them
    to make sure they are correct. (vl-load-com) is loaded as well. What
    could be giving me these errors?

    thx, kemp
     
    kemp, Jan 5, 2005
    #1
  2. kemp

    kemp Guest

    I figured it out, permissions on the folders must be set to READ/WRITE.

    kemp
     
    kemp, Jan 5, 2005
    #2
Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.