Mechanical LISP-API


Since V23, BricsCAD LISP provides a dedicated interface for the Parametric + Mechanical functionality (requires "Professional" resp. "Mechanical" license).
This new API part is designed for simplicity, flexibility and following the usual AutoLISP logic in naming, arguments, behaviour and results.

As Parametric functionality requires the BricsCAD Professional ("PRO"), the Mechanical functionality requires the Mechanical license level, using a lower-level license (or when disabled i.e. by RunAsLevel=0), the API module is not active, and all Parametric + Mechanical LISP API functions will not be available.

As Parametric/Mechanical development constantly continues, the BRX and LISP APIs will also expand, providing more functionality and also incorporate the ideas and feedback from third party developers.

The Parametric/Mechanical LISP API has 2 parts :
a) the Rhino-Import/Export, Mechanical Components, MechanicalComponent Instance and MechanicalComponent Definition functionality : these require the "Mechanical" license level
b) the 3D Constraints Groups, 3D Constraints and 3D Constraints Parameters Functions functionality : these require the "Professional" license level

How to verify the License Level ?


There are 2 Lisp functions available : (bcad$LicenseLevels) and (vle-licenselevel), which both use identical implementation.
If Mechanical is available, the returned list will contain the string "Professional" resp. "Mechanical".
"RunAsLevel" setting is also respected in result list.

How to activate the Parametric+Mechanical LISP API ?


As the LISP function set for Parametric/Mechanical functionality is implemented using the BRX core system, it is required to explicitly load / activate the Parametric/Mechanical LISP interface functions (somewhat similar to required (vl-load-com) under AutoCAD AutoLISP) using :

(vl-load-mech)


If the context conditions (Professional resp. Mechanical licenses) are met, it will load the extension and return 1 (Pro functionality is available) or 2 (Mechanical functionality is available) or NIL if neither Pro nor Mechanical license is available; in latter case, the specific LISP functions are not available.

Some general hints & rules


"entity name" usage : in all cases, when a functions requires an "entity name", both "classic ename" and "vla object" are always valid and supported.


The Mechanical API covers the following functional areas :



Components Constants

3DConstraints Constants



Mechanical Components Functions

3D Constraints Group Functions

3D Constraint Functions


3D Constraints Parameters Functions








Rhino Import/Export Functions




New for V24 :


Since the Parametric functionality is no longer strictly bound to the Mechanical/Components interface, but rather a more generic 3DConstraints functionality, the former "mech::" related functions for Parametric have been renamed using the "param:" prefix !
To keep backward compatibility, all those former "mech:" functions are still present (and will remain present !) as a kind of alias, hence existing code will continue to work without any hassle.



©  Bricsys NV. All rights reserved.