SheetMetal LISP-API
Since V16.2, BricsCAD LISP
provides a dedicated interface for the SheetMetal & Mechanical
functionality (requires.Platinum/SheetMetal license).
The full documentation is
included with this LDSP package, as well as a sample Lisp
file, containing many useful utility
functions around SheetMetal LISP API.
The core of the API are three LISP functions:
BmLispGet, SmLispGet and SmLispSet.
The prefix distinguishes between assembly (Bm, Bricsys Mechanical) and Sheet Metal (Sm) applications. On the current level APIs mostly serve query operations: your script can ask for some properties and then modify the content in the desired way using Mechanical, Direct Modeling and Sheet Metal commands.
The combination of the given
LISP API, commands and LISP language allows to make powerful
scenarios which automatize working with assemblies (including
imported ones) and sheet metal parts.
As for any LISP application, the (command)
function can also be used to control the program flow and to use
native built-in functionality of BricsCAD SheetMetal and Mechanical
functionality.
The native, built-in SheetMetal and Mechanical
commands provide special support for LISP usage, by dedicated
support of "errno" system variable, because the standard (command) function
does not report the result status of the processed native, built-in
command.
Please see chapter Using SheetMetal Commands
for more details and samples.
A typical scenario : starting with a parametrized poor sheet metal part and
instantiate it with a set of parameters, then create bends and
junctions and finally generate the unfolding – all
automatically.
Another scenario : import an assembly, traverse to it, recognize sheet metal
parts and generate 2D unfolding drawings for each part.
Actually, the following SheetMetal /
Mechanical LISP functions are available :
© Bricsys NV. All rights reserved. |