We are using the ACAD.lsp to drive our support paths in AutoCAD, in 2015 it looks like AutoCAD, AutoCAD MEP, and Civil 3D all use the same installed program directory, so if all (3) products are installed on one machine, our current ACAD.lsp files are not going to work, as they are unique per product. and AutoCAD is not going to know what to run, just the first it sees in the AutoCAD Support folder.
I am trying to write a condition statement in the beginning of our ACAD.lsp that would give us the ability to merge all (3) ACAD.lsp files into (1) by finding out which product is running.
I was thinking of using the (getvar "ROAMABLEROOTPREFIX") to identify what product is running, because even though all (3) products are installed in the same location, the user specific roamable root prefix is unique, where MEP and Civil 3D would be in the folder names.
I was thinking of something like the little lisp below that I was trying to see if the concept worked, but I am missing something even on this, as it is not working for me.
I am not very familiar with the lisp and figure I am missing some kind of syntax. If anyone has ideas on getting the below to work, or any other ideas on how to work with the ACAD.lsp with multiple verticals installed, I am all ears.
(defun C:TEST (/)
(cond (((getvar "ROAMABLEROOTPREFIX")="*C3D*") (princ "\nTHIS IS CIVIL 3D!!!!"))
(((getvar "ROAMABLEROOTPREFIX")="*MEP*") (princ "\nTHIS IS AutoCAD MEP!!!!"))
(t (princ "\nTHIS IS AutoCAD!!!!"))
)
)
Thank you.