See the top rated post in this thread. Click here

Results 1 to 4 of 4

Thread: Help with expression

  1. #1
    Member
    Join Date
    2002-12
    Posts
    28
    Login to Give a bone
    0

    Default Help with expression

    Hi guys,

    I need help on how to write the code in autolisp for the following:

    if the value of A is greater than B but less than C then do X, if not do Y.


    Thanks,
    Mac

  2. #2
    AUGI Addict fixo's Avatar
    Join Date
    2005-05
    Location
    Pietari, Venäjä
    Posts
    1,269
    Login to Give a bone
    1

    Default Re: Help with expression

    Quote Originally Posted by fclao View Post
    Hi guys,

    I need help on how to write the code in autolisp for the following:

    if the value of A is greater than B but less than C then do X, if not do Y.


    Thanks,
    Mac
    Try:

    Code:
     
    (if (> C A B)
      (goto X part)
    (goto Y part)
    )
    ~'J'~

  3. #3
    Member
    Join Date
    2002-12
    Posts
    28
    Login to Give a bone
    0

    Default Re: Help with expression

    Quote Originally Posted by fixo View Post
    Try:

    Code:
     
    (if (> C A B)
      (goto X part)
    (goto Y part)
    )
    ~'J'~
    Got it!! Thanks!!

  4. #4
    AUGI Addict fixo's Avatar
    Join Date
    2005-05
    Location
    Pietari, Venäjä
    Posts
    1,269
    Login to Give a bone
    0

    Default Re: Help with expression

    Quote Originally Posted by fclao View Post
    Got it!! Thanks!!
    You're welcome
    Happy computing

    ~'J'~

Similar Threads

  1. some help with a macro expression
    By Doodlemusmaximus in forum AutoCAD Customization
    Replies: 4
    Last Post: 2011-03-21, 10:49 AM
  2. Expression of disapproval
    By garethace in forum DWG TrueView - General
    Replies: 0
    Last Post: 2010-06-01, 12:54 PM
  3. alternate key in lisp expression
    By rtufano in forum AutoLISP
    Replies: 15
    Last Post: 2010-05-25, 12:52 AM
  4. Rtext expression
    By BCrouse in forum AutoLISP
    Replies: 2
    Last Post: 2005-05-25, 04:35 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •