Land F/X
  • Portal
  • Products
  • Support
  • Videos
  • Who We Are
  • Trial
  • Purchase
Land F/X
  • Portal
    • Dashboard
    • Account
    • Licenses
    • Data
    • Support
  • Products
    • Detail F/X
      • Product
      • Features
      • Trial
      • Purchase
    • Planting F/X
      • Product
      • Features
      • Trial
      • Purchase
    • Irrigation F/X
      • Product
      • Features
      • Trial
      • Purchase
    • F/X CAD
    • Plugin for Revit®
    • Plugin for SketchUp®
    • Plugin for Rhino®
    • Site & Hardscape
    • Lighting
    • Manufacturer Connection
    • Academic
    • Purchase
  • Support
    • Knowledge Base
    • Documentation
    • Submit Ticket
    • Updates
    • Forum
    • Install
  • Videos
    • Power Tips
    • Webinars
    • Podcasts
  • Who We Are
    • Contact Us
    • Careers
    • Gallery
    • News
  1. Videos

AutoLISP: Wrapping AutoCAD Commands

{"3":{"id":3,"title":"Video Length","name":"video-length","checked_out":null,"checked_out_time":null,"note":"","state":1,"access":1,"created_time":"2023-12-15 00:00:00","created_user_id":48,"ordering":0,"language":"*","fieldparams":{"filter":"","maxlength":""},"params":{"hint":"","class":"","label_class":"","show_on":"","showon":"","render_class":"","value_render_class":"","showlabel":"1","label_render_class":"","display":"2","prefix":"","suffix":"","layout":"","display_readonly":"2"},"type":"text","default_value":"","context":"com_content.article","group_id":2,"label":"Video Length","description":"","required":0,"only_use_in_subform":0,"language_title":null,"language_image":null,"editor":null,"access_level":"Public","author_name":"Forrestt Williams","group_title":"videos","group_access":1,"group_state":1,"group_note":"","value":"1:00:24","rawvalue":"1:00:24"},"7":{"id":7,"title":"Presented By","name":"presented-by","checked_out":null,"checked_out_time":null,"note":"","state":1,"access":1,"created_time":"2023-12-15 00:00:00","created_user_id":48,"ordering":0,"language":"*","fieldparams":{"filter":"","maxlength":""},"params":{"hint":"","class":"","label_class":"","show_on":"","showon":"","render_class":"","value_render_class":"","showlabel":"1","label_render_class":"","display":"2","prefix":"","suffix":"","layout":"","display_readonly":"2"},"type":"text","default_value":"","context":"com_content.article","group_id":2,"label":"Presented By","description":"","required":0,"only_use_in_subform":0,"language_title":null,"language_image":null,"editor":null,"access_level":"Public","author_name":"Forrestt Williams","group_title":"videos","group_access":1,"group_state":1,"group_note":"","value":"Jeremiah Farmer","rawvalue":"Jeremiah Farmer"},"11":{"id":11,"title":"vimeo-id","name":"vimeo-id","checked_out":null,"checked_out_time":null,"note":"","state":1,"access":1,"created_time":"2023-12-15 00:00:00","created_user_id":48,"ordering":0,"language":"*","fieldparams":{"filter":"","maxlength":""},"params":{"hint":"","class":"","label_class":"","show_on":"","showon":"","render_class":"","value_render_class":"","showlabel":"1","label_render_class":"","display":"2","prefix":"","suffix":"","layout":"","display_readonly":"2"},"type":"text","default_value":"","context":"com_content.article","group_id":2,"label":"vimeo-id","description":"","required":0,"only_use_in_subform":0,"language_title":null,"language_image":null,"editor":null,"access_level":"Public","author_name":"Forrestt Williams","group_title":"videos","group_access":1,"group_state":1,"group_note":"","value":"1059128903","rawvalue":"1059128903"},"23":{"id":23,"title":"registration-link","name":"registration-link","checked_out":null,"checked_out_time":null,"note":"","state":1,"access":1,"created_time":"2023-12-15 00:00:00","created_user_id":48,"ordering":0,"language":"*","fieldparams":{"filter":"","maxlength":""},"params":{"hint":"","class":"","label_class":"","show_on":"","showon":"","render_class":"","value_render_class":"","showlabel":"1","label_render_class":"","display":"2","prefix":"","suffix":"","layout":"","display_readonly":"2"},"type":"text","default_value":"","context":"com_content.article","group_id":2,"label":"registration-link","description":"","required":0,"only_use_in_subform":0,"language_title":null,"language_image":null,"editor":null,"access_level":"Public","author_name":"Forrestt Williams","group_title":"videos","group_access":1,"group_state":1,"group_note":"","value":"","rawvalue":""},"24":{"id":24,"title":"webinar-date","name":"webinar-date","checked_out":null,"checked_out_time":null,"note":"","state":1,"access":1,"created_time":"2023-12-15 00:00:00","created_user_id":48,"ordering":0,"language":"*","fieldparams":{"filter":"","maxlength":""},"params":{"hint":"","class":"","label_class":"","show_on":"","showon":"","render_class":"","value_render_class":"","showlabel":"1","label_render_class":"","display":"2","prefix":"","suffix":"","layout":"","display_readonly":"2"},"type":"text","default_value":"","context":"com_content.article","group_id":2,"label":"webinar-date","description":"","required":0,"only_use_in_subform":0,"language_title":null,"language_image":null,"editor":null,"access_level":"Public","author_name":"Forrestt Williams","group_title":"videos","group_access":1,"group_state":1,"group_note":"","value":"","rawvalue":""},"37":{"id":37,"title":"Registration","name":"registration","checked_out":null,"checked_out_time":null,"note":"","state":1,"access":1,"created_time":"2023-12-15 00:00:00","created_user_id":48,"ordering":0,"language":"*","fieldparams":{"filter":"","maxlength":""},"params":{"hint":"","class":"","label_class":"","show_on":"","showon":"","render_class":"","value_render_class":"","showlabel":"1","label_render_class":"","display":"2","prefix":"","suffix":"","layout":"","display_readonly":"2"},"type":"text","default_value":"","context":"com_content.article","group_id":2,"label":"Registration","description":"","required":0,"only_use_in_subform":0,"language_title":null,"language_image":null,"editor":null,"access_level":"Public","author_name":"Forrestt Williams","group_title":"videos","group_access":1,"group_state":1,"group_note":"","value":"","rawvalue":""},"43":{"id":43,"title":"App Video Link","name":"app-video-link","checked_out":null,"checked_out_time":null,"note":"","state":1,"access":1,"created_time":"2023-12-15 00:00:00","created_user_id":48,"ordering":0,"language":"*","fieldparams":{"filter":"","maxlength":""},"params":{"hint":"","class":"","label_class":"","show_on":"","showon":"","render_class":"","value_render_class":"","showlabel":"1","label_render_class":"","display":"2","prefix":"","suffix":"","layout":"","display_readonly":"2"},"type":"text","default_value":"","context":"com_content.article","group_id":2,"label":"App Video Link","description":"","required":0,"only_use_in_subform":0,"language_title":null,"language_image":null,"editor":null,"access_level":"Public","author_name":"Forrestt Williams","group_title":"videos","group_access":1,"group_state":1,"group_note":"","value":"https:\/\/player.vimeo.com\/progressive_redirect\/playback\/1059128903\/rendition\/720p\/file.mp4?loc=external&log_user=0&signature=cf4f78aa6ef32d39059c2595810383aaa612ca704e8edcdfba2504223526f2b4&user_id=23159512","rawvalue":"https:\/\/player.vimeo.com\/progressive_redirect\/playback\/1059128903\/rendition\/720p\/file.mp4?loc=external&log_user=0&signature=cf4f78aa6ef32d39059c2595810383aaa612ca704e8edcdfba2504223526f2b4&user_id=23159512"},"44":{"id":44,"title":"Webinar Vimeo ID","name":"webinar-vimeo-id","checked_out":null,"checked_out_time":null,"note":"","state":1,"access":1,"created_time":"2023-12-15 00:00:00","created_user_id":48,"ordering":0,"language":"*","fieldparams":{"filter":"","maxlength":""},"params":{"hint":"","class":"","label_class":"","show_on":"","showon":"","render_class":"","value_render_class":"","showlabel":"1","label_render_class":"","display":"2","prefix":"","suffix":"","layout":"","display_readonly":"2"},"type":"text","default_value":"","context":"com_content.article","group_id":2,"label":"Webinar Vimeo ID","description":"","required":0,"only_use_in_subform":0,"language_title":null,"language_image":null,"editor":null,"access_level":"Public","author_name":"Forrestt Williams","group_title":"videos","group_access":1,"group_state":1,"group_note":"","value":"1059128903","rawvalue":"1059128903"},"46":{"id":46,"title":"ManualDate","name":"manualdate","checked_out":null,"checked_out_time":null,"note":"","state":1,"access":1,"created_time":"2023-12-15 00:00:00","created_user_id":48,"ordering":0,"language":"*","fieldparams":{"filter":"","maxlength":""},"params":{"hint":"","class":"","label_class":"","show_on":"","showon":"","render_class":"","value_render_class":"","showlabel":"1","label_render_class":"","display":"2","prefix":"","suffix":"","layout":"","display_readonly":"2"},"type":"text","default_value":"","context":"com_content.article","group_id":2,"label":"ManualDate","description":"","required":0,"only_use_in_subform":0,"language_title":null,"language_image":null,"editor":null,"access_level":"Public","author_name":"Forrestt Williams","group_title":"videos","group_access":1,"group_state":1,"group_note":"","value":"","rawvalue":""},"49":{"id":49,"title":"Manufacturer Video Type","name":"manufacturer-video-type","checked_out":null,"checked_out_time":null,"note":"","state":1,"access":1,"created_time":"2023-12-15 00:00:00","created_user_id":48,"ordering":0,"language":"*","fieldparams":{"filter":"","maxlength":""},"params":{"hint":"","class":"","label_class":"","show_on":"","showon":"","render_class":"","value_render_class":"","showlabel":"1","label_render_class":"","display":"2","prefix":"","suffix":"","layout":"","display_readonly":"2"},"type":"text","default_value":"","context":"com_content.article","group_id":2,"label":"Manufacturer Video Type","description":"","required":0,"only_use_in_subform":0,"language_title":null,"language_image":null,"editor":null,"access_level":"Public","author_name":"Forrestt Williams","group_title":"videos","group_access":1,"group_state":1,"group_note":"","value":"","rawvalue":""},"50":{"id":50,"title":"Manufacturer Video Company","name":"manufacturer-video-company","checked_out":null,"checked_out_time":null,"note":"","state":1,"access":1,"created_time":"2023-12-15 00:00:00","created_user_id":48,"ordering":0,"language":"*","fieldparams":{"filter":"","maxlength":""},"params":{"hint":"","class":"","label_class":"","show_on":"","showon":"","render_class":"","value_render_class":"","showlabel":"1","label_render_class":"","display":"2","prefix":"","suffix":"","layout":"","display_readonly":"2"},"type":"text","default_value":"","context":"com_content.article","group_id":2,"label":"Manufacturer Video Company","description":"","required":0,"only_use_in_subform":0,"language_title":null,"language_image":null,"editor":null,"access_level":"Public","author_name":"Forrestt Williams","group_title":"videos","group_access":1,"group_state":1,"group_note":"","value":"","rawvalue":""}}

