Can I make IF do OR OR ??

Discussion in 'AutoCAD' started by mnelson, Jun 23, 2004.

  1. mnelson

    mnelson Guest

    I’d like to have this IF look for “Dsmith†OR “MChammer†OR “Ddallasâ€. How can I handle the IF looking for more than one user – or a list of users?

    (if (= (getvar "loginname") "Dsmith")

    Thanks
     
    mnelson, Jun 23, 2004
    #1
  2. (if (or
    (= (getvar "loginname") "Dsmith")
    (= (getvar "loginname") "MChammer")
    (= (getvar "loginname") "Ddallas")
    )
     
    Allen Johnson, Jun 23, 2004
    #2
  3. mnelson

    TCEBob Guest

    Cool. Thank you.

    rs
     
    TCEBob, Jun 23, 2004
    #3
  4. (if (member (getvar "loginname") (list "Dsmith' "MChamber" "Ddallas"))
    or to make sure caps-lock isn't on at login
    (if (member (strcase (getvar "loginname")) (list "DSMITH" "MCHAMBER"
    "DDALLAS"))

    can I handle the IF looking for more than one user - or a list of users?
     
    Alan Henderson @ A'cad Solutions, Jun 23, 2004
    #4
  5. mnelson

    Rudy Tovar Guest

    ;Actually he'd probably have the list already.

    (if (member <name> ulist)
    (progn
    ;do_what_ever
    )
    )
    --

    AUTODESK
    Authorized Developer
    http://www.Cadentity.com
    MASi
     
    Rudy Tovar, Jun 23, 2004
    #5
  6. mnelson

    mnelson Guest

    Once again the group to the rescue - thanks!
     
    mnelson, Jun 24, 2004
    #6
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.