Why so slow?

Discussion in 'AutoCAD' started by TCEBob, Oct 2, 2004.

  1. TCEBob

    TCEBob Guest

    This is in my startup program:

    (defun c:fix( / x)
    (setq fixlst
    '(
    ("cmdecho" . 0)("blipmode" . 0)("plinegen" . 1)("plinetype" . 2)
    ("regenmode" . 1)("expert" . 5)("pickstyle" . 1)("savetime" . 15)
    ("sortents" . 48)("peditaccept" . 1)("edgemode" . 1)("splinetype" . 5)
    ("dimassoc" . 2)("offsetgaptype" . 0)("mirrtext" . 0)("treedepth" . 0)
    ("treemax" . 30000)("pellipse" . 1)("donutid" . 0)
    )
    )
    (mapcar '(lambda(x) (command "setvar" (car x) (cdr x))) fixlst)
    (princ))

    (c:fix) ;run it

    Takes about 4 seconds to run. Whereas if I simply list all the setvars
    separately it takes no perceptable time.

    What am I doing wrong?

    rs
     
    TCEBob, Oct 2, 2004
    #1
  2. TCEBob

    TCEBob Guest

    Dear tcebob:
    Try this: (mapcar '(lambda(x) (setvar (car x) (cdr x))) fixlst)

    rs
     
    TCEBob, Oct 2, 2004
    #2
  3. TCEBob

    TCEBob Guest

    Hey, thanks. Worked like a charm.

    rs
     
    TCEBob, Oct 2, 2004
    #3
  4. TCEBob

    Doug Broad Guest

    "The first sign of madness." <g>
     
    Doug Broad, Oct 2, 2004
    #4
  5. TCEBob

    TCEBob Guest

    Well, newsgroups can offer new dimensions to the ancient art of talking to
    oneself.

    rs
     
    TCEBob, Oct 3, 2004
    #5
  6. TCEBob

    John Uhden Guest

    True, though the entire community overheard the conversation. So, in what other
    NGs do you converse with yourself? Might be fun to listen in. ;)

    John Uhden, Cadlantic
    <the e-mail address is bogus>
    http://www.cadlantic.com
    Sea Girt, NJ
     
    John Uhden, Oct 3, 2004
    #6
  7. TCEBob

    Joe Burke Guest

    John and Doug,

    If you haven't already, check Larry Leuallen's post in a thread by Rudy dated 9/15. I
    almost missed it.

    Joe
     
    Joe Burke, Oct 3, 2004
    #7
  8. TCEBob

    TCEBob Guest

    John,

    Auto-conversation is not an habit with me as I reserve it for those times when I
    really need sophisticated and witty repartee. Or when I screw up.

    What other ngs are there?

    rs
     
    TCEBob, Oct 3, 2004
    #8
  9. TCEBob

    Douglas Barr Guest

    !
     
    Douglas Barr, Oct 4, 2004
    #9
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.