AutoLISP Advanced
+1 805-541-1003


100% - 0 votes

AutoLISP Advanced

Aug 17, 2018
Video Length:  1:02:24
Presented By:  Jeremiah Farmer
In this installment, we’ll work on a new prototype Land F/X tool, code named P-Hatch. The tool will involve intercepting mouse movements to modify a hatch entity in real time. We’ll use the full breadth of Land F/X helper functions to speed up the development. In addition, we’ll match the full extent of programming best practices, including internationalization support, system variable toggling, UCS and OSNAP modes, and more.



Webinar attachments:


Webinar Contents:

  • Intro/TOC
  • Developing a Prototype Tool in Real Time

0:00 – 5:57: Intro/TOC

3:20 Project P-HATCH


  • “Paint” a hatch
    • Add to a hatch boundary with a paintbrush technique
    • Keyboard commands to change brush shape and size


P-HATCH Project Phases (4:05)

  • Engineering study/feasibility
    • Develop basic mouse input loop
  • Keyboard commands to alter brush
  • Integrate with Place Hatch, P option to paint
  • How are brush shapes maintained, added to?
  • Documentation, Power Tip

5:58 – end: Developing a Prototype Tool in Real Time

Looking for tips on how to configure the development environment? See our AutoLISP Basics webinar.


Basic feasibility test of the feature we plan to develop (notional brush shapes) (6:35)


Developing an outline of the coding of the feature (17:20)


Adding a language prompt (19:00)


Adding comments (20:00)

“Code that is not commented is not code.”


The Land F/X Alert function (21:00)


Using additional Land F/X helper functions (21:53)


Testing the feature so far (23:55)


Using the GOLAYER helper function to vet the status of layers in the drawing (24:25)


Renaming variables (27:45)


Coding the brush (30:20)


Testing the feature again and troubleshooting (31:00)


Using the GRREAD function (33:40)


Setting a variable to nil when it is already nil is a good practice because it makes the code portable (35:15)


Adding keyboard commands (38:00)


Adding user customization capability for keyboard commands (39:30)


Adding the capability to make the brush circle bigger or smaller (40:40)


Updating the brush position (43:00)


Turning the brush into a region (45:44)


Error checking the feature (54:00)


Creating the capability to regenerate a hatch boundary (56:00)


Using the Sketch command to mimic a click-and-drag function (58:40)


Question:Is it possible to use a polyline instead of a brush for this tool? (1:01:25)

Answer: Yes. In fact, the long-term plan is to add a polyline option.


Log in to