Lisp
How to create LISP routines for drawing setup.
BricsCAD Lisp
- Migrating from AutoCAD
-
When you start migrating to BricsCAD, you’ll find that there are virtually no differences in BricsCAD LISP versus OtherLISP. Your code loads and runs, and the functionality is identical. The primary differences when “porting” your apps will be a few minor setup steps, Command line structure, and possibly file locations. To start, let's review the setup and launch of your existing programs in BricsCAD.
If you are auto-launching your programs using Acad.lsp or Acaddoc.lsp, you will simply need to rename them as on_start.lsp or on_doc_load.lsp respectively.
- BricsCAD Settings Panel
- To enable auto-launching your program set the ACADLSPASDOC system variable to 1 or simply toggle the option in Settings / Program options / System:
Drawing Setup Lisp Routines for BricsCAD
- Code sample
- The below simple drawing setup routine could be adapted to your needs with minimal changes.
- A more versatile Layer Maker for your drawing setup routine
- The following example could be added to your version of mysetup.lsp. By creating a simple text file “Layers.txt” with an editor like Notepad, you can add a list of layer names to be created when the routine is run. This is an alternative to the hard-coded process shown above. By using the findfile function, BricsCAD will first search the current directory, then sequentially through your defined support folders to find the Layers.txt file. You can place your default layer setup text file in the support path and place alternative versions of it in individual project folders.