Menu Customization Documentation

Discussion in 'AutoCAD' started by CAB2k, Nov 12, 2004.

  1. CAB2k

    CAB2k Guest

    I have several pdf files from Autodesk.
    vlisptut.pdf
    vlispDev.pdf
    vbaDev.pdf
    AlispRef.pdf

    I was wondering if there is one for Menu Customization?
    I have reviewed the 'on-line help' but would like more.
     
    CAB2k, Nov 12, 2004
    #1
  2. CAB2k

    Paul Turvill Guest

    Help says about all there is to say on the subject. Did you have a specific
    "how to" question?
    ___
     
    Paul Turvill, Nov 12, 2004
    #2
  3. CAB2k

    CAB2k Guest

    Yes, several.
    Can you call a screen or tablet menu after an image menu like this?
    From an ACAD11 menu.

    ***POP7
    [Plans]
    [Walls]^C^C$i=OPTICADD.walli1 $i=*


    ***IMAGE
    **WALLI1
    [Select Wall Type]
    [opticadd(wal-side,Wall Edge)]^C^C$S=X $S=WALLS1


    ***SCREEN
    **X
    [OptiCADD]^C^CMENU;(STRCAT MNU "OPTICADD");
    [* * * * ]$S=OSNAPB

    <15 empty lines>

    [__LAST__]$S= $S=
    [DRAW ]^C^C$S=X $S=DR
    [EDIT ]^C^C$S=X $S=ED

    ***TABLET1
    **WALLS1
    [2x2]^C^C^P(if (null wallload) (load (strcat alac "WALLLOAD")));+
    (wallload "wall-01" (strcat alac "OPTI"));+
    (if (null c:WALL4) (load (strcat alac "WALL4")));^PWALL4


    Also I saw something like this [text]$Pn= $Pn=* where n is a number
    sorry I can't find the exact referance but if I run across it again I'll post it if
    this is too vague or out of context.

    What does this do?
    [__LAST__]$S= $S=

    Just started working with menu's so i'm stumbling a lot.
     
    CAB2k, Nov 13, 2004
    #3
  4. CAB2k

    ECCAD Guest

    Newer versions of AutoCAD use a more 'formal' call
    to sections of the menu file. I.E. try adding "OPTICADD."
    just after the "=" for all calls to $S= and$i=, like:

    [opticadd(wal-side,Wall Edge)]^C^C$S=OPTICADD.X $S=OPTICADD.WALLS1

    I think you (can) call the screen section from the Icon section.

    On the [_LAST_]$S= $S= ...
    This syntax 'recalls' the 'last' $S= sectionname
    For instance, if you do:
    ***1STSECTION
    [gotowalls1]^c^c$S=OPTICADD.WALLS1
    ......
    **WALLS1
    ...
    [_LAST_]$S= $S= (calls 1stsection)

    Bob
     
    ECCAD, Nov 13, 2004
    #4
  5. CAB2k

    CAB2k Guest

    Thanks again Bob,
    So [_LAST_]$S= $S= (calls 1stsection)
    is like a RETURN, unlike a GOTO a specific menu

    OK, I added [test] to POP7 & it will not call CABtest so either
    I'm doing something wrong or the mns file is defective in some way.

    ***POP7
    [Plans]
    [Test]^C^C$S=OPTICADD.CABtest $S=*
    [Walls]^C^C$i=OPTICADD.walli1 $i=*
    ***IMAGE
    **WALLI1
    [Select Wall Type]
    [opticadd(wal-side,Wall Edge)]^C^C$S=OPTICADD.CABtest $S=*
    [opticadd(wal-cent,Wall Centered)]^C^C(alert "WALLi1 to WALLS2")

    ***SCREEN
    **CABtest
    [test1]^C^C(alert "Here at CAB1")
    [test2]^C^C(alert "Here at CAB1")


    ========================================================
    Can you explain what [OSNAP] selection does? $p1= $p1=*
    ***POP1
    [Tools]
    [OSNAP]^C^C$p1= $p1=* OSNAP \
    Here is another example
    ***FILTERS
    [Filters]
    [.X].x $p1= $p1=*

    ========================================================
     
    CAB2k, Nov 13, 2004
    #5
  6. CAB2k

    CAB2k Guest

    OK I found a check box in OPTIONS for 'Display Screen Menu'
    How is this accessed in the menu or lisp?
     
    CAB2k, Nov 13, 2004
    #6
  7. CAB2k

    Doug Broad Guest

    The ACAD screen menu is designed to overlay in two steps. The X submenu
    contains mostly blanks and several items at the top. Its effect is to clear
    the previous submenu and to prepare for the new overlay. The second
    $S=name adds the specifics for the related command.

    To go back to the last screen menu, two screen menus need to be popped,
    thus $S= $S=.

    Never use: $S=name $S=* The * is only used to display pull down menus.

    The function should be obvious by the label. Try using the screen menus
    and you will see their effects. AutoCAD commands are now linked to
    the screen submenus (an R14 effect) that I attribute directly to my keyboard
    macro behavior as written and advertised for R12.
     
    Doug Broad, Nov 13, 2004
    #7
  8. CAB2k

    Paul Turvill Guest

    (setenv "ScreenMenu" "1") turns it on;
    (setenv "ScreenMenu" "0") turns it off;
    (setenv "ScreenMenu" (itoa (- 1 (atoi (getenv "ScreenMenu"))))) toggles it.
    ___
     
    Paul Turvill, Nov 13, 2004
    #8
  9. I had a similar problem loading my menus within the ACAD,mnu/s files, so I
    created one and use MENULOAD.
    I've set the ACAD Support files search path to look in my folders first (L:
    is a network mapped drive //server/library)

    Here is a short primer on support file search path: (This wasn;t your
    question... but, when you start customizing AutoCAD it becomes part of the
    equasion fast)
    http://www.thegrafixshop.com/civildrafter/administration/configure.htm

    Here is a primer on menus:
    http://www.thegrafixshop.com/civildrafter/administration/mcustom.htm

    [I think the problem is how the menu accesses your custom stuff! My menu
    starts out like this:]

    ***Menugroup=GS_CIVILD

    ***POP1

    ID_GS_CIVILD [CI&VIL DRAFTER]
    .......many menu lines.......
    [SET LAYE&RS]^C^CSCRIPT;SETUPLYR
    [--]
    [S&ET TEXT]$I=GS_CIVILD.text $I=*

    .......more menu lines.......

    [The menugroup part is why my original menu did not work when I edited the
    original ACAD menu. I THINK ONCE YOU GET THIS WORKING YOUR SCREEN MENU WILL
    DISPLAY CORRECTLY. The menu you want to display is named "text". it is
    referenced from "GS_CIVILD". The primer on menu customization helps explain
    this. The next part is your screen menu...It goes under a heading ***Images]

    ***IMAGE

    **TEXT
    [text fonts and text size]
    [text(font,SELECT FONT)]
    [text(standard,- STANDARD)]^C^CTGD
    [text(existing,- EXIST)]^C^CTEX
    [text(helv,- HELV)]^C^CTHV
    [text(ldot,- LDOT)]^C^CTDO
    [text(shadow,- SHADOW)]^C^CTSH
    [text(size,SELECT TEXT SIZE)]
    [text(L60,- .06")]^C^C(setq lz 0.060) (if (not c:setsize) (load
    "LSP/setsize")) setsize
    [text(L80,- .08")]^C^C(setq lz 0.080 ......more menu lines.......

    [the text menu is displayed and as long as your slides are in the support
    files search path they will display. If not you get smilie faces. "My web
    page on menu customization shows this menu". The third part was the screen
    menu which is under the heading ***SCREEN. I'll have to refer to the AutoCAD
    menu here, I have reference to screen menus in my custom menus but never
    finished the thought]

    ***SCREEN
    **S
    [AutoCAD ]^C^C^P(ai_rootmenus) ^P
    [* * * * ]$S=ACAD.OSNAP
    .......more menu lines.......
    [DIMNSION]$S=ACAD.11_DIMENSION
    .......more menu lines, then the call to 11_DIMENSION.......

    **11_DIMENSION 3
    .......Dimension menu lines.......

    [the 3 tells ACAD to insert the 11_Dimension menu starting on the third line
    of the base menu, if you omit the 3 it will replace the entire menu. Hope
    this gets you started, sorry it was so long.]

    ~KRK~
     
    Kevin R. Knox, Nov 13, 2004
    #9
  10. That is a display option to show screen menus or not. Most people don't use
    screen menus... (don't hit me) but the functionality was retained for user
    preference. Turn it on and the screen menus display off and... It has
    nothing to do with wether your menus work or not. But that may be part of
    the problem. We were going on the assumption that your screen menus were
    toggled on. A lisp or menu toggle would be cool though!
     
    Kevin R. Knox, Nov 13, 2004
    #10
  11. CAB2k

    ECCAD Guest

    CAB2k,
    Did you get it to work ?

    Bob
     
    ECCAD, Nov 13, 2004
    #11
  12. CAB2k

    CAB2k Guest

    Bob, YES !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

    Thank you all for the help.
    I am busy doing "Honey Do's" today so I can't get enough time.
    But the SWITCH Paul pointed was the main problem all along. not the only
    problem mind you. You would thing calling a screen menu would activate the switch,
    but I may try to convert the screen menus to Pop menus.

    Thanks to examples and comments by Bob, Kevin and Doug I am gaining an understanding
    of the menu system. This is my first menu customizing except to drag buttons.
    The project I have undertaken is to bring an AUTOCAD 11 menu & lisp program into
    ACAD 2K and I could not get ACAD 11 to work on my Windows 2000 system, seems like
    it needs a pure DOS environment to work. So I can not tell what the menu's are
    supposed to look like.

    I'm sure I'll have more question in the coming days. :)

    CAB
     
    CAB2k, Nov 13, 2004
    #12
  13. CAB2k

    CAB2k Guest

    Kevin
    Thanks for the examples, that is what I miss in the 'On-Line Help', lot's of examples. :)
     
    CAB2k, Nov 13, 2004
    #13
  14. Hi Kevin,

    Have you thought that the Autodesk supplied menus are full of examples.

    --


    Laurie Comerford
    CADApps
    www.cadapps.com.au

    of examples. :)
     
    Laurie Comerford, Nov 14, 2004
    #14
  15. CAB2k

    CAB2k Guest

    Paul,
    I could not find this reference to ScreenMenu in the online help?
    What reference did it come from?
     
    CAB2k, Nov 14, 2004
    #15
  16. CAB2k

    CAB2k Guest

    Hi Lourie,
    I'm the one looking for examples. In my ACAD2000 there are acad, dbcon and acetmain menus
    and in them I found SCREEN menus in acad only but could not find any where they were called or
    under what circumstance they would be activated by acad. They appeared to be there for people
    used to using then in previous versions.
    I did, through this thread & the other one I started, learned that SCREEN menus typically have a
    base menu used to clear the previous menu and that the menu when used stays on the screen. I
    could find no lisp that activated the screen by switching the environmental variable "ScreenMenu"
    I still don't know how the width of the screen menu is controlled. I did not know anything about
    the screen menu because I started using ACAD at version 2000. It appears that the Buttons have
    replaced the screen menu system.
     
    CAB2k, Nov 14, 2004
    #16
  17. CAB2k

    Doug Broad Guest

    CAB,
    Have you looked in
    vlide -> help -> customization guide -> custom menus
    ?

    It gives a complete rundown of menu structure. The way
    that Autodesk did its own ACAD.MNU file is not the only
    way it can be done. But reading it gives a wealth of examples
    to learn from. Avoid extensively changing that menu
    file and create your own menu file. Make sure you use the
    ***Groupname=......
    and then call your menu with the group name format.
    $S=yourgroupname.yoursubmenuname
     
    Doug Broad, Nov 14, 2004
    #17
  18. CAB2k

    Paul Turvill Guest

    I think I originally ran across it in a post on this forum. Environment
    Variables aren't well covered in HELP, but if you're curious, open Regedit
    in Windows, and do a search on ScreenMenu; you'll find this one and several
    others of interest.
    ___
     
    Paul Turvill, Nov 14, 2004
    #18
  19. CAB2k

    CAB2k Guest

    Thank for the tip.
     
    CAB2k, Nov 14, 2004
    #19
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.