nativedog Posted May 10, 2012 Share Posted May 10, 2012 I am not familiar with code and i am trying to load some lisp routines for adding layers in a new project. I receive the error that load failed after I type in the execute command given. I'm running on a 64 bit sytem (Windows 7)and have seen some posts that if the routine is written for 32 bit that may be the cause. Thoughts? MechanicalLayers.lsp Quote Link to comment Share on other sites More sharing options...
BlackBox Posted May 10, 2012 Share Posted May 10, 2012 Welcome to CADTutor! You didn't specify the exact error you are receiving, so here's a hint: MCES Mechanical Layers Program Loaded--Version 1.2 ****************** Type "MLYRS" to execute. ****************** Command: Command: mlyrs [color=red]; error: LOAD failed: "lisp/LineTypes.lsp"[/color] Moderator: Please move this thread to the LISP forum; Cheers! Quote Link to comment Share on other sites More sharing options...
MSasu Posted May 10, 2012 Share Posted May 10, 2012 AutoLISP routines have nothing to do with 32/64 bit environment. Your routine attempt to load another file where is defined a function that seems to deal with linetypes. (load "lisp/LineTypes.lsp") I think that the solution is to add the folder that contains the said "LISP" folder into Options --> Files --> Support File Search Path list. Quote Link to comment Share on other sites More sharing options...
BlackBox Posted May 10, 2012 Share Posted May 10, 2012 AutoLISP routines have nothing to do with 32/64 bit environment.Your routine attempt to load another file where is defined a function that seems to deal with linetypes. (load "lisp/LineTypes.lsp") I think that the solution is to add the folder that contains the "LISP\LineTypes.lsp" into Options --> Files --> Support File Search Path list. Technically, if "LineTypes.lsp" is located in "C:\\SomeFolder\\lisp\\LineTypes.lsp", then only "C:\\SomeFolder\\" need be added to Support File Search Path (SFSP), as the directory prefix in the Load statement's string argument will be added to "C:\\SomFolder\\" when the Load function iterates the SFSP using the .NET FindFile(fileName, HostApplicationServices.WorkingDatabase, FindFileHint.Default); Method. Quote Link to comment Share on other sites More sharing options...
nativedog Posted May 10, 2012 Author Share Posted May 10, 2012 yes this is the error I am receiving. I have added the file path containing the lisp routine under Options --> Files --> Support File Search Path list and I am still receiving the same error. Quote Link to comment Share on other sites More sharing options...
MSasu Posted May 10, 2012 Share Posted May 10, 2012 Can you please post here the path that you added to SFSP list? Thanks. Quote Link to comment Share on other sites More sharing options...
nativedog Posted May 10, 2012 Author Share Posted May 10, 2012 C:\Users\Susan\Documents\Autodesk 2013\My Projects\WASTE WATER ELECTRICAL AND HVAC\MCES CAD STANDARDS FOR 2012 Quote Link to comment Share on other sites More sharing options...
MSasu Posted May 10, 2012 Share Posted May 10, 2012 Can you please now check if the path below contains a file named LineTypes.lsp? C:\Users\Susan\Documents\Autodesk 2013\My Projects\WASTE WATER ELECTRICAL AND HVAC\MCES CAD STANDARDS FOR 2012\Lisp\ Quote Link to comment Share on other sites More sharing options...
nativedog Posted May 10, 2012 Author Share Posted May 10, 2012 Yes it is in the lisp folder. LineTypes.lsp Quote Link to comment Share on other sites More sharing options...
MSasu Posted May 10, 2012 Share Posted May 10, 2012 That file contains a valid AutoLISP code that is supposed to load 49 custom linetypes from MCES.LIN library. What is realy strange is that once you added the above path to SFSP list, the LineTypes.lsp and the container folder Lisp must be visible to interpreter. Can you please paste the lines below to AutoCAD command line and check what return? (findfile "lisp/LineTypes.lsp") (findfile "LINETYPES/MCES.lin") Quote Link to comment Share on other sites More sharing options...
nativedog Posted May 10, 2012 Author Share Posted May 10, 2012 I am getting the "nil" response after i hit return. Quote Link to comment Share on other sites More sharing options...
MSasu Posted May 10, 2012 Share Posted May 10, 2012 Then seems that you added a wrong path to SFSP list. I'll have to ask you to check something else to be sure: (findfile "C:\\Users\\Susan\\Documents\\Autodesk 2013\\My Projects\\WASTE WATER ELECTRICAL AND HVAC\\MCES CAD STANDARDS FOR 2012\\Lisp\\LineTypes.lsp") (findfile "C:\\Users\\Susan\\Documents\\Autodesk 2013\\My Projects\\WASTE WATER ELECTRICAL AND HVAC\\MCES CAD STANDARDS FOR 2012\\LINETYPES\\MCES.lin") Quote Link to comment Share on other sites More sharing options...
nativedog Posted May 10, 2012 Author Share Posted May 10, 2012 I am getting a "nil" response after i hit return. Quote Link to comment Share on other sites More sharing options...
nativedog Posted May 10, 2012 Author Share Posted May 10, 2012 Sorry, still getting used to the posting. when I try the first command i am getting the response "too many arguments" Quote Link to comment Share on other sites More sharing options...
MSasu Posted May 10, 2012 Share Posted May 10, 2012 Then seems that both file aren't available on the said paths. Just to be sure that the folders are: (vl-load-com) (vl-file-directory-p "C:\\Users\\Susan\\Documents\\Autodesk 2013\\My Projects\\WASTE WATER ELECTRICAL AND HVAC\\MCES CAD STANDARDS FOR 2012\\Lisp\\") (vl-file-directory-p "C:\\Users\\Susan\\Documents\\Autodesk 2013\\My Projects\\WASTE WATER ELECTRICAL AND HVAC\\MCES CAD STANDARDS FOR 2012\\LINETYPES\\") Quote Link to comment Share on other sites More sharing options...
MSasu Posted May 10, 2012 Share Posted May 10, 2012 Sorry, still getting used to the posting. when I try the first command i am getting the response "too many arguments" Please try to paste one line at a time. Quote Link to comment Share on other sites More sharing options...
Lee Mac Posted May 10, 2012 Share Posted May 10, 2012 AFAIK, when adding directories to the AutoCAD Support Path list, only the specified directory is searched, no subfolders beneath the directory will be searched - you would need to add the required subfolder paths to the Support Path list separately. Not sure if it helps, but just making everyone aware Quote Link to comment Share on other sites More sharing options...
nativedog Posted May 10, 2012 Author Share Posted May 10, 2012 When I inserted the first command and hit return it brought up the command line again. Subsequently with the next two commands I received a "T" on the command line after each command. Quote Link to comment Share on other sites More sharing options...
MSasu Posted May 10, 2012 Share Posted May 10, 2012 The code from routines posted by OP is trying to access files using a relative path: (lisp\\LineTypes.lsp) ... (command "_.LINETYPE" "_LOAD" LT "LINETYPES/MCES.lin" "") For sure there may be more than one path that must be added to SFSP list. Quote Link to comment Share on other sites More sharing options...
nativedog Posted May 10, 2012 Author Share Posted May 10, 2012 Sorry, what are you wanting me to do next? I am not a programmer just a humble tech. Quote Link to comment Share on other sites More sharing options...
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.