How to Needed: Add LISP to Tool Palette
Comments
-
Well, an answer (NOT SURE OF ITS ACCURACY) from good ol' artificial intelligence comes to the rescue via Google:
To add a LISP routine to a BricsCAD Tool Palette, open the Tool Palettes panel, right-click on the desired palette, select "Add Tool," then navigate to your LISP file and choose it; essentially, you're adding a command that executes the LISP code when clicked on the palette, allowing you to quickly access your custom functionality. Key steps:
- Access Tool Palettes: Open the Tool Palettes panel in BricsCAD.
- Select Palette: Right-click on the specific Tool Palette where you want to add the LISP command.
- Add Tool: Choose "Add Tool" from the context menu.
- Browse to LISP: Navigate to the location of your LISP file on your computer.
- Select LISP: Click on the LISP file to add it as a tool.
Important points to consider:
- Load Command:When adding the LISP tool, you will likely need to use the "(load "path/to/your/lisp.lsp")" command to specify the location of your LISP file.
- Customizing Tool Properties:You can right-click on the newly added LISP tool and select "Properties" to further customize its name, description, and other settings.
0 -
Whilst "(load "path/to/your/lisp.lsp") will do just that with some lisps nothing will happen after loading, you may need to call the lisp, "(load "path/to/your/lisp.lsp") (c:runlisp)
I often add as a last line (c:lispcommand) so when it loads it then runs the lisp.
0 -
Thanks for your suggestion! I have a penchant to make things harder than it is/overthink, I would like to say:
It appears that adding the actual LISP is as easy as described by the AI-generated reply.
An alternative to the load statement is a method I have used both in BricsCAD and "other"CAD that follows:
To make available LISPs in general, each lisp is included in an AUTOLOAD statement in a customized version of the on_start.lsp file.
Example: (autoload "AlignTextToCurveV1-2" ' ("ATCC")) ;Alignment - Align Text to Curve
To make available customizations a folder exists that is made available to our users that includes the above file and various LISP files listed in the AUTOLOAD statements.
0 -
Hello.
The first step should be to create a tool - use CUSTOMIZE and add a new tool in one of the available toolboxes.
Then, assuming the desired tool palette is active (current), right-click on the tool and choose Add to Current Toolpalette.
The expression in the command line of the tool should include a call of the desired function.
The expression should first load the lisp script, if it is not yet loaded using other means.Once the tool was added to the toolpalette, its command line can be edited from there - right-click on the tool in toolpalette and choose Properties.
0