We work with a large number of CTB files, or at least we used to. Trying to streamline the problem. But, as a result of the way things used to be done, we have CTB files for drawings located in the folder of the drawing. Until now, this lisp routine, added to the end of the acad.lsp file, worked just fine for repathing the location autocad looks for the ctb. On my new machine, Windows 7, 64 bit with 2012, it will not work. Any ideas?
here's the lisp routine we use:
(defun C:GC ()
(setq printerstylesheetdir (getvar "dwgprefix"))
acadLocation (vl-registry-read (strcat "HKEY_LOCAL_MACHINE\\"
(setenv "PrinterStyleSheetDir" printerstylesheetdir)
Here's the error i get now...
no function definition: VLAX-PRODUCT-KEY :error#2*Cancel*
here is a correction to your lisp function
(defun C:GC () (setq printerstylesheetdir (getvar "dwgprefix") acadLocation (vl-registry-read (strcat "HKEY_LOCAL_MACHINE\\" (vlax-product-key)) "AcadLocation")) (setenv "PrinterStyleSheetDir" printerstylesheetdir) (princ) )
Odds are, you are missing a call to (vl-load-com) in your new system. You should also verify that registry path - it might be different for 64 bit applications. Also, there is a LISP function (gc) which you might end up conflicting with if not careful with the C: prefix. Give it a long descriptive name and then use the PGP to shorten it up to GC or whatever works for you.
Access a broad range of knowledge to help get the most out of your products and services.
Start with some of our most frequented solutions or visit the Installation and Licensing Forum to get help installing your software.
Upgrading to a 2015 product? Make sure to check these out 1st!