Your Opinion? Loading Partial Menu

Discussion in 'AutoCAD' started by bruceclement, Jan 19, 2005.

  1. bruceclement

    bruceclement Guest

    I'm trying to decide how to make it easy and foolproof for my clients to load my partial menu. I don't want to use a "setup.exe" type installer because I fear it makes the user ask "what is this exe adding to my system? Where is it putting files?" etc.

    OTOH, I don't want to make the user go to options, add a search path, go to appload, load a lisp, or add something to their startup suite.

    I've had success using acaddoc.lsp or acad2005.lsp to load everything, so they only have to add a search path and restart acad. But what if someone else is already using one of these autoloading files for their stuff, then either his or mine won't work.

    So, what do you think is the best (meaning EASY and FOOLPROOF] way to distribute a partial menu?

    TIA

    Bruce Clement
    http://www.bruceclement.com
     
    bruceclement, Jan 19, 2005
    #1
  2. bruceclement

    doug k Guest

    well... there is the "embed" option under the vba manager.

    i'm not fluent in vba stuff, but maybe you can force a menuload with that.
     
    doug k, Jan 19, 2005
    #2
  3. bruceclement

    ECCAD Guest

    Bruce,
    I use something like the attached.
    In (one) of your startup lisp, add:
    (load"C:/app_path/menu_load.lsp")
    And, in the .lsp, change the 'group' name,
    or filenames to suit.

    Bob
     
    ECCAD, Jan 19, 2005
    #3
  4. bruceclement

    doug k Guest

    are his clients on his network?

     
    doug k, Jan 20, 2005
    #4
  5. bruceclement

    bruceclement Guest

    Thanks for the replies so far. Here's the issue: I don't want to have to type in my client's path, and I don't want them to either. I can get everything to load all on its own, so long as acaddoc.lsp or some other auto-loading file is in the search path. But that means that my client has to go into acad, open options, go the files tab, add a search path, and move it to the top of the list. That's already more work than I want them to go thru. Even with that, I have to use acaddoc.lsp or some other file to load my stuff. What if everyone in the world used acaddoc.lsp, acad.lsp or acad2005.lsp for loading their custom menus? What I'm looking for is a better way to get my partial menu loaded on someone's system without me touching it, without them jumping thru a bunch of hoops, and most of all, without using acaddoc.lsp/adad.lsp/acad2005.lsp.

    Maybe a setup.exe isn't so bad???

    Bruce Clement
    http://www.bruceclement.com
     
    bruceclement, Jan 21, 2005
    #5
  6. bruceclement

    OLD-CADaver Guest

    Well it ain't gonna read your mind. Somehow, somewhere you have to tell the machine what to look for and where. Either a setup.exe (I don't recommend) or trust the people to be more than total "gits".

    We use associated MNLs to load the proper functions with the menu.
     
    OLD-CADaver, Jan 21, 2005
    #6
  7. Re: Your Opinion? Loading Partial Menu
    I use InstallShield and InnoSetup, to make a "setup.exe" for my installations, and also an application I wrote in Visual Basic to load my menus or to place my VLX [or any other extension] in the startup suite, when it does not required to have a menu.

    It is all going to depend to trust on the original source.

    Luis Esquivel
    www.draftteam.com
     
    Luis Esquivel, Jan 22, 2005
    #7
  8. Hi Luis,

    Till just recently I did exactly that. However, I was concerned that I had
    to include the VBA run time files with my installation, thereby increasing
    the size of the install. Now I do it entirely with code in Inno Setup

    The following are three extracts from an Inno Setup script file which will
    load a menu file and display different Partial menus from the file depending
    on which version(s) of AutoCAD are installed. I only have one menu file,
    but different Pop menus to suit Land Desktop, Civil 3D or AutoCAD

    You may find it of interest.


    --

    Regards,


    Laurie Comerford
    www.cadapps.com.au
    ..

    [Files]
    Source: C:\Installation\CADApps Install Items\CADApps Licence.rtf; DestDir:
    "{app}\Bloomfield\Programs"; check: installmenus

    {------------------------------------------------}
    {------------------------------------------------}
    {Need to set sRegLocation to suit the AutoCAD version}
    {------------------------------------------------}
    {------------------------------------------------}

    Procedure AddMenuGroup ( spRegMenuLocation: string; spGroupValue: string;
    spMenuSpec: string);
    var
    iGroup: integer;
    bGroupOK: Boolean;
    sGroupString, sGroupValue: string;
    begin
    iGroup := 0;
    bGroupOK := False;
    While not bGroupOK do
    begin
    iGroup := iGroup+1;
    sGroupString := 'Group' + IntToStr (iGroup);
    if RegValueExists(HKCU, spRegMenuLocation, sGroupString) then
    begin
    RegQueryStringValue (HKCU, spRegMenuLocation, sGroupString,
    sGroupValue);
    if sGroupValue = spGroupValue then
    begin
    bGroupOK := true;
    end; // if sGroupValue = spGroupValue then
    end
    else
    begin
    RegWriteStringValue(HKCU, spRegMenuLocation, sGroupString,
    spGroupValue );
    bGroupOK := true ;
    end; // RegValueExists(HKCU, sRegLocation, sGroupString) then
    end; //While not bGroupOK do

    end; // First begin
    ////////////////////////////////////
    function installMenus(): Boolean;
    var

    bHaveRoom: Boolean;
    sMenuName, sMenuSpec: string;
    sGroupValue, sRegMenuLocation, sRegProgramLocation: string;
    begin
    // This is done in the Licence install WriteServerNameFile;
    // Do the Group stuff by setting it's variables and calling
    AddMenuGroupIfNeeded
    sMenuName := 'AdvancedRoad-v5';
    sMenuSpec := ExpandConstant('{app}') +
    '\Bloomfield\Programs\AdvancedRoad-v5';
    sGroupValue := sMenuName + ' ' + sMenuSpec ;

    if R2005AutoCADFound = True then
    begin
    sRegProgramLocation := 'SOFTWARE\Autodesk\AutoCAD\R16.1\ACAD-301:409';
    sRegMenuLocation :=
    'Software\Autodesk\AutoCAD\R16.1\ACAD-301:409\Profiles\<<Unnamed
    Profile>>\Menus' ;
    AddMenuGroup (sRegMenuLocation, sGroupValue, sMenuSpec )

    bHaveRoom := AddPopMenu (sRegMenuLocation, sMenuName + ' Pop10');
    if bHaveRoom = True then
    begin
    bHaveRoom := AddPopMenu (sRegMenuLocation, sMenuName + ' Pop8');
    end;

    etc.

     
    Laurie Comerford, Jan 22, 2005
    #8
  9. Very nice Laurie,

    I went a little more in-dept on this, since we want to let our customers to have access from any AutoCAD version, they might have installed.

    The installer executable it is just a 60KB size, and we try to have [not always] our setup.exe's low in calories, I mean in bytes size.

    Regards,
    Luis Esquivel
    www.draftteam.com
     
    Luis Esquivel, Jan 22, 2005
    #9
Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.