Hatch lisp crashes?

Discussion in 'AutoCAD' started by spencer1971, Jul 15, 2004.

  1. spencer1971

    spencer1971 Guest

    Below is a sectioni of lisp that use as part of a hatching command.
    It seems that the -bhatch line is wrong as the hatch appears but the lisp terminates and does not run the outset command to reinstate osnap, layer, etc. If I put a "" at the end of the line __ (command "-bhatch" pause)__ then it runs ok but does not allow for picking multiple hatch points.

    I need a "double pause for input" to allow for multiple points to be picked

    Any ideas. would be greatfully recieved

    spence

    (defun P_shade ()
    (setq *error* myerror)
    (if scale (setq sc1 (rtos scale 2 2)) (setq sc1 ""))
    (setq sc1 (getdist (strcat "\ninput scale <" sc1 ">: ")))
    (if sc1 (setq scale sc1))
    (setvar "cmdecho" 0)
    (c_inset)
    (shadeht)
    (setvar "hpname" "solid")
    (setvar "hpang" 0)
    (setvar "hpscale" (* 1 scale))
    (princ "\nSelect area to hatch")
    (command "-bhatch" pause)
    (setvar "cmdecho" 1)
    (c_outset)
    (princ)
    )
     
    spencer1971, Jul 15, 2004
    #1
  2. spencer1971

    spencer1971 Guest

    not ro worry I found this posted by From Jason Piercey

    (initdia) (command ".bhatch") (while (> (getvar "CmdActive") 0) (command
    pause))

    many thanks
     
    spencer1971, Jul 15, 2004
    #2
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.