Originally Posted by
zride91
For AutoCAD releases 2011 and 2013, we've been using the ACAD.lsp to configure our AutoCAD support paths for AutoCAD, AutoCAD MEP, and AutoCAD Civil 3D, and it has been working pretty well thanks to the information on this site an others on the topic.
When we've been installing the previous versions, I usually use a script that installs the software to copy the custom ACAD.lsp to the Support folder in the appropriate program directory so AutoCAD sees it on it's first run, and it then is configured to look for the ACAD.lsp on the network for any launch thereafter.
The problem we're looking at with the 2015 AutoCAD products is that all the verticals are being installed in the same directory as AutoCAD, so all the programs now share the same Support folder. If I have all (3) versions of AutoCAD (AutoCAD, AutoCAD MEP, and Civil 3D) installed on the same machine, I can't figure out a way to have the program know which ACAD.lsp to run to configure the appropriate support paths.
Does anyone else run use these ACAD.lsp files for custom config and run multiple versions of AutoCAD that may be able to share some ideas?
Why not just use an Autoloader .bundle?
You define which Component is loaded into which Vertical & Version via PackageContents.xml, so you can have a common CUIx and LISP loaded into all, and Vertical-specific Components loaded only into the appropriate application. User literally just launches the application from your application icon, and done. Lemon squeezy. See the link in my signature for more information.
Separately, if you still need to determine if your LISP code is being loaded into a drawing that has been saved by Civil 3D (in vanilla AutoCAD for example), this may be of use:
Code:
(defun _IsCivilDatabase (/ isCivilDb)
;; Example:
;; (if (_IsCivilDatabase)
;; (prompt "\nCivil 3D Drawing opened. ")
;; )
(foreach x (entget (namedobjdict))
(if (and (= 3 (car x)) (= "Root" (cdr x)))
(setq isCivilDb T)
)
)
isCivilDb
)