mrbradley1 Posted March 30, 2011 Author Posted March 30, 2011 (edited) I've changed the "Displacement" to "" (defun C: DrawWeld () (setq len (getdist "\nSpecify length: ")) (setq ang 45.0) (setq obj-pt (entsel "\nSelect object: ")) (setq obj (car obj-pt)) (setq dist (getdist "\nSpecify distance between lines: ")) (command "_.COPY" obj "" "" "_NONe" (strcat (rtos len) "<" (rtos ang)) ) (setq tempobj (entlast)) (command "_.HATCH" "_User" ang dist "_No" obj tempobj "") (entdel tempobj) ) (C: DrawWeld) but it errors out after 'distance between lines' with the following:- Select objects: Specify base point or displacement, or [Multiple]: Point or option keyword required. ; error: Function cancelled Specify base point or displacement, or [Multiple]: any ideas? Edited December 3, 2013 by SLW210 Quote
Ahankhah Posted March 30, 2011 Posted March 30, 2011 mrbradley1, this code works in all versions of AutoCAD after Release 12: (defun C:DrawWeld () (setq len (getdist "\nSpecify length: ")) (setq ang 45.0) (setq obj-pt (entsel "\nSelect object: ")) (setq obj (car obj-pt)) (setq dist (getdist "\nSpecify distance between lines: ")) (command "_.COPY" obj "" "_NONe" (strcat (rtos len) "<" (rtos ang)) "" ) (setq tempobj (entlast)) (command "_.HATCH" "_User" ang dist "_No" obj tempobj "") (entdel tempobj) (princ) ) (C:DrawWeld) Please let me know you get the goal. Quote
Ahankhah Posted March 31, 2011 Posted March 31, 2011 That's it thanks., everyone You are welcome mrbradley1. Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.