JoeyG_77 Posted February 26, 2019 Share Posted February 26, 2019 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 Quote Link to comment Share on other sites More sharing options...
rlx Posted February 26, 2019 Share Posted February 26, 2019 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 Quote Link to comment Share on other sites More sharing options...
JoeyG_77 Posted February 26, 2019 Author Share Posted February 26, 2019 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 Quote Link to comment Share on other sites More sharing options...
rlx Posted February 26, 2019 Share Posted February 26, 2019 ok , much fun pushing your button Quote Link to comment Share on other sites More sharing options...
BIGAL Posted February 27, 2019 Share Posted February 27, 2019 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. 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.