How to make a hatched area by LISP??
How do I make a hatches area, which is defines by user clicks, when using LISP.I have a program which worked in AutoCAD, but not in BricsCad.(Princ ".")(Defun C:SKRAV ( / ) (Prompt "\n HATCH - Hatching by pointing out extends") (SetQ OLD_CMDECHO (GetVar "CMDECHO")) (Setvar "CMDECHO" 0) (SetQ HATCH_NAME "ANSI31") (SetQ HATCH_SCALE 10) (SetQ HATCH_ANGLE 0) (SetQ PT (getpoint "\n First point : ")) (COMMAND "._PLINE" PT) (While (SetQ PT (getpoint PT "\n Next point: ")) (command PT) ) ; While (COMMAND "_C") (SetQ PLINE_ENTITY (entlast)) (COMMAND "._HATCH" HATCH_NAME HATCH_SCALE HATCH_ANGLE PLINE_ENTITY "") (EntDel PLINE_ENTITY) (SetVar "CMDECHO" OLD_CMDECHO) (Prompt "\n \n Program finished.") (Princ)) ; Defun(Princ ".OK")(Princ);*** EOF ***Can anyone tell me what is wrong here.I think it is in the line (Command "_C")and the line where the command "_Hatch" is used.Svend Nielsen
Comments
-
What does (command PT) do?
0 -
As far as I kan see it gives the next coordinate for the polyline command.
0 -
Svend,You can use this command to hatch an entity. I use it in v6 BricsCAD.(setq myEnt (entsel "Choose Entity to Hatch"))(command "_hatch" "GRAVL1" "10" "0" myEnt "")The # of parameters for different hatches is different. For the GRAVL1 hatch the 10 = scale 0 = rotation.Steve
0