custom pull down menu for layers

Discussion in 'AutoCAD' started by cadd_monkey, Apr 1, 2005.

  1. cadd_monkey

    cadd_monkey Guest

    i'm building a custom pull down menu and within it i would like to add layers to get pulled down. i'd like to put in my layers such as:

    NK-hatch-bndy
    NK-hatch-sod
    NK-hatch-turd

    and so on. i'd like to be able to add just 1 layer and have an option for it to load all the layers.

    any help on that one?

    also, once i add this onto all my machines is there a way for me to keep updateing the MNU file and it automatically update on all the pc's? or a way to make that happen?

    thanks all this is helping me a great deal

    JC
     
    cadd_monkey, Apr 1, 2005
    #1
  2. You will need to make a pull-down in wich for each layer you want created.
    Like:
    -LAYER;M;NK-hatch-bndy;C;>color number<;NK-hatch-bndy;;
    And ofcourse a command to insert a dwg wich contains all the specified
    layers. (easyest way)

    If you use a network (who isn't) its the best way to have the menu stored on
    the network.
    You need only to modify that one and the users just reload it.

    Regards,
    Jan

    layers to get pulled down. i'd like to put in my layers such as:
    updateing the MNU file and it automatically update on all the pc's? or a way
    to make that happen?
     
    Jan van de Poel, Apr 1, 2005
    #2
  3. cadd_monkey

    dellboy Guest

    Hi,
    There is one other way that I use. See attached file that shows the menu item and a script file (*.scr). The menu calls the script that inserts a set of layers, the ones not used aere removed on purging.

    Dellboy
     
    dellboy, Apr 1, 2005
    #3
  4. cadd_monkey

    Tom Smith Guest

    updateing the MNU

    It's simpler, easier, and safer to work with the mns file directly than with the mnu. It's not in any way necessary to have an mnu file at all. See Mark Middlebrook's classic article on menu customization at http://www.markcad.com/autocad/acadmenus.htm
     
    Tom Smith, Apr 1, 2005
    #4
  5. cadd_monkey

    robbyj Guest

    this is what i use (attached file) kind of large but feel free to modify it if you want to. just replace my layer names with yours. i'll be adding groups to this file this weekend and i'll post that one next week if you want it.

    robbyj
     
    robbyj, Apr 1, 2005
    #5
  6. cadd_monkey

    James Buzbee Guest

    Just go grab jbImportLayers in the CF NG. It lets you access a drawing
    remotely to import selected layers via a dialog box. What I do is have a
    drawing on the server that has all our standard layers, use layer filters to
    sort in the tree control on the dialog. If you have any questions post here
    and I'll help.

    jb
     
    James Buzbee, Apr 1, 2005
    #6
  7. cadd_monkey

    cadd_monkey Guest

    wow thanks everyone, great information from all of you. as i get time today i hope to test your ideas, i'll post some feedback back here once i get something going

    thanks again everyone!!!
     
    cadd_monkey, Apr 1, 2005
    #7
  8. cadd_monkey

    Tom Smith Guest

    If you'll search in here, the subject of importing layers has been discussed in great detail before. There are a lot of ways of doing this, and no one way is "best" -- it depends a lot on your needs and the nature of your work.

    James' application is rich and complex. As I understand, it lets you keep a huge set of standard layers and layer states in one master file, and then bring specific subsets of those into your drawing file. I believe he talked about 600 or more layers. If your system needs that, then his would be a fine approach.

    On the other hand, my office uses the same 2 dozen or so layers in every file, and a grand total of about 3 different visibility settings, so we have no need for such a complex gizmo. We have the layers and layer states set up in our templates, so they always appear in every drawing we create. However, we've had a need to import layers in two situations: in old drawing files which had a different layering standard, and in cases where a file has been prematurely purged, deleteing layers before they were needed. In those cases we need to be able to import our usual couple dozen layers.

    For us, the simplest solution was to export a layer state from our standard template, using the layer command, and then use a toolbar button to import that layer state if needed.

    Before that, we used the trick of inserting an empty drawing file which contained our layers. The limitation of this is that it won't change the color/linetype/etc. of existing layers -- it won't fix them if they're wrong. But the layer states approach will do this, and it doesn't require any programming.

    For us, there wouldn't seem to be any value in having a long pulldown of individual layer macros like Robby's. If I were only missing a couple of layers, it would seem unnecessarily laborious to scroll through the whole list to pick out the one or two things I wanted. I'd much rather just poke one button to get all of them, and be done with it. When I'm finished with the drawing I can purge out any that aren't used -- there's usually no more than a cpouple of them. Unlike James, I don't have so many layers that it's a problem to import them all at once.

    There's always the question of why you need to bring in layers anyway. If you're dealing with other people's files, it's understandable, but if you're creating your own files, then IMHO this shouldn't be necesssary. The layers ought to be set up automatically in the process of creating the drawing, rather than being added piecemeal as you're working. James' system seems designed for this, but it's way more high-octane than we need. We can accomplish our layering simply by having them present in our templates.
     
    Tom Smith, Apr 1, 2005
    #8
  9. cadd_monkey

    James Buzbee Guest

    Hi Tom,

    The routine I was refering to was just the one for importing layers. The
    Working States routine and it's subsequent "automatic standards" feature is
    very complex and not for the casual user. It offers a way to set and keep
    office standards rigidly and automatically. Too many times I've had users
    delete, change, corrupt office standards in files because they didn't know
    what they were doing!

    jb
     
    James Buzbee, Apr 1, 2005
    #9
  10. cadd_monkey

    robbyj Guest

    Hey Tom,

    Your right my mnu file to long and laborious for individual layer input. I tend to get carried away sometimes. Were in the middle of removing most of it and just keeping the line layers. No since in having all the node and symbol layers when its all created during the importing of points into the dwg.

    thanks
    robbyj
     
    robbyj, Apr 1, 2005
    #10
  11. cadd_monkey

    Tom Smith Guest

    Thanks for the clarification, I'll have to look into that. I have the luxury of dealing with such a simple standard that users seldom mess it up. :)
     
    Tom Smith, Apr 1, 2005
    #11
  12. cadd_monkey

    Tom Smith Guest

    I didn't mean to be critical, only to point out that there's no one right way, it depends on what you need and how you work.

    Actually, I think we could probably start our drawings with just a half dozen or so basic layers, since most of our standard ones would get brought in anyway by inserting blocks. We make heavy use of standardized details, so there really aren't that many layers on which the user actually draws. They do more editing of existing stuff than creation of new stuff.

    You might look into James' program too, or the layer state approach -- maybe you could bring in all the "line" layers at once, or maybe subgroups of them for different types of tasks. Having too many unused layers present can definitely make a drawing cumbersome.
     
    Tom Smith, Apr 1, 2005
    #12
  13. Hi Tom,

    I have to disagree. I started with MNS files with our software and found
    that management of tooltips was extremely difficult due to the fact that
    when AutoCAD recreates the MNS file it randomly sorts the Tooltips. If you
    have a file with a large number of tooltips having them sorted in
    Alphabetical order makes their management so much easier.

    If you start with an MNU file, the system creates an MNS file. The MNS file
    gets modified if you work with toolbar edits from inside AutoCAD and these
    don't get translated back to the MNU file. In that case you may need to
    copy the changed toolbars back to the MNU file.

    For the user loading either menu file makes no difference to the work load.

    If you are providing support for your software product and users customise
    your product menus, with an MNU file in place you can at least get them back
    to the 'standard' environment with an MNU file - while the MNS file will
    reflect the modifications made.

    --


    Laurie Comerford
    CADApps
    www.cadapps.com.au


    with the mnu. It's not in any way necessary to have an mnu file at all. See
    Mark Middlebrook's classic article on menu customization at
    http://www.markcad.com/autocad/acadmenus.htm
     
    Laurie Comerford, Apr 1, 2005
    #13
  14. cadd_monkey

    OLD-CADaver Guest

    <<was extremely difficult due to the fact that when AutoCAD recreates the MNS file it randomly sorts the Tooltips. If you have a file with a large number of tooltips having them sorted in Alphabetical order makes their management so much easier. >>

    ummm... copy the sorted list from the MNU to MNS, then trow away the MNU.


    <<For the user loading either menu file makes no difference to the work load. >>

    Unless the user loads the MNU, thereby overwriting any customization done to the MNS.
     
    OLD-CADaver, Apr 2, 2005
    #14
  15. MNS file it randomly sorts the Tooltips. If you have a file with a large
    number of tooltips having them sorted in Alphabetical order makes their
    management so much easier. >>
    Which of course lasts till the next time you change it.

    You do what you like. You cannot convince me that having an MNU file is
    useless.
    to the MNS.


    --


    Laurie Comerford
    CADApps
    www.cadapps.com.au
     
    Laurie Comerford, Apr 2, 2005
    #15
  16. cadd_monkey

    OLD-CADaver Guest

    <<Which of course lasts till the next time you change it.>>

    Cut it out, paste into word, re-sort it, paste it back into MNS. Takes maybe a whole minute, if you really need it sorted.


    <<You do what you like. You cannot convince me that having an MNU file is useless.>>

    If it were only useless I wouldn't have said anything, but it's worse than useless, it's dangerous. Recompiling the MNU will overwrite the MNS and destroy any custom toolbars not in the MNU. I know, I know, you can copy them out of the MNS and paste 'em back into the MNU and everything is fine. BUT resorting the helpstrings in the MNS is easier, and considerably safer.

    All this goes away for R2006 anyway.
     
    OLD-CADaver, Apr 2, 2005
    #16
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.