Hi friends, in this article I will explain about how to
give the hatch to the particular area by pick the point in AutoLISP..
In previous article I explained about how to give the hatch to the rectangle in AutoLISP and how to give the hatch to the circle
in AutoLISP
First of all open the Visual Lisp Editor in AutoCAD
(defun c:pth()
(setq
p1(getpoint "pick the point")
p2(list (+ (car p1) 10) (cadr p1))
p3(list (car p2) (+ (cadr p1) 10))
p4(list (car p1) (cadr p3))
p5(list (+ (car p1) 5) (+ (cadr p1) 5))
)
(command "line" p1 p2 p3 p4 p1
"")
(command "hatch" "net"
10 "45" "l" "")
(command "-hatch" p5 "")
)
|
In the above program I take four lines and draw lines and make
those lines as rectangle. We can’t give hatch to the explode rectangle using
the code in the previous article how to give the hatch to the rectangle in AutoLISP and how to give the hatch to the circle in AutoLISP
We have to use the pick point property. For this we
have to use the above code.
Save the file as pth.LSP
Then write
the below line in the AutoCAD Command prompt.
Command: (load “pth”)
Command:pth
|
Happy Reading my Blog.
Hello sir,
ReplyDeleteI am searching the LISP codes for finding out diameter of a circle by just clicking on it. Please help me.