Posted  by  admin

Autocad Slot Command

Autocad slot command tutorial

slot routine

slot routine

SlotBlocks
i have been trying to create a lisp program that will draw a slot but am having problems with it not sure where the problem is
it will not draw the slot to correct size
any help would be appricated
thanks
(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)
)
Slot
  1. Slot Generator (Tip #2101) from Steven Johnson accepts parameter input for drawing a slot at any angle. Load the LSP code and type SLOT at the Command line to activate. Two options are available. You can define a slot from end to end or from center to center. After making your choice, enter (or show) the slot angle, width and length.
  2. TCIRCLE Command in autocad enclose text with circle slots rectangles in autocad In this video, we will Learn about Tcircle command, tcircle command is an e.
Autocad

slot routine

slot routine

Autocad Slot Command Block

i have been trying to create a lisp program that will draw a slot but am having problems with it not sure where the problem is
it will not draw the slot to correct size
any help would be appricated
thanks
(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)
)

Autocad Slot Command

AutoCAD generates a preview of a dimensional constraint and prompts you for a location. Click to locate the dimension position. AutoCAD draws a dimensional constraint with a highlighted text field displaying the dimension name (d1, in this example) and the value returned by AutoCAD. Press Enter to confirm the value and the dimension location.