toffeemilkshake Posted March 10, 2009 Posted March 10, 2009 Hi all, I've been using AutoCAD for a while now but am only just beginning to learn how to use AutoLISP. I have created a lisp that opens an explorer window showing the location of the currently open file: (command "start" (strcat "explorer " (getvar "dwgprefix"))) My problem is that when I open certain files I receive an error dialog stating that: "The path 'file path' does not exist or is not a directory." This only occurs when the file path is quite long (over approx 40 characters). Is there a way that I can fix this? Thanks in advance Quote
wannabe Posted March 10, 2009 Posted March 10, 2009 Is now really a good time to initiate your LISP skillset? Quote
jammie Posted March 10, 2009 Posted March 10, 2009 Hi toffeemilkshake, Welcome to the forum (command "start" (strcat "explorer " (getvar "dwgprefix"))) Seems to work fine. I just tested it with a path 142 characters long with no errors produced. I actually use a similar code myself which achieves the same thing (startapp "explorer" (getvar "dwgprefix")) The only time I come across erroe message "The path 'file path' does not exist or is not a directory." is when the directory does not exist Are there any other parts to your routine? Regards, -Jammie Quote
toffeemilkshake Posted March 10, 2009 Author Posted March 10, 2009 Hi Jammie, Thanks for the response. There are no other parts within my routine so I have no idea what's wrong with it. However I did try using your code and everything seems to work fine that way. Regards, tm Quote
jammie Posted March 10, 2009 Posted March 10, 2009 Hi Jammie, Thanks for the response. There are no other parts within my routine so I have no idea what's wrong with it. However I did try using your code and everything seems to work fine that way. Regards, tm Your welcome toffeemilkshake, I am not sure why your original code caused an error but glad I could be of some help Regards, -Jammie Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.