By Dennis Collin
When training AutoCAD LT I often get asked is there an easy way to create hatch patterns especially for landscaping and site plans. Can I not draw some kind of symbol, make it a block and incorporate it as a custom hatch pattern?
The short answer is no! At least not out of the box. However with AutoCAD LT 2024 and the recent inclusion of AutoLISP support the answer is yes!
Locate a Lisp routine on a resource such as www.cadalyst.com. Or specifically the Lisp routine can be accessed here: https://cadtips.cadalyst.com/patterns/hatch-maker
Save Hatchmaker.lsp to a suitable support folder and keep it there alongside any other useful routines!
A Lisp file is just a text file of a few kilobytes and once loaded via the Appload function, can be added to the startup suite. Once hatchmaker is loaded the routine provides two new commands DRAWHATCH and SAVEHATCH. With these commands users can draw a bespoke hatch arrangement using simple entities.
The Drawhatch command defines a boundary area, measuring 1 unit by 1 unit to provide the user a framework to define a custom hatch pattern with line and point entities. The constraints mean elements must be drawn within a 0,0 to 1,1 limit and lie on a 0.01-unit grid. If not, the elements will either be ignored or result in a hatch error creation message.
Once complete, the Savehatch command will ask the user to select the entities for the hatch, ask for a brief description and then ask for the name and location of the hatch pattern file to save to.
The routine also loads the new custom hatch pattern into the current AutoCAD LT drawing for testing. This bespoke hatch pattern is a genuine hatch entity that can be trimmed, edited and queried for areas etc.
To see how custom Lisp routines can be loaded in AutoCAD LT and add them to a start-up suite go here:
To see a selection of popular online Lisp resources, go here:
Over the next few months I will take a look at other useful Lisp routines that will be of interest to LT Users, here are a few that may be worth investigating!
Flatten drawings to resolve hatching issues
Placing Slope Symbols on site plans
Batting insulation lines on building plans and sections
I will say now whilst most routines are great, there are a few ‘buggy’ examples which may not perform as expected. Therefore, the use of external routines is ‘at your own risk’. As a precaution I will always backup files prior to running a routine. Also run the routine on a testbed setup just in case problems result. Better to be safe than sorry!
Komentarze (Komentarze: 0)