designwi Posted December 17, 2009 Posted December 17, 2009 Good evening all (at least for all that it is actually evening). I joined this forum in early '08, posted a few questions and got GREAT responses from all. And I thank everyone for their advice and assistance. I am back for the first time since 3/08, and I am proud to say that I have built a successful design company (freelance) along with landing myself a full time job as a draftsman. THANK YOU ALL FOR YOUR INITIAL GUIDANCE!!!! Anyhow... neither here nor there, I come looking for some advice and/or assistance with an "auto loading LISP routine". In my past two years of working with AutoCAD I haven't done much along the lines of Lisp / AUTOLisp (too much time spent learning the program's "basics". What I am looking for, if possible, Is there a way to run a lisp routine when someone else opens one of my drawings. I know I can add a routine that auto loads when I open AutoCAD, but what I am looking for is a way to add it the drawing where it loads when someone else opens my drawing. For example (pardon my poor lisp writing skills) but is it possible to load this when someone else opens my drawing; (defun c:l() (vl-load-com)(setq sapi (vlax-create-object "Sapi.SpVoice")) (vlax-invoke sapi "Speak" "what the hell are you doing ? . . . . . . . . . . keep your hands off my stuff !" 0)(vlax-release-object sapi) ) (c:l) Thank you all in advance for your help, and I look forward to "joining" this forum full-time again. (sorry for the long winded post) Quote
Lee Mac Posted December 17, 2009 Posted December 17, 2009 This is a highly debated topic for obvious reasons... LISP can include some very malicious code indeed... And so, in many forums, threads on this topic are closed shortly after they are started. I believe it can be done, storing data in the drawing to be read upon opening. There is a discussion here I believe. Lee Quote
designwi Posted December 17, 2009 Author Posted December 17, 2009 Sorry, no malicious intents here, but I completely understand. PLEASE DON'T POST RESPONSES BASED ON "Lee Mac's" response!!!!!! Quote
Lee Mac Posted December 17, 2009 Posted December 17, 2009 Sorry, no malicious intents here, but I completely understand. PLEASE DON'T POST RESPONSES BASED ON "Lee Mac's" response!!!!!! I didn't for one minute believe you did I just warned of the consequences of such knowledge. Quote
SteveK Posted December 17, 2009 Posted December 17, 2009 I believe it can be done, storing data in the drawing to be read upon opening.There is a discussion here I believe. Lee That thread is an interesting read! ...Though I can't see where Luis posts his open source code (unless it is that simple stuff posted a few times that I can't make sense of). Or he may have deleted it. It would be quite useful to get a hold of some sort of template like that. Quote
Lee Mac Posted December 17, 2009 Posted December 17, 2009 That thread is an interesting read! ...Though I can't see where Luis posts his open source code (unless it is that simple stuff posted a few times that I can't make sense of). Or he may have deleted it. It would be quite useful to get a hold of some sort of template like that. Yeah, the method was a bit beyond me too - but I kind of got the idea... Quote
Tankman Posted December 17, 2009 Posted December 17, 2009 Yeah, the method was a bit beyond me too - but I kind of got the idea... I think I too kind of got the idea but, steering clear of it 100%. Quote
SteveK Posted December 17, 2009 Posted December 17, 2009 I think there'd be great possibilities in there though. Like fields but way more powerful (just gotta keep them out of the wrong hands) Quote
wizman Posted December 18, 2009 Posted December 18, 2009 Similar thread: http://www.cadtutor.net/forum/showthread.php?t=27357 Quote
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.