resetting a variable

Discussion in 'AutoCAD' started by jlspartz, Mar 22, 2005.

  1. jlspartz

    jlspartz Guest

    I need to keep resetting a variable which would be how much to shift a grid over and then you type it in or use the default amount and it shifts it. Then, go back and shift it again! So, I can't do a (if (not shift-h) because there already is one set from previously. Well, I think that may just be one issue. Here is my program (you need acad 2005 for the hatchsetorigin command) and I REALLY need help with this shifting issue. Sometimes it shifts, sometimes not, sometimes it takes the amount I typed in, sometimes it's overridden by the default amount instead. UGH! The program is otherwise set. I've only been programming for a couple months, so I don't know all the ins and outs. Can anyone help me out?
     
    jlspartz, Mar 22, 2005
    #1
  2. jlspartz

    jlspartz Guest

    Ok, I seem to have it worked out. I set the variable to nil at the end so that it wipes it clean each time and then did the condition test outside of the loop, so that the default variable to be used is only set once. That seems to work, but I have a major problem with hatches. It seems to be an AutoCAD issue. I will post that in a new thread.
     
    jlspartz, Mar 22, 2005
    #2
  3. jlspartz

    Tom Smith Guest

    I've only been programming for a couple months, so I don't know all the ins and outs

    You seem to have worked things out. If you don't mind a constructive ctritique, please post your completed code. I may have time over Easter to make some suggestions. Based on the last version you posted, I know it can be significantly streamlined and simplified, and I have an idea for possibly improving the interface.
     
    Tom Smith, Mar 23, 2005
    #3
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.