AutoCAD LT 2024 – Use LISP to create bespoke Hatching

Marketing
Marketing
  • Updated

By Dennis Collin

AutoCAD_LT_2024___Use_LISP_to_create_bespoke_Hatching_-_1.png

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!

AutoCAD_LT_2024___Use_LISP_to_create_bespoke_Hatching_-_2.png

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!

AutoCAD_LT_2024___Use_LISP_to_create_bespoke_Hatching_-_3.png

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.

AutoCAD_LT_2024___Use_LISP_to_create_bespoke_Hatching_-_4.png

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.

AutoCAD_LT_2024___Use_LISP_to_create_bespoke_Hatching_-_5.png

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:

https://www.cadlinecommunity.co.uk/hc/en-us/articles/10213933856413-AutoCAD-LT-2024-Improving-Productivity-using-Appload-and-AutoLISP-

To see a selection of popular online Lisp resources, go here:

https://www.cadlinecommunity.co.uk/hc/en-us/articles/10366000579485-AutoCAD-LT-2024-Automating-tasks-in-AutoCAD-and-LT-2024-with-AutoLISP

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

https://www.cadlinecommunity.co.uk/hc/en-us/articles/10368397808285-AutoCAD-LT-2024-Having-Hatch-problems-Try-using-a-Flatten-Lisp-routine-for-LT-

Placing Slope Symbols on site plans

https://www.cadlinecommunity.co.uk/hc/en-us/articles/10213933856413-AutoCAD-LT-2024-Improving-Productivity-using-Appload-and-AutoLISP-

Batting insulation lines on building plans and sections

https://www.cadlinecommunity.co.uk/hc/en-us/articles/10368187288093-AutoCAD-LT-2024-Batting-Line-Routine-for-LT-

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!

Was this article helpful?

0 out of 0 found this helpful

Have more questions? Submit a request

Comments

0 comments

Please sign in to leave a comment.