Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations cowski on being selected by the Eng-Tips community for having the most helpful posts in the forums last week. Way to Go!

drawing slots ACAD2000

Status
Not open for further replies.

rwbaker

Computer
Joined
Mar 27, 2004
Messages
37
Location
US
is there a command that will draw slots in acad2000
 
You can use MLINEs with arced caps...

Another thing you can do is, draw a line, offset it the width and then fillet the ends.

One last suggestion would be to make a unit block and then insert it in at the appropriate scales.

- Tracy
 
Or, you could try this:

(defun C:SLOT (/ A B B1 B2 C D PW)
(setq PW (getvar"PLINEWID"))
(initget 1)
(setq B1 (getdist "\nLength of slot: "))
(setq B2 (/ B1 2.0))
(setq B (list B2 0.0))
(initget 1)
(setq C (list 0.0 (getdist "\nWidth of slot: ")))
(initget 1)
(while
(setq A (getpoint "\nInsertion point: "))
(setq D (list (- (car A) (/ (car B) 2)) (- (cadr A) (/ (cadr C) 2))))
(setvar "PLINEWID" 0)
(command "_.pline"
D
(mapcar '+ D B)
"_a"
(mapcar '+ D B C)
"_l"
(mapcar '+ D C)
"_a"
"_cl")
);while
(setvar "PLINEWID" PW)
(princ)
)

Add it to your Acad.lsp file, or type (load"slot") on the command line, or lcick Tools / Load Application and go tet it, or or or or ....
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top