Message 1 of 16
Change all hatches with an area bigger then x
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Goodmorning,
I currently have the following lisp that i use for changing certain hatches.
I tried to add a extra and function for the area of an hatch but i have no idea how.
Could someone help me?
(defun c:solid2dots ( / doc )
(vlax-for blk (vla-get-blocks (setq doc (vla-get-activedocument (vlax-get-acad-object))))
(if (= :vlax-false (vla-get-isxref blk))
(vlax-for obj blk
(if
(and
(= "AcDbHatch" (vla-get-objectname obj))
(= "SOLID" (strcase (vla-get-patternname obj)))
(= "N-CO-BC-BETONVORM-GN" (strcase (vla-get-layer obj)))
(> 200 (vla-get-area))
(vlax-write-enabled-p obj)
)
(progn
(vla-setpattern obj achatchpatterntypepredefined "DOTS")
(vla-put-patternscale obj 100.0)
)
)
(if
(and
(= "AcDbHatch" (vla-get-objectname obj))
(= "SOLID" (strcase (vla-get-patternname obj)))
(= "N-CO-BC-BETONVORM-G" (strcase (vla-get-layer obj)))
(> 200 (vla-get-area))
(vlax-write-enabled-p obj)
)
(progn
(vla-setpattern obj achatchpatterntypepredefined "DOTS")
(vla-put-patternscale obj 100.0)
)
)
)
)
)
(vla-regen doc acallviewports)
(princ)
)
(vl-load-com) (princ)