Author Topic: Lisp and vertical applications  (Read 6481 times)

0 Members and 1 Guest are viewing this topic.

evanhughes

  • Guest
Lisp and vertical applications
« 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

Krushert

  • Seagull
  • Posts: 13679
  • FREE BEER Tomorrow!!
Re: Lisp and vertical applications
« Reply #1 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)
)
I + XI = X is true ...  ... if you change your perspective.

I no longer CAD or Model, I just hang out here picking up the empties beer cans

Krushert

  • Seagull
  • Posts: 13679
  • FREE BEER Tomorrow!!
Re: Lisp and vertical applications
« Reply #2 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
I + XI = X is true ...  ... if you change your perspective.

I no longer CAD or Model, I just hang out here picking up the empties beer cans