Author Topic: Loading Custom CUIx for AutoCAD version 2014 or 2016  (Read 1195 times)

0 Members and 1 Guest are viewing this topic.

ROBBO

  • Bull Frog
  • Posts: 217
Loading Custom CUIx for AutoCAD version 2014 or 2016
« on: March 29, 2016, 08:23:04 AM »
Hi,

I would appreciate a little help with the code below which I have in my start up.
I have two versions of AutoCAD installed 2014 and 2016, but would like to only load in a custom cuix for 2014 only.

How can I achieve this?

Many thanks in advance, Robbo.

Code: [Select]
(echooff)
(defun IWillOnlyRunOnceADay nil
(command "cuiload" "C:\\Program Files\\Autodesk\\ApplicationPlugins\\Custom 2014.bundle\\Contents\\Support\\Custom.cuix" ^C)
(princ)
)

(if
(not
(and
(setq date (getenv "OnceADay"))
(< (fix (getvar 'DATE)) (atoi date))
)
)
(progn
(IWillOnlyRunOnceADay)
(setenv "OnceADay" (itoa (+ 1 (fix (getvar 'DATE)))))
)
)
(princ)
(echoon)
The only thing to do with good advice is to pass it on.
It is never of any use to oneself.

Oscar Wilde
(1854-1900, Irish playwright, poet and writer)

ChrisCarlson

  • Guest
Re: Loading Custom CUIx for AutoCAD version 2014 or 2016
« Reply #1 on: March 29, 2016, 08:58:17 AM »
Code - Auto/Visual Lisp: [Select]
  1. (if (wcmatch (getvar "ACADVER") "*19.1*")(alert "this is 2014") (alert "not 2014"))

ROBBO

  • Bull Frog
  • Posts: 217
Re: Loading Custom CUIx for AutoCAD version 2014 or 2016
« Reply #2 on: March 29, 2016, 09:39:51 AM »
Code - Auto/Visual Lisp: [Select]
  1. (if (wcmatch (getvar "ACADVER") "*19.1*")(alert "this is 2014") (alert "not 2014"))

Thank you ChrisCarlson. Appreciate your help.

I am still learning this language.
The only thing to do with good advice is to pass it on.
It is never of any use to oneself.

Oscar Wilde
(1854-1900, Irish playwright, poet and writer)