Jump to content

lisp routine won't load


nativedog

Recommended Posts

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?:roll:

MechanicalLayers.lsp

Link to comment
Share on other sites

  • Replies 45
  • Created
  • Last Reply

Top Posters In This Topic

  • MSasu

    16

  • nativedog

    14

  • BlackBox

    9

  • rblades21

    3

Top Posters In This Topic

Posted Images

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! :beer:

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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. :geek:

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

C:\Users\Susan\Documents\Autodesk 2013\My Projects\WASTE WATER ELECTRICAL AND HVAC\MCES CAD STANDARDS FOR 2012

Link to comment
Share on other sites

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\
Link to comment
Share on other sites

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")

Link to comment
Share on other sites

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")

Link to comment
Share on other sites

Sorry, still getting used to the posting. when I try the first command i am getting the response "too many arguments"

Link to comment
Share on other sites

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\\")

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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 :)

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


×
×
  • Create New...