Jump to content

How to load a lisp from Macro


JoeyG_77

Recommended Posts

Hey Guys .... Im trying to load a lisp function from an Icon

Ive tried several things but it wont run from the click of the Icon

so in saying this .. I need the macro to load the lisp and then invoke the lisp function

 

Thanks for the help in advance

Joey G

 

Ps... Ive already pointed my working & trusted folder path to this location on the server where the lisp resides 

Link to comment
Share on other sites

  • JoeyG_77 changed the title to How to load a lisp from Macro

just a random buttom from my (old) toolbar (yes yes yes rlxmenu.mns)

 

ID_RLS         [_Button("RLSymbols", "rls.bmp", "ICON_16_BLANK")]^C^C(IF (NOT c:rls)(LOAD"RLS.LSP") );RLS

 

does your lisp file actually work? (meaning you are sure it has no errors)

do you use a path (backslash \ problems)

does your routine start upon loading or do you have to give a command -> like my example (load"rls");rls

Best make sure your routines are in your searchpath so no path is needed in your macro.

in macro's a space is the same as enter, so is a semicolon ;

if your macro has spaces at the end you may not notice them.

 

Maybe you already have a another working button so just copy it and modify it to prevent errors.

Think your post is more a general autocad question than a lisp question

 

 

Link to comment
Share on other sites

RLX ....

The code you gave me @ the end of your reply worked perfect . I just had to punch in my syntax

<^C^C(IF (NOT c:rls)(LOAD"RLS.LSP") );RLS>

Thanks for the reply ..

Joey G

 

Link to comment
Share on other sites

Not sure if others agree but I just add the (c:rls) to the end of my code this way on 1st load it will run automatically. I have this were I dont have a c:xxx defun but just a defun (rls) with localised variables and the user really only wants to run once.

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