Wednesday, November 20, 2024

Solution to error: no function definition: ACET-LOAD-EXPRESSTOOLS

If you are using an AutoLISP function like (acet-tjust (ssget "_L") "TC") it needs Express Tools to be installed but in AutoCAD 2025 it still doesn't work.

Command: (acet-tjust (ssget "_L") "TC")
; error: no function definition: ACET-TJUST

The reason is that the Express Tools Utility functions are no initialized automatically.

For this reason you need to use the new function (acet-load-expresstools). If the Express Tools Utility functions are already loaded, acet-load-expresstools does nothing. Use it just like (vl-load-com).

But if you share code between AutoCAD 2025 and older versions the older versions can show errors like

; error: no function definition: ACET-LOAD-EXPRESSTOOLS

or in the case of BricsCAD

----- Error around expression -----
; (ACET-LOAD-EXPRESSTOOLS)
;
; error : no function definition <ACET-LOAD-EXPRESSTOOLS> ; expected FUNCTION at [eval]

What I use is this solution.

(if (findfile "acetutil.arx") (load "acetutil"))
(if (boundp 'acet-load-expresstools) (acet-load-expresstools))

If you try to find acet-tjust in AutoCAD's dev doc you will be out of luck as it is undocumented, but BricsCAD has you covered as seen here.

These "ExpressTools" API functions are currently provided by BricsCAD and are identical to AutoCAD's:

Blocks (acet-block-xxx)

Calculations (acet-calc)

Diskfile-Init functions

Dictionary (acet-dict-xxx)

Entity (acet-ent-xxx)

Entity-Groups (acet-group-xxx)

Error (acet-error-xxx)

Files (acet-file-xxx)

Filenames (acet-filename-xxx)

Geometry (acet-geom-xxx)

GeneralProperties (acet-general)

Layer (acet-layer-xxx)

Lists (acet-list-xxx)

Polyline (acet-pline-xxx)

Registry (acet-reg-xxx)

SelectionSets (acet-ss-xxx)

Strings (acet-str-xxx)

System (acet-sys-xxx)

SystemVariables (acet-sysvar-xxx)

Ucs (acet-ucs-xxx)

UserInterface (acet-ui-xxx)

Viewport (aced-viewport-xxx)

XData (aced-xdata-xxx)

Common Utilities (acet-xxx)

Insert+Atrributes Functions

SymbolTable Functions

Additionally, a number of general and special purpose (acet::xxx) utility functions are provided.

Some of the latest blog posts

Subscribe to RSS headline updates from:
Powered by FeedBurner

Contact Us | About JTB World | Website General Terms of Use | Privacy Policy
^ Top of page

© 2004- JTB World. All rights reserved.