.. 'cal related question..

Discussion in 'AutoCAD' started by C Witt, Jul 20, 2004.

  1. C Witt

    C Witt Guest

    is it possible to create a custom lisp that you can use the same way you
    can use 'cal when already in another command??....
     
    C Witt, Jul 20, 2004
    #1
  2. C Witt

    T.Willey Guest

    Yes, I think that you just can't try and invoke a command while in a command. I have midpoint lisp that I use transparent in commands all the time.

    Tim
     
    T.Willey, Jul 20, 2004
    #2
  3. C Witt

    C Witt Guest

    could you explain HOW?.. as far as i can tell (defun c:xxx and (defun
    xxx don't work for this..
     
    C Witt, Jul 21, 2004
    #3
  4. C Witt

    T.Willey Guest

    (defun c:BI()
    (initget 1)
    (setq po1(getpoint "\nFirst point: "))
    (setq po2(getpoint po1 "\nSecond point: "))
    (setq os1(getvar "osmode"))
    (setvar "osmode" 0)
    (setq po3 (mapcar '(lambda (a b) (/ (+ a b) 2.0)) po1 po2))
    (vl-cmdf po3)
    (setvar "osmode" os1)
    (princ)
    )

    This is my midpoint routine (with help from people here). Then I call it with ('bi) to access it while in other commands, like copy, move, line etc...

    Hope that help.
    Tim
     
    T.Willey, Jul 21, 2004
    #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.