Nikon Posted 14 hours ago Posted 14 hours ago (edited) Hi, everybody. It is necessary to perform hatch, regardless of the previous type of hatching. The code performs the hatch using the previous type, not the one specified in the code. ; *********** (defun c:HatchUser ( / ss) (setq ss (ssget)) (if ss (progn (command "_.-BHATCH" "_User" "_Double" "_Yes" "0" "200" "_S" ss "" "") ) ) (princ) ) HatchUserdwg.dwg Edited 1 hour ago by Nikon Quote
BIGAL Posted 10 hours ago Posted 10 hours ago Maybe use (setvar 'hpname "User") in code, sets the pattern name. 1 Quote
Nikon Posted 1 hour ago Author Posted 1 hour ago 9 hours ago, BIGAL said: Maybe use (setvar 'hpname "User") in code, sets the pattern name. Spacing=200, double=yes and (setvar 'hpname old_hpname) do not work in this code Is there a solution? (defun c:HatchUserHpn ( / ss old_hpname ) (setq old_hpname (getvar 'hpname)) (setvar 'hpname "_User") (setq ss (ssget)) (if ss (progn ;; User-defined, angle=0, spacing=200, double=yes, select objects (command "BHATCH" "U" "0" "200" "D" "Y" "S" ss "" "") ;(command "_.-BHATCH" "_U" "0" "200" "_D" "_Y" "_S" ss "" "") ) ) (setvar 'hpname old_hpname) (princ) ) 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.