Continue to Site

Eng-Tips is the largest engineering community on the Internet

Intelligent Work Forums for Engineering Professionals

  • Congratulations IDS on being selected by the Eng-Tips community for having the most helpful posts in the forums last week. Way to Go!

Hi, In Autocad R14, How do I go ab

Status
Not open for further replies.

cisco808

Civil/Environmental
Aug 14, 2002
7
Hi,
In Autocad R14, How do I go about making a button for a lisp to add on to the toolbar. Other than typing the lisp in the command line, What I would like to do is to click on the button to activate it. In addition, I've notice that...whenever I open a new drawing I have to highlight and reload the lisps in the load application. What am I doing wrong?, do I have to go to the preferece and add in the support file search path?. Sorry dont know much about lisp...THANKS! in advance.
 
Replies continue below

Recommended for you

What you need to do is either use the autoload stub function in the acadr14.lsp or use an if then condition such as:

(autoload "thisfile" '("thiscommand"))

or

(if (not c:dothis)(load "dothis")) dothis
 
Striker,
tried it but...when I typed the txtalign in the command line, this popped out. "check the installation of the support files and try again.nil"

This where I loaded it:
acadr14.lsp
AutoLoad LISP Applications (autoload "txtalign" '("txtalign"))
thanks for the input!
 
Verify the location of the txtalign.lsp file in the support path as defined in the preferences, the best location is perhaps the support folder. Also verify the name of the lisp file is indeed txtalign.lsp and not a variation, such as txtalign.lisp or textalign.lsp. If all else fails, create a line in the acadr14.lsp:

(load "c:\\path\\filename.lsp")

K
 
I think the button property should read like this...

(LOAD T:\Foldername\foldername\filename.LSP)

**or**

(LOAD T:\Foldername\filename.LSP)

Depending on where your lisp is at ....
Without the quotes.

At least that how I have some of my buttons setup.
 
Dear cisco808,
There is a simple solution for your problem.
Just run the APPLOAD command and click on the Startup Suite
area.
A new dialog box will be opened and you can add lisp
programs to list using the "Add" button. After inserting the desired file name to the list click "Close".
In the Load/Unload Applications dialog box click "Close".
The applications introduced in Startup Suite will be loaded
automatically every time you open/start a drawing.
You need to set the ACADLSPASDOC system variable to 1.
:)
Farzad
 
Thanks once again gang...still no luck.

In (acadr14.lsp) this is what I did;

Striker,
;;; ===== AutoLoad lisp applications frank=====

("c:\\Program Files\\AutoCAD R14\\Support\\Franks_lisp\\txtalign.lsp)



Rich@LG,
;;; ===== AutoLoad lisp applications frank=====

(LOAD T:\Franks_lisp\txtalign.lsp)

...OR...
;;; ===== AutoLoad lisp applications frank=====

(LOAD T:program Files\AutoCAD R14\Franks_lisp\txtalign.lsp)



FH,
R14... I ran the APPLOAD command, But I don't see any Startup Suite. I'm a bit confused.
 
Cisco,
I hope you have a "T" drive?!
Becuase I do.
It seems like you have a custom folder under ...
C:\Program Files\AutoCAD R14\Support\Franks_lispIf so...
then your button should read ...
(LOAD C:\Program Files\AutoCAD R14\Support\Franks_lisp\txtalign.lsp)

This should work.
Let me know.

The Startup suite comment was meant for AutoCAD 2000 not R14.


 
My Goodness! Come on, guys! I had what sounds like a similar problem. I added the code to the end of my acad.lsp file, put it in the "support" directory, and created a new button with only one word- the named command I wanted to run. Since I have the choice to load acad.lsp with every drawing selected in my preferences(200x, but the same approach applies to r-14), I was done.
Don't want to add the code to an existing acad.lsp file? Don't want to use an acad.lsp file? That's ok, master all that other stuff, and work out the bugs.Think the "old" acad.lsp file is passe? After all, its functionality is achieved other ways now. Ok. Master all that other stuff and work out the bugs. Acad.lsp is still supported, however. But be careful- approach the post that suggested you reload the lisp command with every button pick is poor practice, and highly suspect. Nowadays our computers have lots more capacity, but still...
Now don't get me wrong, mastering the issues mentioned in previous posts will only benefit you, but sometimes you have to get outside the question to see the answer. I will suggest FARZAD's post as another good starting point.
Good Luck!
 
Problem solved!...Rich, your way worked. Thanks!
I've also browsed through Afralisp and tried this...which also worked.

(load "txtalign.lsp" "")
Thanks alot you all!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor