Rajparamasivam Posted February 7, 2013 Share Posted February 7, 2013 Hai All, I am new to this forum. I have some problem with my lisp. I trying to load my fas files in start up using acad2009doc.lsp. but fas files not loading, other lsp files are loading correctly. Can any one give the suggestion? Thanks in advance. Raj Quote Link to comment Share on other sites More sharing options...
MSasu Posted February 7, 2013 Share Posted February 7, 2013 Welcome to the Forum, Rajparamasivam! The aforementioned auto-loader is reserved by system and isn't recommended to be edited with user data; please resort to acaddoc.lsp instead - create it from scratch if not available. Regarding the loading fail of the trouble-maker FAS file, there was an error message issued? Just press to check. Also, please ensure that the file is valid by trying to load it from APPLOAD command. Can you post here the statement that you used for loading? Quote Link to comment Share on other sites More sharing options...
Rajparamasivam Posted February 7, 2013 Author Share Posted February 7, 2013 Thank you Msasu, File is valid file only. I can load the file from APPLOAD command My statement is (load "C:\\Program Files\\MyTools\\MyToolsR7_2.fas") Regards, Raj Quote Link to comment Share on other sites More sharing options...
GP_ Posted February 7, 2013 Share Posted February 7, 2013 Try add to Startup Suite Contents (Appload). Quote Link to comment Share on other sites More sharing options...
Rajparamasivam Posted February 8, 2013 Author Share Posted February 8, 2013 Thanks GP but I want to load the files in start up itself Raj Quote Link to comment Share on other sites More sharing options...
Costinbos77 Posted February 8, 2013 Share Posted February 8, 2013 You can complete the acad2009doc.lsp file with : (load "c:\\.....\\file.fas" "\n Upload Failed !") FAS file will be loaded each time you open the DWG. Quote Link to comment Share on other sites More sharing options...
gS7 Posted February 8, 2013 Share Posted February 8, 2013 Another ... Copy & Paste into Your ACAD Support Path ACADDOC.lsp Quote Link to comment Share on other sites More sharing options...
irneb Posted February 8, 2013 Share Posted February 8, 2013 You can complete the acad2009doc.lsp file with :FAS file will be loaded each time you open the DWG.Please don't! You're setting yourself up for a disaster. As MSasu's explained in post #2 create your own ACADDOC.LSP file in one of your support folders. The ACAD20##DOC.LSP file is by ADesk and they could go and overwrite your customizations at any time due to an update / upgrade - so you could then loose all your custom stuff. They will never overwrite your own ACADDOC.LSP file though - that's why you're allowed to make such: keep your own customizations safe and away from adesk's blundering fingers. To the OP, your idea should have worked perfectly if the FAS is truly available in that directory. Rather than testing using the AppLoad, just copy-n-paste that line (i.e. you load line) to acad's command line. If there's no error then this is extremely strange. Usually this is because the path/filename is slightly misspelled - and thus load can't find the file. I'd advise to not use the Startup Suite, because it's not as simple to redo for many PC's and or for later upgrades. The ACADDOC.LSP idea is at worst a case of copying a file, usually it's simply a case of setting acad's support folder to point to a shared folder. But if you're willing to redo all that, or go hack into the registry - then stick with the SS if you wish. Quote Link to comment Share on other sites More sharing options...
Costinbos77 Posted February 8, 2013 Share Posted February 8, 2013 (edited) I use it for 5 years and doing very well, In acad2###doc.lsp file just write: (load "c:\\.....\\file.fas" "\n Upload Failed !") After you update to AutoCAD, writes again that row . Edited February 9, 2013 by Costinbos77 Quote Link to comment Share on other sites More sharing options...
Lee Mac Posted February 8, 2013 Share Posted February 8, 2013 I use it for 5 years and doing very well, In acad2xxxdoc.lsp file just write... http://exchange.autodesk.com/autocad/enu/online-help/AMECH_PP/2012/enu/pages/WS73099cc142f4875513fb5cd10c4aa30d6b-7f72.htm Warning: Do not modify the reserved acad20##doc.lsp file.Autodesk provides the acad20##doc.lsp file, which contains AutoLISP-defined functions that are required by AutoCAD. This file is loaded into memory immediately before the acaddoc.lsp file is loaded. Quote Link to comment Share on other sites More sharing options...
irneb Posted February 8, 2013 Share Posted February 8, 2013 If you changed your post to this (modification in red): I use it for 5 years and doing very well, In acaddoc.lsp file just write: (load "c:\\.....\\file.fas" "\n Upload Failed !") After you update to AutoCAD, writes again that row . All would have been fine. Quote Link to comment Share on other sites More sharing options...
GP_ Posted February 8, 2013 Share Posted February 8, 2013 Originally Posted by Autodesk DocumentationWarning: Do not modify the reserved acad20##doc.lsp file. Autodesk provides the acad20##doc.lsp file, which contains AutoLISP-defined functions that are required by AutoCAD. This file is loaded into memory immediately before the acaddoc.lsp file is loaded. Please don't! You're setting yourself up for a disaster. As MSasu's explained in post #2 create your own ACADDOC.LSP file in one of your support folders. The ACAD20##DOC.LSP file is by ADesk and they could go and overwrite your customizations at any time due to an update / upgrade - so you could then loose all your custom stuff. ... Warning: Do not modify.... understood as a change of existing code, but here is added. Is from Acad2002 that I modify acadxxxxdoc.lsp, never had any problems with updates. Quote Link to comment Share on other sites More sharing options...
Lee Mac Posted February 9, 2013 Share Posted February 9, 2013 Warning: Do not modify.... understood as a change of existing code, but here is added.Is from Acad2002 that I modify acadxxxxdoc.lsp, never had any problems with updates. IMO modification to a file includes any change to the original content, whether it be alterations, additions, or otherwise; but it's a moot point: why take the risk when you can safely use the ACADDOC.lsp as recommended? I really don't understand the aversion to the ACADDOC.lsp... Quote Link to comment Share on other sites More sharing options...
Rajparamasivam Posted February 9, 2013 Author Share Posted February 9, 2013 Thank you guys I found the solution, I tried to load lsp file in first line and the second line I tried to load fas file. Now I have converted the lsp file as fas file. then it is loading perfectly. My previous statements are (load "C:\\Program Files\\[color=blue][b]MyTools\\MyToolsR7_1.lsp[/b][/color]") (load "C:\\Program Files\\MyTools\\MyToolsR7_2.fas") Now (load "C:\\Program Files\\[b][color=blue]MyTools\\MyToolsR7_1.fas[/color][/b]") (load "C:\\Program Files\\MyTools\\MyToolsR7_2.fas") Thank you Raj Quote Link to comment Share on other sites More sharing options...
irneb Posted February 9, 2013 Share Posted February 9, 2013 Warning: Do not modify.... understood as a change of existing code, but here is added.Is from Acad2002 that I modify acadxxxxdoc.lsp, never had any problems with updates. You're just lucky. If adesk found some bug in their autoloading lisp code, then they might very easily redo that file. Thus any hotfix / update / service pack might simply copy a new one over the old one. It might not have happened to you, but chances are that adesk might have to update that file in the future if they ever get to lisp. Anyhow, officially you are given an ACadDoc.LSP file which you can create for yourself. This is equivalent to appending your code to the end of the ACad20##Doc.LSP file, but is guaranteed not to be overwritten ever. So if you use this you're safe from adesk deleting your code. There's a further benefit in using the ACadDoc.LSP file: When you upgrade, you don't need to edit the new ACad20##Doc.LSP file at all. You have 2 options: Copy your own ACadDoc.LSP file to any of the support folders of the new ACad; or better yet Have all your own lisps in one custom folder which you can easily get to (none of that C:\Documents and Setting\.... or C:Users\.... - it can be something as simple as C:\MyLisps. Place your ACadDoc.LSP file inside that and add it to any ACad's support folder search path. Option 2 is what I do (in conjunction with using the MNL idea for each MNU/CUI/CUIX I've made). It's the nicest way to get all your customizations working on multiple versions of ACad at once. You only have the one file to edit, and all your changes are reflected immediately throughout all of your ACads without doing anything extra. Further to that, Option 2 means all your other LSP files are also on the search path. So any load statement doesn't need to specify the path, only the filename. This makes this thread's problem a lot simpler too. I can't see why you wouldn't want to do this? You can do this for yourself (I don't mind that), but I'm a bit concerned that you give it as advice to others. It's officially wrong (ADesk says so), possibly dangerous, and inefficient at best (need to edit the new file for each upgrade instead of the much easier Option 1 or 2 above). Now if it was that you prefer the Startup Suite, then I could understand - some people prefer using a GUI instead of modifying a text file. There are ways to make life simpler in that case too: e.g. you could write some code to copy the registry entries for the Startup Suite to the new Upgrade's registry path instead of re-selecting each and every LSP you want to load. But IMO this is something quite complex in comparison to the ACadDoc.LSP method. Quote Link to comment Share on other sites More sharing options...
irneb Posted February 9, 2013 Share Posted February 9, 2013 (edited) Thank you guys I found the solution, You can make that even simpler. Just omit the ".LSP" and / or ".FAS" from the path. The load function automatically checks if it can find a file with VLX, if not then FAS, and lastly LSP. This way makes it nice, since you need not have to go change your load calls after you've compiled your LSPs. Even simpler than that, add your C:\Program Files\Mytools to the support search paths. Then your load calls can be: (load "MyToolsR7_1") (load "MyToolsR7_2") Or better to actually use the "good" portion of Costinbos77's advice: (load "MyToolsR7_1" nil) (load "MyToolsR7_2" nil) That way if there's an error (like a file missing or some bug inside) all your code wont stop at that spot. Edit: Actually you can even have some code which adds a path to your support paths - http://www.theswamp.org/index.php?topic=43749.msg490212#msg490212 That way it's a situation of AppLoading your "Install.LSP" file into any new ACad and you're done. No need to modify anything. Edited February 9, 2013 by irneb Quote Link to comment Share on other sites More sharing options...
GP_ Posted February 9, 2013 Share Posted February 9, 2013 @ Lee, irneb You've convinced me. Quote Link to comment Share on other sites More sharing options...
Costinbos77 Posted February 9, 2013 Share Posted February 9, 2013 Look what I found in the basement of file : acad2012.lsp : ;;; Note: ;;; This file is normally loaded only once per AutoCAD session. ;;; If you wish to have LISP code loaded into every document, ;;; you should add your code to acaddoc.lsp. 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.