Create a fairly simple Lisp for me please.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
I am looking to have someone create a fairly simple lisp for me.
I am wanting the lisp to allow me to select 2 points, draw a line between those 2 points and I want the line to offset 3" for a 1/4" scale drawing and 6" for an 8th scale drawing. Basically I want the offset to be based upon the dimscale.
I will want the line to be put on a specific layer "MP-NOTE".
I will also want a "DOT" placed at each end of the line. My office already have a lisp for creating this "DOT" and it is called "SPOT"
Please and thank you. I know this is simple but I am not educated enough in lisp to build this myself.
below is the lisp for "SPOT"
;program to build closed donuts in AutoCAD with reference to Dimscale
(defun c:spot (/ dscale spot_od spot_loc) ;start defun, define local variables
(setq dscale (getvar "dimscale")) ;set dscale to current dimscale
(setq spot_od 0.05) ;set dot diameter to .05
(setq spot_od (* dscale spot_od)) ;adjust dot diameter for drawings scale
(repeat 20 ;start repeat
(setq spot_loc (getpoint "\nCenter of doughnut: ")) ;get center of dot
(command ;start command
"laymcur" spot_loc ;change layer to object found at dot center point
"donut" "0" spot_od spot_loc "" ;draw spot
) ;end command
) ;end repeat
(princ) ;quiet exit
) ;end defun