Still BHATCH problem with code.....

Discussion in 'AutoCAD' started by Bob Quinn, Aug 4, 2004.

  1. Bob Quinn

    Bob Quinn Guest

    ;As per T.Willeys suggestion....
    ;Here is the code...


    ;pt8 is the point I am trying to get it to pick......
    (defun hatchcompit ()
    (princ "\n in hatchcompit ")
    (setq saveosnapcoord (getvar "osnapcoord"))
    (setvar "osnapcoord" 1)
    (setvar "pickbox" 0)
    (setvar "osmode" 0)
    (setq temp (getvar "osmode"))
    (princ "\n osmode is: ")
    (princ temp)

    (if (eq cuttype "$punch")
    (command "_bhatch" "properties" "ANSI31" "0.5" "0" "advanced" "island"
    "yes" "retain" "no" "" "non" pt8 "")
    (command "_bhatch" "properties" "solid" "advanced" "island" "yes" "retain"
    "no" "" "non" pt8 "")
    )
    (setvar "osnapcoord" saveosnapcoord)

    (command "change" (entlast) "" "P" "layer" "SHOW_COMP" "")

    (princ "\n in rtgcode and cuttype is: ")

    (princ cuttype)

    );end defun
     
    Bob Quinn, Aug 4, 2004
    #1
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.