|
Welcome, Guest.
|
||||||
| AutoLISP AutoLISP or Visual LISP, learn both here! |
![]() |
|
|
Thread Tools | Display Modes |
|
|
#1 |
|
Member
Join Date: 2003-09
Posts: 9
![]() |
We are trying to make an old lisp routine for automatically redefining detail blocks work under AutoCAD 2005. The following instruction now fails and interrupts the routine when it executes but does not find a matching filename:
(command "insert" fname ^C) It's a very simple command and it still works when it finds the file it is looking for - but now it crashes the whole routine when fname is not found in the path. It exits the lisp routine after displaying the search path and the last line displayed is *Invalid*. Is there a flag or switch that needs to be set to make this command work the ways it did under older versions? Any workarounds or quick solutions? |
|
|
|
|
|
#2 |
|
All AUGI, all the time
Join Date: 2002-12
Location: Brandon, Florida
Posts: 685
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() |
Try this.
Code:
(if (findfile fname) (command "insert" fname ^C) (alert "\nFile not found") ) |
|
|
|
|
|
#3 |
|
100 Club
Join Date: 2000-12
Posts: 126
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() |
Just an observation. The ^C thingie should be changed to nil (^C is seen as a symbol that just happens to be nil when the call is made but it has no real meaning)
|
|
|
|
|
|
#4 |
|
Moderator
Join Date: 2002-12
Location: Denver, CO USA
Posts: 150
![]() ![]() ![]() ![]() ![]() ![]() ![]() |
You can also try this.
(command "insert" fname \E) |
|
|
|
|
|
#5 |
|
I could stop if I wanted to
Join Date: 2002-02
Location: Kansas
Posts: 462
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() |
(command "insert" fname)(command)
this work in 2002 the 2nd (command) send the esc to autocad |
|
|
|
|
|
#6 | |
|
Administrator
Join Date: 2001-08
Location: Seattle WA US
Posts: 4,393
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() |
Quote:
|
|
|
|
|
|
|
#7 |
|
Member
Join Date: 2004-09
Posts: 8
![]() |
You better include the folder (which contains the required file) in your "support file search path" and then run the programme.
|
|
|
|
![]() |
|
||||||
| Thread Tools | |
| Display Modes | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Problem Plotting with VBA | vferrara | VBA | 5 | 2006-03-14 02:41 PM |
| Sample AutoLISP code - what would you do different? | sinc | AutoLISP | 13 | 2004-07-30 01:38 AM |
| autolisp in LDD | om_change | AutoLISP | 2 | 2004-07-07 11:34 PM |
| Block insertion problem | Cad4men | ACA General | 3 | 2004-06-28 03:26 PM |
| Problem in vla-explode method | rajat126 | AutoLISP | 4 | 2004-06-23 02:40 PM |