F/X CAD Support for Basic AutoLISP
Quick video
- Step 1: Load the LISP Script
- Step 2: Add the LISP as a Custom Tool in a Custom Toolbar
- Related Webinars
F/X CAD 2024 is the first F/X CAD version to offer basic and limited AutoLISP support.
What do "basic" and "limited" mean in this context?
- You cannot use the APPLOAD command, and you cannot run AutoLISPs that use Dialog Boxes (DCL), ActiveX (vlax), ARX, or other extensions.
- You're limited to Command line–only scripts.
- If you're using a LISP from the Internet, check the support section for that script. If there's a dialog box shown, you cannot load that LISP script.
Here's how to load an AutoLISP Script in F/X CAD 2024 and newer.
Step 1: Load the LISP Script
1A. Make sure the LSP (.lsp) file is saved in a specific folder for LISPs – either on your computer if you're a sole practitioner, or in a shared folder on a network if you're in a larger office group.
1B. Edit the LSP file in a text editor, and add a comment at the top that includes the following information:
- The name of the person who downloaded the file
- When the file was downloaded
- What the file is supposed to do
- At which URL the file was found
This information can help you maintain your library in the future.
1C. Add the folder containing your LISP files to your Support File Search Paths for each user you'd like to be able to access it.
1D. Restart F/X CAD.
1E. In the Command line, type (LOAD "filename.lsp") (where filename.lsp is the filename of the LISP you'd like to load, and is surrounded by non-smart quotes.
Be careful copying and pasting this entry from a word-processing document that originated in a program such as MS Word. Most word-processing software will replace any quotation marks you type with smart quotes. Instead, it's best to type this command with your keyboard in the Command line first and then copy it into a word-processing file for re-copying if you want to use this method. Note that if you do so, you will see a Command line error such as Error: bad argument type: (or stringp symbolp): nil if you forget the quotes or accidentally use smart quotes.
Step 2: Add the LISP as a Custom Tool in a Custom Toolbar
After completing Step 1 above, add the LISP as a custom tool in a custom toolbar for quick retrieval. Follow the steps in our AutoLISP webinar series, linked below – specifically our Intermediate AutoLISP webinar, which goes over ribbon integration.
Related Webinars
- AutoLISP Basics: AutoLISP is a hidden gem within AutoCAD – a robust and capable programming language that’s easy to test and develop right from the CAD Command line. Get the full scoop from Land F/X CEO and head developer Jeremiah Farmer. (1 hr 2 min)
- Intermediate AutoLISP: In this follow-up presentation, we create a basic loop that processes all entities in the drawing, while discussing best practices in doing so. We also show how to integrate your custom AutoLISP tools into the ribbon, and how best to organize your source files. (1 hr 7 min)
- AutoLISP Advanced: We work on a new prototype Land F/X tool, code named P-Hatch. The tool involves intercepting mouse movements to modify a hatch entity in real time. We use the full breadth of Land F/X helper functions to speed up the development and match the full extent of programming best practices, (1 hr 2 min)