Help with DIESEL expression

Discussion in 'AutoCAD' started by ipi, Jun 4, 2008.

  1. ipi

    ipi Guest

    Hi,

    I basically use 2 templates. The main difference is that one is
    oriented for portrait and the other for landscape.

    For the portrait template, the variable LIMMAX is 213,300. For the
    landscape template, LIMMAX is 300,213

    I am trying (not successfully) to write a DIESLE expression that runs
    script A if the LIMMAX is 213,300 or script B if the LIMMAX is
    300,213.

    Thanks in advance!
     
    ipi, Jun 4, 2008
    #1
  2. ipi

    strawberry Guest

    Does this lisp expression help?

    (if (< 1 (/ (- (car (getvar "limmax")) (car (getvar "limmin"))) (-
    (cadr (getvar "limmax")) (cadr (getvar "limmin")))))
    (alert "landscape!")
    (alert "not landscape!"))
     
    strawberry, Jun 7, 2008
    #2
  3. ipi

    ipi Guest

    Yes, that does help. Thank you!

    David Hassan
    www.ipillustration.com
     
    ipi, Jun 10, 2008
    #3
  4. ipi

    strawberry Guest

    I'd be interested to see your final routine!
     
    strawberry, Jun 10, 2008
    #4
Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.