February 21, 2025

Presented by: Jeremiah Farmer

Length: 1:00:24

Among the most powerful aspects of AutoLISP is its ability to call AutoCAD commands and even to process code while a command is active. This feature allows a developer to make custom wrappers for CAD commands that include abbreviated options, automated calculations, toggling of system variables, and more. Join Land F/X CEO Jeremiah Farmer as he shares his 30 years of experience in our fourth installment of exploring the hidden power of the programming language AutoLISP.

Attachment: LISP Files

 

Webinar Contents:

Note: The following catalog of content covered in this webinar is time stamped to allow you to follow along or skip to sections of the video that are relevant to your questions. You can also search for content on this page using the FIND command in your browser (CTRL + F in Windows, Command + F in Mac OS.)

 

  • Intro/TOC
  • What Is "Wrapping AutoCAD Commands"?
  • Basic Wrapping
  • Toggle Settings
  • Tips

0:00 – 3:53: Intro/TOC

3:54 – 7:09: What Is "Wrapping AutoCAD Commands"?

  • Many AutoCAD commands can have multiple/difficult command options.
    • Recall that AutoCAD used to not require a mouse.
  • AutoLISP can not only fire commands but can run code while a command is active.
  • Allowing us to make custom commands that are easier to remember and use, process input before sending to the command, toggle system variables mid-command, etc.
  • Make CAD yours!

