How to Use ChatGPT to Write LISP Routines for BricsCAD

ChatGPT can help you draft small LISP routines for BricsCAD. Use it as a helper, not as the final judge. The best results come from one clear task, a precise BricsCAD setup, and a careful review. This guide also covers AI LISP coding, ChatGPT AutoLISP, BricsCAD LISP, and cad automation lisp in a simple way.

At NORI CAD, we see BricsCAD as a strong base for controlled, repeatable drafting. It supports LISP-based custom setup and can load and run LSP files. BricsCAD also supports AutoLISP, APPLOAD, and auto load through on_start.lsp and on_doc_load.lsp.

Can ChatGPT write useful LISP routines for BricsCAD?

Yes. ChatGPT can draft, explain, and revise LISP routines for BricsCAD. It is most useful for first drafts, command names, comments, and small fixes. It is not a replacement for technical review or testing.

That matters because AI LISP coding is only safe when the code is checked. A routine can select objects, change layers, delete data, save files, or write outside the drawing. Those parts need human review.

BricsCAD is a strong place for LISP work

BricsCAD is a good home for BricsCAD AutoLISP work because it runs where drafters already work. It can load LSP files and use vl, vlr, vla, and vlax functions. That makes it useful for small jobs like setting a layer, checking text height, or counting objects.

The value is not in big promises. It is in removing small, repeated drafting frictions and reducing variation. Do not expect every online example to behave the same in every setup. Version, operating system, support paths, loaded apps, drawing standards, object types, and user settings can all change the result.

Here at NORI CAD, we recommend treating BricsCAD as the stable CAD platform and ChatGPT as a code helper. That pairing works well when the process is disciplined.

Start with one narrow task

A good routine begins with one clear task. Do not ask one command to do five jobs. If the task has three parts, split it into three routines.

A simple workflow looks like this:

  1. Choose one repeated task.
  2. Write the task in plain English.
  3. State the BricsCAD version, OS, units, layers, and object types.
  4. Ask for a short LISP routine.
  5. Review the code before loading.
  6. Save it as an LSP file.
  7. Load it with APPLOAD.
  8. Test it on copy drawings only.
  9. Revise and test again.
  10. Record the command name, purpose, version, and test cases.

Good early tasks include counting selected objects, setting the current layer, drawing a simple marker, changing text height, or checking whether selected objects are on approved layers.

Higher-risk tasks should wait. These include deleting geometry, batch editing many drawings, renaming layers, overwriting data, saving files, exporting files, importing data, or changing final files. Those jobs can still be done with cad automation lisp, but they need more review.

The prompt must describe the BricsCAD context

The prompt acts as the specification for ChatGPT. If it is vague, ChatGPT may make assumptions, which can lead to unclear or unwanted behaviour.

Always include these details:

  • BricsCAD version
  • Operating system
  • Object types
  • Drawing units
  • Layer rules
  • Command name
  • Expected result
  • What should happen if nothing is selected
  • What should happen if wrong objects are selected
  • File change rules

Be clear about what the routine may change and what it may not change. If the routine saves, renames, deletes, overwrites, exports, or writes external files, say so. If it must not do those things, say that too.

A practical prompt template for BricsCAD LISP

Use a simple format when you ask ChatGPT to act as a LISP routine generator.

I am using BricsCAD [version] on [operating system]. Write a BricsCAD LISP routine saved as an LSP file. The command name must be [command name]. The routine must act on [object types]. The drawing units are [units]. The routine must use or check these layers: [layer details]. The expected result is [result]. If the user selects nothing, the routine must [behaviour]. If the selection contains unsupported objects, the routine must [behaviour]. The routine must not save, rename, delete, overwrite or write external files unless explicitly stated. Add comments explaining the main steps. Keep the routine short and easy to review. Include brief loading and testing instructions for BricsCAD.

A filled example:

I am using BricsCAD V26 on Windows. Write a BricsCAD LISP routine saved as an LSP file. The command name must be C:COUNTLINES. The routine must ask the user to select objects and report how many are lines. The drawing units are millimetres. It must not create geometry or change layers. If the user selects nothing, it must print a clear message and make no drawing changes. If the selection contains unsupported objects, it must ignore them. The routine must not save, rename, delete, overwrite or write external files. Add comments. Keep it short. Include brief loading and testing instructions for BricsCAD.

A starter routine for this prompt would simply count LINE objects and print the total. That is enough to check the workflow without adding risk.

