TheSwamp

CAD Forums => Vertically Challenged => Topic started by: evanhughes on July 20, 2007, 06:19:16 AM

Title: Lisp and vertical applications
Post by: evanhughes on July 20, 2007, 06:19:16 AM
Hi All

I have a lisp for use in the office and i need to run one routine for standard autocad and another for Architecture (ADT) and MEP (ABS).

How do i check if vertical app and run P1 if it is or P2 if it isn't.

Any help greatly appreciated.

Evan
Title: Re: Lisp and vertical applications
Post by: Krushert on July 20, 2007, 08:06:02 AM
Something like this

Code: [Select]
;;; Sub Function to Check for Active Autocad Version
;;; Note this function only checks against the Architecture Vertical for Autocad.
(DEFUN CheckAcadVersion ()
  (setq ARCH-08 "17.1s (LMS Tech)") ; for Arch 2008
  (setq ADT-07 "17.0s (LMS Tech)") ; for ADT 2007
  (setq ARCH_Ver (getvar "acadver")) ; GETS VERSION YEAR OF ACTIVE ACAD APPLICATON.

  (cond
    ((= ARCH-08 ARCH_Ver)
     (setq acadversion (strcat "ACD-A 2008"))
    )
    ((= ADT-07 ARCH_Ver)
     (setq acadversion (strcat "ADT 2007"))
    )
  )
  (princ)
)
Title: Re: Lisp and vertical applications
Post by: Krushert on July 20, 2007, 08:11:47 AM
you might want to take a look over here.
http://www.theswamp.org/index.php?topic=16555.0