7:10 – 15:42: Basic Wrapping

  • Simply making a keyboard shortcut to a complex command.
  • Using AUTOLISP to set variables and filenaming automatically.
  • Always prefix commands and options with underscore (_) and period (.) to force English language support and default command.

15:43 – 37:56: Toggle Settings

  • Use (Getpoint) and pre-process points.
  • Toggle system variables while command is active.

 

Example: GETPLIST (23:14)

 

Example: XCOPY (29:39)

37:57 – end: Tips

  • Account for command failing
    • (getvar "CMDACTIVE")
    • Compare (entlast) to previous
  • Command line prompts can vary
    • System variables EXPERT and DELOBJ
    • Confirmations if block/file exists
  • Points must be translated to UCS
  • Be wary of OSNAPs, ORTHO, etc.
  • Be mindful of pressing ESC
    • Resetting variables, deleting objects

 

Command vs. Command-S vs. VLCMDF (46:33)

(command):

  • Most flexible.
  • Requires attention to validating parameters and checking if command failed.
  • Not compatible with Zoom.

 

(command-s):

  • Requires AutoCAD 2015+.
  • Each call is its own subroutine.
  • Can be called from error handler.
  • Best when requiring a Zoom.

 

(vl-cmdf)

  • Evaluates all arguments first.
  • Nicely quiet. Jeremiah likes it for operations like SAVEAS and XREF.

 

Confirmation Box (52:36)

  • Just a simple Yes/No confirmation box makes your command wrappers pop.
  • All that is necessary is the OpenDCL Runtime: opendcl.com/download

 

Other dialog boxes (example: Scale by Reference) (55:43)

 

Contact

  • Land F/X
  • PMB 351 3940 Broad St. STE 7
    San Luis Obispo, CA 93401
  • +1 805-541-1003
Email Logo Facebook Logo Instagram Logo LinkedIn Logo
Land F/X Logo

Our software tailors AutoCAD®, Revit®, SketchUp®, and Rhino® to the needs of landscape architects, irrigation designers, and other professionals. We automate your most tedious tasks and ensure accuracy, giving you more time to design.

  • Portal
  • Products
  • Support
  • Videos
  • Who We Are