The first routine should be small and testable

Small routines are easier to read and easier to fix. That is why the best first use of write lisp with chatgpt is a simple one-step command.

Good early BricsCAD LISP tasks:

  • Count selected lines
  • Set a current layer after checking that it exists
  • Place a standard note at a picked point
  • Change selected text height
  • List block names in a selection
  • Check that selected objects are on approved layers
  • Draw a simple reference mark with office-standard sizes

Wait on bigger jobs until the review method is ready. A routine that purges data, renames layers, overwrites attributes, saves drawings, exports files, imports data, or deletes objects needs more care.

Loading and running LSP files in BricsCAD

BricsCAD can load and run LSP files. APPLOAD provides a straightforward manual way to load an LSP file into BricsCAD.

A simple loading process is:

  1. Copy the reviewed code into a plain text editor.
  2. Save it with a clear .lsp name.
  3. Open a copy drawing in BricsCAD.
  4. Run APPLOAD.
  5. Load the LSP file.
  6. Type the command name in the routine.
  7. Watch the command line messages.
  8. Note any errors or odd results.

After a routine has passed review, BricsCAD can also use on_start.lsp and on_doc_load.lsp for auto load. Use that only for accepted routines. Do not use auto load for a fresh prototype.

Testing must be deliberate, not casual

A routine should be tested on copies before it is used in real work. One good test is not enough.

Use a staged test set:

  • Empty drawing
  • Simple test drawing
  • Wrong-selection drawing
  • No-selection test
  • Layer-state test
  • Copy of a real project drawing
  • Retest after any change

Also test user behavior. Press Escape. Select too many objects. Select the wrong objects. Run the command twice. Undo the command if it changes the drawing. Close and reopen the copy. These checks often show problems that a clean demo will hide.

If the routine saves a file, writes data, or edits many drawings, add a higher level of review. Check paths, names, access rights, and backups first.

A sensible review process before wider use

A routine that works once may still be wrong for a team. That is true when many drafters use it, or when it affects final files.

Before wider use, check these points:

  • The purpose is clear
  • The scope is narrow
  • Error handling exists
  • Any drawing change is on purpose
  • File actions are controlled
  • Prompts are easy to read
  • Required layers and files are documented
  • Test results are recorded
  • The loading method fits the risk

Keep a dated folder for accepted routines. Save the prompt, the output, manual edits, and test notes there. If the routine changes later, keep the older copy until the new one is proven.

BricsCAD LISP works best as a habit

The best case for BricsCAD LISP is steady use. One small routine saves a little time. Ten good routines can cut repeat work and reduce variation across drawings.

ChatGPT can help with syntax, command structure, comments, and simple logic. It can speed up AI LISP coding. But the user still has to give the spec and the judgment.

A good team rule set is simple:

  1. Start with non-destructive routines.
  2. Keep each command narrow.
  3. Test on copy drawings.
  4. Review code before loading.
  5. Avoid auto load during prototyping.
  6. Document accepted routines.
  7. Retest after each change.
  8. Escalate file-writing or batch-edit routines for formal review.

This keeps ChatGPT lisp output useful without treating it as safe by default.

Where NORI CAD can help

At NORI CAD, we provide BricsCAD software, training, and support for teams that want practical custom setup. If you want to use ChatGPT output inside BricsCAD, start with a small routine and build a review process around it.

BricsCAD is a strong platform for controlled drafting automation. It works best when the script is reviewed, tested, and deployed with care.

Q&A

Question: Should I run a ChatGPT-generated LISP routine in a live BricsCAD drawing?

Short answer: No. Treat the output as a prototype. Load and test it in copy drawings first. Then test it in representative project copies. Use it in live work only after review and testing.

Question: What should I include in the prompt?

Short answer: Include the BricsCAD version, OS, object types, units, layers, command name, expected result, empty selection behavior, wrong-object behavior, and file change rules. The more exact the prompt, the easier the review.

Question: Why start with small, non-destructive routines?

Short answer: They are easier to check, easier to fix, and less risky. Tasks like counting selected lines or listing block names help you learn the process without harming project data.

Question: What is a straightforward way to manually load a prototype LSP file in BricsCAD?

Short answer: Use APPLOAD. Save the reviewed code as a .lsp file, open a copy drawing, load the file, and run the command. Use on_start.lsp or on_doc_load.lsp for automatic loading only after the routine has passed review and testing.

Powered by Full Pelt Ltd