0 Members and 1 Guest are viewing this topic.
Well I tried to use MP's subroutine to draw the pline first but got an errorusing ACAD2000. Must be the version of ACAD?Entity handle:162A9 caused this error: Invalid number of parametersEntity handle:16A33 caused this error: Invalid number of parametersAnyway here is my febal attempt ;; Draw a polyline then it auto hatches it;; No error checking on my codeCode: [Select](defun c:phatch (/ elast space) ;; sub by MP (defun _HatchIt (space object / hatch err) (setq err (vl-catch-all-apply '(lambda () (setq hatch (vlax-invoke space 'AddHatch achatchstylenormal ;; pattern type "ANSI31" ;; pattern name :vlax-false ;; associativity AcHatchObject ;; hatch object type ) ) (vlax-invoke hatch 'AppendOuterLoop (list object) ) (vlax-invoke hatch 'Evaluate) ..................
(defun c:phatch (/ elast space) ;; sub by MP (defun _HatchIt (space object / hatch err) (setq err (vl-catch-all-apply '(lambda () (setq hatch (vlax-invoke space 'AddHatch achatchstylenormal ;; pattern type "ANSI31" ;; pattern name :vlax-false ;; associativity AcHatchObject ;; hatch object type ) ) (vlax-invoke hatch 'AppendOuterLoop (list object) ) (vlax-invoke hatch 'Evaluate) ..................