MENU Question

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

  1. CAB2k

    CAB2k Guest

    I am working on an old Menu from ACAD11, not sure if it worked then. Using in ACAD2000.
    The user said the tablet worked fine & did not use the menu system much.
    I was trying to get this to work. Select 'Plans' pull down, then 'Walls'
    The image menu is displayed and then select the first slide. The menu
    quits at that point. I assume it is because you can't ^C^C$S=X $S=WALLS1
    from an image menu. Is that correct? You can not change menu types?
    What is the $S=X in ^C^C$S=X $S=WALLS1
    I did find a screen menu **X

    Code:
    ***POP7
    [Plans]
    [Walls]^C^C$i=OPTICADD.walli1 $i=*
    [Wall Trims]^C^C$i=trimi $i=*
    [Interior Doors]^C^C$i=doori1 $i=*


    ***IMAGE
    **WALLI1
    [Select Wall Type]
    [opticadd(wal-side,Wall Edge)]^C^C$S=X $S=WALLS1
    [opticadd(wal-cent,Wall Centered)]^C^C$S=X $S=WALLS2
    [opticadd(wal-fnd,Foundation)]^C^C$S=X $S=FNDWALL
    [opticadd(grade-bm,Grade Beam)]^C^C$S=X $S=FNDWALL
    [ Exit]^C^C



    ***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

    [2x4]^C^C^P(if (null wallload) (load (strcat alac "WALLLOAD")));+
    (wallload "wall-02" (strcat alac "OPTI"));+
    (if (null c:WALL4) (load (strcat alac "WALL4")));^PWALL4

    I have tried to place **WALLS1 in the ***SCREEN section with no luck.


    ===========================================================================
    Another question, i am using this code to reload the menu after modifying it
    Code:
    (defun c:Optimenu ()
    (command ".menuunload" "OptiCadd")
    (command ".menuload" "c:/Opti/OptiCadd.mns")
    ;(menucmd "P2=+MyMenu.POP1"); insert in the 2nd position
    (princ)
    )

    But how would you get POP7 [Plans] inserted as a pulldown?
     
    CAB2k, Nov 12, 2004
    #1
  2. I'm not sure whether you can from image menus, but I know that you CAN
    invoke a Screen sub-Menu change like that from within a Tablet Menu item, at
    least, because I've got some that do.

    The $S=X invokes that Screen sub-Menu starting with **X, just as the
    $S=WALLS1 thing does. **X is most likely a sub-menu that's just a series of
    blank lines long enough to "wipe out" whatever sub-menu was there before, so
    when you put the WALLS1 sub-menu (which is kind of short) in, you don't have
    leftover stuff from a different but longer sub-menu showing farther down.
    **X might have some items at the end that would be beyond the length of any
    other screen menu, and that would therefore remain visible at all times,
    like
    [Last}$S=
    or something. Or such things might be part of the starting screen menu, and
    **X might be enough blank lines to wipe out anything else, but leave those
    showing.

    It's a sort of clear-screen-menu sub-menu. If one prefers to have screen
    menus free of remnants of earlier longer ones, it takes a lot less code to
    have a $S=X in there before calling for a new sub-menu than to extend every
    sub-menu with enough blank lines to wipe out any other sub-menu's lines.
    --
    Kent Cooper, AIA


    ...
    .....
    .....
     
    Kent Cooper, AIA, Nov 12, 2004
    #2
  3. CAB2k

    ECCAD Guest

    Place ***POP7 in position 7..
    (menucmd "P7=+MyMenu.POP7"); insert in the 7th position

    Bob
     
    ECCAD, Nov 12, 2004
    #3
  4. CAB2k

    CAB2k Guest

    Thanks you both for the info, it was very helpful.
     
    CAB2k, Nov 12, 2004
    #4
  5. CAB2k

    CAB2k Guest

    Kent,
    Your are exactly right, the **X has 12 blank lines.
    Thanks.
     
    CAB2k, Nov 12, 2004
    #5
  6. CAB2k

    liftedaxis Guest

    while you're optimizing the menu loading and unloading, i'd recommend not referring to an absolute path, and instead relying on the menu being in your search path.
    Also, you probably shouldn't be specifying the MNS, as when you ever do switch among version of AutoCAD, it'll get all fruity -- just do a (command "menuload" "mymenu") and it'll figure out if it can load the MNS or needs to recompile the MNU. and of course to force recompile, it's nice to have a menuloader function that can recompile the menu when needed -- same function, but expressly load the MNU.

    --Jeremiah
     
    liftedaxis, Nov 13, 2004
    #6
  7. CAB2k

    CAB2k Guest

    Jeremiah
    I'm glad you pointed that out as I was having problems when I did not have
    the path. So I revisited that situation and found another copy of Opticadd.mns
    that I had forgotten about and it was getting loaded first. I didn't figure
    that out until your post.
    Thanks
    CAB
     
    CAB2k, Nov 13, 2004
    #7
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.