Author Topic: Plot Style Search Path  (Read 1797 times)

0 Members and 1 Guest are viewing this topic.

jbuzbee

  • Swamp Rat
  • Posts: 851
Plot Style Search Path
« on: February 11, 2009, 03:29:35 PM »
Plot Style Search Path - so this can't be set programatically?  that sucks.

I have this bit of code in a mnl file so that once the menu is loaded it sets some stuff up:

Code: [Select]
;;; setup search and plotter paths
;;; then menu has just been loaded
(progn
 
(if (menugroup "kb00")
   (progn
     (setq menuLocation (vla-get-MenuFileName (vla-item(vla-get-menugroups(vlax-get-acad-object))"kb00"))
   filelist (vla-get-SupportPath
  (vla-get-files (vla-get-Preferences (vlax-get-acad-object)))
  )
   )
     (if (vl-string-search "kb0018" filelist)
       (princ "\nPath exists")
       (progn
(vlax-put
   (vla-get-files (vla-get-Preferences (vlax-get-acad-object)))
   'SupportPath
   (strcat filelist ";" (vl-string-right-trim "\\kb0018.cui" menuLocation))
   )
)
       )
     (kb:STARTUP)
     )
   )
  (setq menuLocation nil
filelist nil)
  )

(kb:Startup) is defined above this bit.
James Buzbee
Windows 8

ronjonp

  • Needs a day job
  • Posts: 7531
Re: Plot Style Search Path
« Reply #1 on: February 11, 2009, 03:38:28 PM »
I think you need to use vla-put-printerstylesheetpath.

Windows 11 x64 - AutoCAD /C3D 2023

Custom Build PC

jbuzbee

  • Swamp Rat
  • Posts: 851
Re: Plot Style Search Path
« Reply #2 on: February 11, 2009, 03:49:41 PM »
I think that's for something else.  You can only have one path for the Plot Style files, .stb ' .ctb.  The help for that claims you can have multiple:

Quote
Use a semicolon [;] to separate multiple directories; however, do not end the string with a semicolon.
James Buzbee
Windows 8

ronjonp

  • Needs a day job
  • Posts: 7531
Re: Plot Style Search Path
« Reply #3 on: February 11, 2009, 04:27:52 PM »
The code you have adds the menu path to the support paths...if you want that path to be where the plot styles are found use the suggestion above.

Like so:

Code: [Select]
               (vlax-put (vla-get-files (vla-get-preferences (vlax-get-acad-object)))
                              'printerstylesheetpath
                              (vl-string-right-trim "\\kb0018.cui" menulocation)
                    )

I might just be completely missing the end result though. :-D

« Last Edit: February 11, 2009, 04:32:36 PM by ronjonp »

Windows 11 x64 - AutoCAD /C3D 2023

Custom Build PC

JohnK

  • Administrator
  • Seagull
  • Posts: 10655
Re: Plot Style Search Path
« Reply #4 on: February 11, 2009, 05:33:25 PM »
(vla-put-PrinterStyleSheetPath (vla-get-files (vla-get-Preferences (vlax-get-acad-object)))  "C:\\")
TheSwamp.org (serving the CAD community since 2003)
Member location map - Add yourself

Donate to TheSwamp.org

ronjonp

  • Needs a day job
  • Posts: 7531
Re: Plot Style Search Path
« Reply #5 on: February 11, 2009, 05:35:12 PM »
I think you need to use vla-put-PrinterStyleSheetPath  :-D

Windows 11 x64 - AutoCAD /C3D 2023

Custom Build PC

JohnK

  • Administrator
  • Seagull
  • Posts: 10655
Re: Plot Style Search Path
« Reply #6 on: February 11, 2009, 05:41:00 PM »
If i remember right; there will be a problem with spaces though.
TheSwamp.org (serving the CAD community since 2003)
Member location map - Add yourself

Donate to TheSwamp.org

jbuzbee

  • Swamp Rat
  • Posts: 851
Re: Plot Style Search Path
« Reply #7 on: February 12, 2009, 08:50:44 AM »
That did it!  Thanks!!!
James Buzbee
Windows 8