svorgodne Posted November 30, 2014 Share Posted November 30, 2014 What are the steps I have to follow in order to load AUTOMATICALLY an application I have developed, without interacting with: "acad.lsp" "acaddoc.lsp" and/or "acad.mnl" Or in other words... How can I create my own .MNL file that loads my application? Thanks in advance. Sergio Quote Link to comment Share on other sites More sharing options...
BIGAL Posted December 1, 2014 Share Posted December 1, 2014 Just add (load "Myapplication") to acaddoc.lsp Quote Link to comment Share on other sites More sharing options...
BlackBox Posted December 1, 2014 Share Posted December 1, 2014 If you're using 2012+, consider using the new Autoloader Mechanism; see my signature for a link that may be useful. Just add (load "Myapplication") to acaddoc.lsp OP is specifically seeking a way to load their customization without affecting AcadDoc.lsp, FWIW. Cheers Quote Link to comment Share on other sites More sharing options...
GP_ Posted December 1, 2014 Share Posted December 1, 2014 ...How can I create my own .MNL file that loads my application? Try: (autoload "MyLisp.LSP" "MyCommand") Quote Link to comment Share on other sites More sharing options...
hanhphuc Posted December 1, 2014 Share Posted December 1, 2014 What are the steps I have to follow in order to loadAUTOMATICALLY an application I have developed, without interacting with: "acad.lsp" "acaddoc.lsp" and/or "acad.mnl" compile all in VLX, autoload in startup? $0.02 Quote Link to comment Share on other sites More sharing options...
BlackBox Posted December 1, 2014 Share Posted December 1, 2014 What are the steps I have to follow in order to loadAUTOMATICALLY an application I have developed, without interacting with: "acad.lsp" "acaddoc.lsp" and/or "acad.mnl" Or in other words... How can I create my own .MNL file that loads my application? .MNL files are loaded when a .CUIx file of same name is loaded; you do have a .CUIx file of same name being loaded in your Profile, right? If you're using 2012+, consider using the new Autoloader Mechanism; see my signature for a link that may be useful. One of the many advantages of Autoloader over this traditional method of using .CUIx + .MNL, is that you can load code files of multiple APIs, and configure which code file(s) are loaded into which applications, versions, and even when they are loaded (i.e., PerDocument, OnAutoCADStartup, etc.). Cheers Quote Link to comment Share on other sites More sharing options...
svorgodne Posted December 2, 2014 Author Share Posted December 2, 2014 Ok, this is the problem... I designed a plug in and I want the people I share it with, to install it and do not create absolutely any problem. Therefore the only way I made it work was by modifying the ACAD.ml through a lisp routine, which is downloading some files. The files must be downloaded, so I thought maybe there would be a way to create an .MNL file which loads my files pretty much like express tools do. Thanks again guys S Quote Link to comment Share on other sites More sharing options...
BlackBox Posted December 2, 2014 Share Posted December 2, 2014 Ok, this is the problem... I designed a plug in and I want the people I share it with, to install it and do not create absolutely any problem. Therefore the only way I made it work was by modifying the ACAD.ml through a lisp routine, which is downloading some files. The files must be downloaded, so I thought maybe there would be a way to create an .MNL file which loads my files pretty much like express tools do. Thanks again guys S As I've already clarified - .MNL files are only loaded when a .CUIx of same name is loaded (as partial?). You've not clarified if the consumer of your plug-in is internal user, or external customer, but by using ACAD.MNL to load your application, you've introduced an unnecessary dependency that you now have no control over, as end-user can modify at will (generally speaking)... Or more likely, will be overwritten with any service pack, hotfix (unlikely), or repair install... Continue using ACAD.MNL at your own risk. Regardless of if your plug-in is LISP, .NET, or ObjectARX, you'd do well to at least implement a Registry Loader (circa 2000-2012 versions), or the Autoloader Mechanism (2012+ versions). Cheers Quote Link to comment Share on other sites More sharing options...
svorgodne Posted December 2, 2014 Author Share Posted December 2, 2014 Thanks Black... how would you solve the problem? The users will be external. I am still in the Beta version, but anyway I want to solve as many problems as I can early as possible. thanks again S Quote Link to comment Share on other sites More sharing options...
BlackBox Posted December 2, 2014 Share Posted December 2, 2014 Thanks Black... how would you solve the problem? The users will be external. I am still in the Beta version, but anyway I want to solve as many problems as I can early as possible. thanks again S If you're dealing with external customers, and you'd like to have some control over who gets what, for what term, at what price (or free?)... Then I'd suggest you submit your plug-in to Autodesk Exchange in .bundle format... Autodesk will review your app for functionality issues, quality, and compliance, and support you as an App Publisher if you need assistance. This also gives you a reputable 'store front' so-to-speak, that prospective clients can trust in, and peruse as they wish. See the first link in my signature (left) as example. If you're wanting to have even more control, by hosting your own e-commerce website portal, etc., then you'd do well to compile a professional installer via Visual Studio, and host everything yourself on your own website, etc. Cheers Quote Link to comment Share on other sites More sharing options...
BIGAL Posted December 3, 2014 Share Posted December 3, 2014 In old terms make a directory either local or on a server with all your code in it add this directory to your "Support files serach path" and put at top. In this directory have a Acaddoc.lsp which has (load "Myprogs1") (load "masterprogs2") and so on it should work. Like Black box look into a install routine even done in lisp you can add the search path via lisp,copy files etc, if its going external then look at FAS files via Vlide compile. we used to use a BAT file to do the copying. Then load 1 lisp to configure. Quote Link to comment Share on other sites More sharing options...
BlackBox Posted December 3, 2014 Share Posted December 3, 2014 In old terms make a directory either local or on a server with all your code in it add this directory to your "Support files serach path" and put at top. In this directory have a Acaddoc.lsp which has (load "Myprogs1") (load "masterprogs2") and so on it should work. Like Black box look into a install routine even done in lisp you can add the search path via lisp,copy files etc, if its going external then look at FAS files via Vlide compile. we used to use a BAT file to do the copying. Then load 1 lisp to configure. FWIW - The Autoloader Mechanism does all of this for you automagically... It adds the appropriate SFSP, it creates the Registry Loader for the application, it loads any applicable .CUIx, or contextual Ribbon tab states, and in no way interferes with any user owned customization files at all (i.e., AcadDoc.lsp, etc.). The entire App's components are maintained within a single folder (in .bundle format), and can be removed at any time, with only one spot of 'residue' that I am aware of (and that, only when adding .CUIx to one's .bundle). Among other things, Autoloader supports all exposed APIs; LISP, .NET, ObjectARX, etc. Cheers Quote Link to comment Share on other sites More sharing options...
svorgodne Posted December 3, 2014 Author Share Posted December 3, 2014 (edited) Thank you very much BlackBox. That gave me a lot of ideas already. I think I have a good idea and I want to try it first and then go through all the process you mentioned which actually, some parts I din't consider at all. Thanks again for the support and if it works I'll surely let you know. As far as I already recover information from users, some of them are not using the latest versions from AutoCAD, that means some from Autocad 2004, until 2013, that is the reason maybe autoloader would be a little problematic. Cheers S Edited December 3, 2014 by svorgodne missing the last idea Quote Link to comment Share on other sites More sharing options...
svorgodne Posted December 3, 2014 Author Share Posted December 3, 2014 Bigal, that is also a great idea... It is a plugin I developed in autolisp and for the test version it should be installed under the user folder. The only way I could imagine to have some certain control over it was creating a routine in lisp that edits the ACAD.mnl but then I realise Express Tools are installing their own Mnl files and from there, they are controlling what happens after. Editing the string from the Support files would only work if there exists an acad,lap or acaddoc.lsp file but some years ago, there was an acad.lsp virus and I want to avoid completely that, that is the reason I wanted to make it in another way. All comments have been very useful, thanks a lot. Cheers S Quote Link to comment Share on other sites More sharing options...
BlackBox Posted December 3, 2014 Share Posted December 3, 2014 Thank you very much BlackBox. That gave me a lot of ideas already. I think I have a good idea and I want to try it first and then go through all the process you mentioned which actually, some parts I din't consider at all. Thanks again for the support and if it works I'll surely let you know. As far as I already recover information from users, some of them are not using the latest versions from AutoCAD, that means some from Autocad 2004, until 2013, that is the reason maybe autoloader would be a little problematic. Cheers S You're welcome; All of my Apps support pre-Autoloader versions as well (I chose to stop at 2010), and cover how I do that here, and here... Now, there I describe how to accomplish this to end-user, you might instead find it more 'hands-off' to use a simple .EXE to implement appropriate Registry Loader for pre-Autoloader versions (i.e., two versions of your app, legacy and new, etc.). Cheers 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.