Author Topic: Hatch by polyline Question  (Read 16082 times)

0 Members and 1 Guest are viewing this topic.

dubb

  • Swamp Rat
  • Posts: 1105
Hatch by polyline Question
« Reply #30 on: August 24, 2005, 11:27:56 AM »
Quote from: CAB
Well I tried to use MP's subroutine to draw the pline first but got an error
using 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 parameters

Anyway here is my febal attempt

;;  Draw a polyline then it auto hatches it
;;  No error checking on my code
Code: [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)  ..................


that was perfect! thanks cab you are the man!