Emily_83 Posted December 3, 2009 Share Posted December 3, 2009 Morning All i have a ? in regards to loading .dll files Automatically, basically you know how you can put the .lsp files into your start up suite, and don't have to type appload again to load it in, well how on earth do you do the same with .dll files??? Cheers Emily Quote Link to comment Share on other sites More sharing options...
Lee Mac Posted December 3, 2009 Share Posted December 3, 2009 Perhaps something like this? (defun-q DLLSTART ( ) (command "_.netload" "mydll.dll") (princ)) (setq S::STARTUP (append S::STARTUP DLLSTART)) Quote Link to comment Share on other sites More sharing options...
Emily_83 Posted December 3, 2009 Author Share Posted December 3, 2009 HI there Lee thankyou very very much, for you help although i think i am doing something wrong, i copied and pasted it in the command line first to test and got the following error. how do i run it? Command: (setq S::STARTUP (append S::STARTUP DLLSTART)) ; error: Invalid attempt to access a compiled function definition. You may want to define it using defun-q: # not too crash hot yet understanding .Dll's, i mean i can load them when they are suppplied and loading Via NETLOAD, but that is about it!! Cheers Emilys Quote Link to comment Share on other sites More sharing options...
SteveK Posted December 3, 2009 Share Posted December 3, 2009 It's probably the same thing as Lee's suggestion (you'll have to explain it to me Lee) but the few times I've wanted to load dll's at startup I've just made a lisp file with something like this in it then added it to the startup suite like you would a lisp (cause I know no other way): (if (findfile "mydll.dll") (progn (princ "mydll.dll loaded.\n") (command "._NETLOAD" "mydll.dll")) (princ "mydll.dll NOT found!\n")) Quote Link to comment Share on other sites More sharing options...
Lee Mac Posted December 3, 2009 Share Posted December 3, 2009 It should be placed in your ACADDOC.lsp to run on startup, but I believe that if S::STARTUP has not yet been defined, then try this: (defun-q S::STARTUP ( ) (command "_.netload" "mydll.dll") (princ)) Obviously replacing "mydll.dll" with your dll filename. Quote Link to comment Share on other sites More sharing options...
Lee Mac Posted December 3, 2009 Share Posted December 3, 2009 It's probably the same thing as Lee's suggestion (you'll have to explain it to me Lee) but the few times I've wanted to load dll's at startup I've just made a lisp file with something like this in it then added it to the startup suite like you would a lisp (cause I know no other way): That would probably be fine Steve, its only that all the examples of loading dlls at Startup involved the S::STARTUP function - (including VLIDE). :wink: Quote Link to comment Share on other sites More sharing options...
Lee Mac Posted December 3, 2009 Share Posted December 3, 2009 You've got me thinking (and doubting myself) now Steve... have posted a thread over at theSwamp to discuss.. :wink: Quote Link to comment Share on other sites More sharing options...
SteveK Posted December 3, 2009 Share Posted December 3, 2009 That would probably be fine Steve, its only that all the examples of loading dlls at Startup involved the S::STARTUP function - (including VLIDE). :wink: Where are these examples? I'll keep an eye on your swamp thread. Quote Link to comment Share on other sites More sharing options...
Emily_83 Posted December 3, 2009 Author Share Posted December 3, 2009 thankyou guys very much, works perfectly :-) Quote Link to comment Share on other sites More sharing options...
Lee Mac Posted December 3, 2009 Share Posted December 3, 2009 Where are these examples? Just do a search on S::STARTUP and you'll find two. Quote Link to comment Share on other sites More sharing options...
Lee Mac Posted December 3, 2009 Share Posted December 3, 2009 thankyou guys very much, works perfectly :-) Just curious, which one worked? Quote Link to comment Share on other sites More sharing options...
Emily_83 Posted December 3, 2009 Author Share Posted December 3, 2009 well i could not get yoru fist one to work which you game me, i saved it in my Acaddoc file and added to startup suite and it did not work, then did the same with Stevek's and worked perfectly. and now am going to try yours again!!!.........should i be doing it that way??? sorry i should have flashing "Learner" lights around my username for this sort of stuff ...hahaha :-P Quote Link to comment Share on other sites More sharing options...
Emily_83 Posted December 3, 2009 Author Share Posted December 3, 2009 oh my gosh sorry for spelling errors in previous post....thats shocking......i am at work and typing fast!!! as you may have been able to translate...that first linet was meant to say "well i could not get your first one to work which you gave me" lol Quote Link to comment Share on other sites More sharing options...
SteveK Posted December 3, 2009 Share Posted December 3, 2009 i saved it in my Acaddoc file and added to startup suite and it did not work,and now am going to try yours again!!!.........should i be doing it that way??? You shouldn't need to load it in the acaddoc file and the startup suite. One or the other. acaddoc is good over a network, startup suite is good for the individual computer/profile. Which one you should use..? I'm sure it doesn't matter too much but Lee's method is the "correct" way to do it. oh my gosh sorry for spelling errors in previous post....thats shocking......i am at work and typing fast!!! as you may have been able to translate...that first linet was meant to say "well i could not get your first one to work which you gave me" lol all my favourite forums have an "edit" button which I use quite frequently after re-reading what I've typed Quote Link to comment Share on other sites More sharing options...
alanjt Posted December 3, 2009 Share Posted December 3, 2009 I'm confused as to why the first post by Lee isn't working. I've used basically the same thing for quite a long time. Never had any problems. Quote Link to comment Share on other sites More sharing options...
Emily_83 Posted December 3, 2009 Author Share Posted December 3, 2009 You shouldn't need to load it in the acaddoc file and the startup suite. One or the other. acaddoc is good over a network, startup suite is good for the individual computer/profile. Which one you should use..? I'm sure it doesn't matter too much but Lee's method is the "correct" way to do it. thanks for that i will change that now:D all my favourite forums have an "edit" button which I use quite frequently after re-reading what I've typed aha! i will have to remember that for next spelling erros i do, think it is going to become my new best friend Quote Link to comment Share on other sites More sharing options...
SteveK Posted December 3, 2009 Share Posted December 3, 2009 I'm confused as to why the first post by Lee isn't working. I've used basically the same thing for quite a long time. Never had any problems. I got the same error the first time I ran it, but now I have no problems... Quote Link to comment Share on other sites More sharing options...
Emily_83 Posted December 3, 2009 Author Share Posted December 3, 2009 for some reason, only SteveK's works on mine, i'm at a loss as to why i cannot get Lee's to work Quote Link to comment Share on other sites More sharing options...
SteveK Posted December 3, 2009 Share Posted December 3, 2009 I think Lee's gone to bed (or somewhere anyway) so you might have to wait till tomorrow for help with that. Quote Link to comment Share on other sites More sharing options...
Emily_83 Posted December 3, 2009 Author Share Posted December 3, 2009 ohh lucky thing, i feel like doing that but it's only 1.40pm here :-( still at work 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.