Menu Toggle

Discussion in 'AutoCAD' started by paul.trotter, Jul 29, 2003.

  1. paul.trotter

    paul.trotter Guest

    Hi. I need to create a custom menu that has a pull-down that has several different disciplines in it. I want the user to be able to choose a discipline (like electrical) from a (non-changing) pull-down and have it load other pull-downs. The user could choose another discipline like mechanical and AutoCAD would load all the mechanical pull-downs. I know how to write a standard menu file, but not one that toggles pull-downs and even has the ability to change paths. Thanks for the help! - Paul T.
     
    paul.trotter, Jul 29, 2003
    #1
  2. paul.trotter

    The real JD Guest

    We use profiles for each discipline. As each discipline grows they want their own support paths, their own menus, etc etc. Each discipline starts with an standard profile that incorporates common menus, paths, etc. They then add their own menus etc that are specific to them and save it out as a profile. Whenever we need to change disciplines on a computer we just swap profiles.



    "paul.trotter" <> wrote in message news:...

    Hi. I need to create a custom menu that has a pull-down that has several different disciplines in it. I want the user to be able to choose a discipline (like electrical) from a (non-changing) pull-down and have it load other pull-downs. The user could choose another discipline like mechanical and AutoCAD would load all the mechanical pull-downs. I know how to write a standard menu file, but not one that toggles pull-downs and even has the ability to change paths. Thanks for the help! - Paul T.
     
    The real JD, Jul 29, 2003
    #2
  3. paul.trotter

    Jason Wilder Guest

    How much and what are you looking for?  Something along those lines can be quite involved, I think I have some routines that should be able to give you a lot of guidance, but you won't be able to just plug and play?  Are you already working on something yourself?



     



    I've done something similar both through LISP and VBA.  In LISP, I basically do it all through (command...) code, which I imagine isn't the most efficient, but it worked.



    "paul.trotter" <> wrote in message news:...

    Hi. I need to create a custom menu that has a pull-down that has several different disciplines in it. I want the user to be able to choose a discipline (like electrical) from a (non-changing) pull-down and have it load other pull-downs. The user could choose another discipline like mechanical and AutoCAD would load all the mechanical pull-downs. I know how to write a standard menu file, but not one that toggles pull-downs and even has the ability to change paths. Thanks for the help! - Paul T.
     
    Jason Wilder, Jul 29, 2003
    #3
  4. paul.trotter

    Jason Wilder Guest

    Yeah, but I think Paul is wanting to change disciplines on 'the fly' - a drafter could be doing mechanical for 10 minutes, then switch up to electrical and see different buttons and options.  There could be a routine that simply does an unload/reload or changes profiles.



    "The real JD" <> wrote in message news:...



    We use profiles for each discipline. As each discipline grows they want their own support paths, their own menus, etc etc. Each discipline starts with an standard profile that incorporates common menus, paths, etc. They then add their own menus etc that are specific to them and save it out as a profile. Whenever we need to change disciplines on a computer we just swap profiles.



    "paul.trotter" <> wrote in message news:...

    Hi. I need to create a custom menu that has a pull-down that has several different disciplines in it. I want the user to be able to choose a discipline (like electrical) from a (non-changing) pull-down and have it load other pull-downs. The user could choose another discipline like mechanical and AutoCAD would load all the mechanical pull-downs. I know how to write a standard menu file, but not one that toggles pull-downs and even has the ability to change paths. Thanks for the help! - Paul T.
     
    Jason Wilder, Jul 29, 2003
    #4
  5. Just create your custom menus and then user profiles that would menuload the
    appropiate custom menu. You can have a different profile complete with
    different paths and tool bar settings for each discipline. You then create a
    toolbar that is common to all your custom menus thats changes profiles at
    the pick of a tool button.

    If you like I can post a sample of the profile changing tool bar that others
    helped me create.

    Dave Alexander




    "paul.trotter" <> wrote in message news:...

    Hi. I need to create a custom menu that has a pull-down that has several different disciplines in it. I want the user to be able to choose a discipline (like electrical) from a (non-changing) pull-down and have it load other pull-downs. The user could choose another discipline like mechanical and AutoCAD would load all the mechanical pull-downs. I know how to write a standard menu file, but not one that toggles pull-downs and even has the ability to change paths. Thanks for the help! - Paul T.
     
    Dave Alexander, Jul 29, 2003
    #5
  6. paul.trotter

    paul.trotter Guest

    Yes, please post sample code if you can. I know this is possible, I just need to know how to get started. Thanks.
     
    paul.trotter, Jul 29, 2003
    #6
  7. Have a look at the attached DT.mnu file.



    It is one I have customised and used for years.



    I use it for Architectural, Structural, Hydraulic etc.



    It just has different flyout sections.



    I have stripped the guts out of it but left all the formatting.



    Feel free to use as you like.



    If you like it great, if not maybe ther are bits you can use yourself.



    Just menuload the file to try it out.



     



    Regards



    Andrew McDonald



    "paul.trotter" <> wrote in message news:...

    Hi. I need to create a custom menu that has a pull-down that has several different disciplines in it. I want the user to be able to choose a discipline (like electrical) from a (non-changing) pull-down and have it load other pull-downs. The user could choose another discipline like mechanical and AutoCAD would load all the mechanical pull-downs. I know how to write a standard menu file, but not one that toggles pull-downs and even has the ability to change paths. Thanks for the help! - Paul T.
     
    Andrew McDonald, Jul 29, 2003
    #7
  8. Paul,



     



    The first is the toolbar and the second is the lisp file. This works for both 2002 and 2004. The lisp was given to me but unfortunetly I don't remember who. I apologise for not remembering. Now when someone gives me something I note it with the lisp file.



    I use the same custom menu but different tool bar settings to conserve screen space.



     



     



     



    **PROFILE_PAA
                   [_Toolbar("PROFILE_PAA", _Floating, _Hide, 865, 65, 18)]
                   [_Button("Plumbing", "PROFILE-P.bmp", "ICON_32_MTEXT")]^C^C(load "f:/lisp/setprofile");(SetProfile "XP-DAPLUMB-04");(setvar "modemacro" (getvar "cprofile"))
                   [_Button("HVAC", "PROFILE-V.bmp", "ICON_32_MTEXT")]^C^C(load "f:/lisp/setprofile");(SetProfile "XP-DAHVAC-04");(setvar "modemacro" (getvar "cprofile"))
                   [_Button("Sprinklers", "PROFILE-S.bmp", "ICON_32_MTEXT")]^C^C(load "f:/lisp/setprofile");(SetProfile "XP-DASPK-04");(setvar "modemacro" (getvar "cprofile"))
                   [_Button("PAA-Menu", "PROFILE-PAA.bmp", "ICON_32_MTEXT")]^C^C(load "f:/lisp/setprofile");(SetProfile "PAA-04");(setvar "modemacro" (getvar "cprofile"))




    ;Usage: (setprofile "Your profile name")



     



    (defun SetProfile (pname)
     (vla-put-ActiveProfile
      (vla-get-Profiles
       (vla-get-Preferences
        (vlax-get-acad-object)
       )
      )
      pname
     )
     (princ)
    )



     



     



    Dave Alexander



     



    "paul.trotter" <> wrote in message news:...

    Yes, please post sample code if you can. I know this is possible, I just need to know how to get started. Thanks.
     
    Dave Alexander, Jul 29, 2003
    #8
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.