No Function Definition ACET-LAYTRANS

No Function Definition ACET-LAYTRANS

Anonymous
Not applicable
882 Views
3 Replies
Message 1 of 4

No Function Definition ACET-LAYTRANS

Anonymous
Not applicable
I have a button which automatically runs LAYTRANS with a specific standards file. Express Tools is loaded correctly.

If I open a drawing, load the lisp containing my command, my button returns this:

error: no function definition: ACET-LAYTRANS

If I run the original LAYTRANS command, cancel it, and then use my button, it works.

Does anyone know why LAYTRANS must be run first before ACET-LAYTRANS is treated as a defined function?

Or, how can I initialize LAYTRANS without running it and then canceling it?

Thanks in advance.
0 Likes
883 Views
3 Replies
Replies (3)
Message 2 of 4

Anonymous
Not applicable
If you can figure out which ET file contains that command, load it prior to starting yours.

If you can't, then from Express Tools Help:

The library files for the AutoCAD Express Tools are not loaded at AutoCAD startup by default. This was done to reduce the time
needed to load AutoCAD. The libraries load the first time that an Express Tools command is issued, creating a delay the first time
you use an Express Tool in an AutoCAD session. You can use the EXPRESSTOOLS command to force the AutoCAD Express Tools libraries to
be loaded at the beginning of the AutoCAD session.
0 Likes
Message 3 of 4

Anonymous
Not applicable
I wrote this blog post some days ago and found a reason to post it.
In short you need to load laytrans.arx

http://jtbworld.blogspot.com/2007/05/translate-layers-using-laytrans-on.html

--
Jimmy Bergmark
JTB World - Software development and consulting
Owner/Developer
http://www.jtbworld.com
http://jtbworld.blogspot.com

JTB World offers you software's, custom software development, consulting...
http://www.jtbworld.com/about.htm

JTB FlexReport (FLEXnet / FLEXlm license report tool) -
www.jtbworld.com/jtbflexreport

AutoCAD 2008
http://www.jtbworld.com/autocad2008.htm

"bbarkman" wrote in message news:5570664@discussion.autodesk.com...
I have a button which automatically runs LAYTRANS with a specific standards
file. Express Tools is loaded correctly.

If I open a drawing, load the lisp containing my command, my button returns
this:

error: no function definition: ACET-LAYTRANS

If I run the original LAYTRANS command, cancel it, and then use my button,
it works.

Does anyone know why LAYTRANS must be run first before ACET-LAYTRANS is
treated as a defined function?

Or, how can I initialize LAYTRANS without running it and then canceling it?

Thanks in advance.
0 Likes
Message 4 of 4

Anonymous
Not applicable
Thanks to all who replied!

Problem solved with:

(cond ((not (member "laytrans.arx" (arx))) (arxload "laytrans")))

I followed this line with the one that runs my standard file. Works great.
0 Likes