Screen Menu doesn't work in 2004

Discussion in 'AutoCAD' started by Kent Cooper, AIA, Mar 3, 2004.

  1. Having used AutoCAD since 1984 (Version 1.4), long before Windows-based
    versions and toolbars and icons, etc., I have a lot of customized routines
    (some simple macros, but also many AutoLISP routines) that operate from the
    Screen Menu, which I have carried along into newer releases. These all
    worked well up through Release 14. In AutoCAD 2000 I found some of the
    items appear on the Screen Menu but don't work, which may in some cases be
    attributable to changes in command prompt sequences, etc. (I have been able
    to correct SOME things by checking for that, but not all). But some items
    don't even appear on the Screen Menu AT ALL. I can't see anything different
    in the way they're formatted from items that DO appear.

    And now, moving up to ADT 2004 (which comes with no Screen Menu of its own),
    the bracketed header for the top line (following the ***SCREEN header in the
    menu file) appears, so apparently the general idea of it is still acceptable
    to the system, but nothing else at all is visible.

    (I also have lots of custom things on a Tablet Menu and a pull-down, all of
    which still seem to work, subject again to some tweaking for command prompt
    or option differences. Those parts doesn't have the problems that I have
    with the Screen Menu.)

    Any ideas why this should be, or how I can fix it?

    Thanks,
    Kent Cooper, AIA
     
    Kent Cooper, AIA, Mar 3, 2004
    #1
  2. Kent Cooper, AIA

    ECCAD Guest

    If R2004 works the same way as R2002, you need to do:
    Tools..Options..(tab Display)..check the box "Display screen menu". To kick it on.

    Bob
     
    ECCAD, Mar 3, 2004
    #2
  3. Kent Cooper, AIA

    R.K. McSwain Guest

    Ignore the "forget about your old ways" advice. There is no reason that I know of that your screen menu macros shouldn't work. There have been many minor changes to command prompt sequences, lisp code, etc., since R14 - nothing major, but it doesn't take much to break a macro.

    Post the ***SCREEN portion of your menu in customer-files, and let's have a look.
     
    R.K. McSwain, Mar 4, 2004
    #3
  4. That's not the problem. The Screen Menu IS on, but the only thing that
    appears on it is the one header at the top.
    Kent Cooper
     
    Kent Cooper, AIA, Mar 4, 2004
    #4
  5. It's not a question of why they don't WORK. It's a question of why they
    don't even APPEAR. I can't find out WHETHER they work or not, unless they
    SHOW UP on the screen menu and I can try them.

    Kent Cooper

    ...
    There is no reason that I know of that your screen menu macros shouldn't
    work. There have been many minor changes to command prompt sequences, lisp
    code, etc., since R14 - nothing major, but it doesn't take much to break a
    macro.
     
    Kent Cooper, AIA, Mar 4, 2004
    #5
  6. Kent Cooper, AIA

    R.K. McSwain Guest

    No need to shout your keywords. I have no trouble seeing or using items in the screen menu in 2004.
    Is the screen menu turned on, but no menu items appear -or- is the screen menu itself not visible?
    If the former, post the menu file.
     
    R.K. McSwain, Mar 4, 2004
    #6
  7. Neither. The screen menu is turned on and visible, and whereas in up
    through R14 the whole collection of menu items appeared, in 2000 some items
    appear and others don't, and in 2004 only the topmost header item appears.
    (And I only used all-caps because I can't do italics in plain text.)

    Kent Cooper

    No need to shout your keywords. I have no trouble seeing or using items in
    the screen menu in 2004.
    Is the screen menu turned on, but no menu items appear -or- is the screen
    menu itself not visible?
    If the former, post the menu file.
     
    Kent Cooper, AIA, Mar 4, 2004
    #7
  8. You may need to undock the screen menu, stretch it down, then redock it.
    There's a bug in autocad regarding the size of the menu. See
    http://www.cadalyst.com/cadalyst/article/articleDetail.jsp?id=80465 for a
    way to fix it:

    Return of the scream menu revisited again
    In June's Bug Watch, I described how AutoCAD 2004's docked screen menu gets
    squished when you close a maximized AutoCAD. Doug Broad has written a VBA
    macro to work around this bug. Place this ACAD.DVB file in AutoCAD's search
    path, and use the Appload command to add it to the Startup Suite. The screen
    menu automatically turns on when AutoCAD starts and turns off when it
    closes. This prevents AutoCAD from squishing it.
     
    Allen Johnson, Mar 4, 2004
    #8
  9. Your comment doesn't sound too "objective" to me (wasn't that how you
    described your posts?).
     
    Allen Johnson, Mar 4, 2004
    #9
  10. You're my hero! That at least got me the full scope of submenus
    (lengthwise, anyway), though I still have the problem that first appeared in
    AutoCAD 2000: a handful of items within some submenus simply don't appear,
    even though items above and below them do.
    Kent Cooper

    ...
     
    Kent Cooper, AIA, Mar 4, 2004
    #10
  11. When AutoCAD compiles the menu into the .mns file, it appears to truncate
    your menu lines.

    For Example:

    [-->Draw LINE]^C^C(if (< (getvar "OSMODE") 16384) (setvar "OSMODE" (+
    (getvar "OSMODE") 16384))) (setq angu (getvar "AUNITS")) (setvar "AUNITS" 3)
    +
    -LAYER S PROPERTY;;(setq pt1 (getpoint "First End of Property Line <end of
    previous>: ")) \+
    (if (= pt2 nil) (setq pt2 (getvar "LASTPOINT"))) (if (= pt1 nil) (setq pt1
    pt2)) +
    (setq brg (getstring "BEARING in Surveyor's Units (use TWO digits for
    degrees, followed by d): ")) \+
    (setq minseclen (- (strlen brg) 5)) (setq disttext (getstring "DISTANCE: "))
    \+
    LINE !pt1 (strcat "@" disttext "<" brg) ;(setq pt2 (getvar "LASTPOINT"))
    (setq lnang (angle pt1 pt2) lndist (distance pt1 pt2)) +
    (if (and (> lnang (/ pi 2)) (<= lnang (* pi 1.5))) (setq csorig pt2 csrot
    pt1 lnang (+ pi lnang)) (setq csorig pt1 csrot pt2)) +
    UCS M !csorig Z !lnang (setq textside (getpoint "Texts on Which Side? "))
    \(if (minusp (cadr textside)) (setq txty (* mf -0.15)) (setq txty (* mf
    0.05))) +
    (setq brgtext (strcase (strcat (substr brg 1 1) " " (substr brg 2 2) "%%D"
    (substr brg 5 minseclen) " " (substr brg (strlen brg))))) +
    -LAYER S METES;;(command "TEXT" "S" "METES" (LIST (* mf 0.05) txty) 0
    brgtext) +
    (if (= (strcase distfmt) "D") (setq disttext (strcat (rtos (/ lndist 12) 2
    2) "'")) (setq disttext (rtos lndist 4 4))) +
    (command "TEXT" "R" (LIST (- lndist (* mf 0.05)) txty) 0 disttext) -LAYER S
    PROPERTY;;UCS P P (setvar "LASTPOINT" pt2) (setvar "AUNITS" angu)
    $S=PROPLINE

    Gets truncated to:

    [-->Draw LINE]^C^C(if (< (getvar "OSMODE") 16384) (setvar "OSMODE" (+
    (getvar "OSMODE") 16384))) (setq angu (getvar "AUNITS")) (setvar "AUNITS"
    3) -LAYER S PROPERTY;;(setq pt1 (getpoint "First End of Property Line <end
    of previous>: ")) \(if (= pt2 nil) (setq pt2 (getvar "LASTPOINT"))) (if (=
    pt1 nil) (setq pt1 pt2)) (setq brg (getstring "BEARING in Surveyor's Units
    (use TWO digits for degrees, followed by d): ")) \(setq minseclen (- (strlen
    brg) 5)) (setq disttext (getstring "DISTANCE: ")) \LINE !pt1 (strcat "@"
    disttext "<" brg) ;(setq pt2 (getvar "LASTPOINT")) (setq lnang (angle pt1
    pt2) lndist (distance pt1 pt2)) (if (and (> lnang (/ pi 2)) (<= lnang (* pi
    1.5))) (setq csorig pt2 csrot pt1 lnang (+ pi lnang)) (setq csorig pt1 csrot
    pt2)) UCS M !csorig Z !lnang (setq textside (getpoint "Texts on Which Side?
    ")) \(if (minusp (cadr textside)) (setq txty (* mf -0.15)) (setq txty (* mf
    0.05))) (setq brgtext (strcase (strcat (substr brg 1 1) " " (substr brg 2 2)
    "%%D" (substr brg 5 minseclen) " " (substr brg (

    What I would do is convert your menu lsp code ino actual lsp function (in an
    ..mnl file) and then call the lsp routine in your screen menu function.
     
    Allen Johnson, Mar 4, 2004
    #11
  12. Kent Cooper, AIA

    R.K. McSwain Guest

    I'll second that.
     
    R.K. McSwain, Mar 4, 2004
    #12
  13. Kent Cooper, AIA

    ECCAD Guest

    And, I'll 3rd it.
    Bob
     
    ECCAD, Mar 4, 2004
    #13
  14. Thanks for the suggestion. Any idea why it would do that with some items
    and not others? Any idea why it might be truncating now, when it never did
    before Acad2000?

    It never seemed worth the "overhead" of making something into a function,
    that one would never use in most drawings, and in many cases (like the
    column grid) might only use once in an entire project. So why have a
    "command" loaded up, sitting there waiting for someone to call for it? And
    why say (command "line") in a lsp function when I can just say LINE in a
    macro? With the length of some of the routines, it adds up to a fair amount
    more memory, more paper to print out a copy of the file, etc. But if that's
    the only way around it, maybe that's what I have to do.

    Kent Cooper, AIA

    Allen Johnson" wrote
     
    Kent Cooper, AIA, Mar 5, 2004
    #14
  15. Oh, and by the way (I should have gotten this into the reply I just sent),
    the example you give of a truncated item is one of those that does appear,
    and works properly, both the screen and pull-down menu versions. Any idea
    how that could be?

    Kent Cooper, AIA

    "Allen Johnson" wrote ...
     
    Kent Cooper, AIA, Mar 5, 2004
    #15
  16. I think they changed how menus work in AutoCAD 2000.

    It still gets loaded into memory, whether in memory for the menu or in lisp.
    Makes editing and testing your functions much simpler for one.
    You can also reuse code (such as setting / restoring a layer for example) in
    other macros. Which should reduce memory questions. But there really isn't
    any need to worry about memory for code such as these. THe storage
    requirements for these are really inconsequential compared to others that
    AutoCAD autoloads for you (express tools is one example).
     
    Allen Johnson, Mar 5, 2004
    #16
  17. I never ran your macros, just did a compile (menuload) on it.
    Did it run all the way though without error?
    AutoCAD compiles the .mnu file into an .mns file for its use.
    Compare your .mnu and .mns files, and see what differences there exist.
    That might give you some insight into your problems.
     
    Allen Johnson, Mar 5, 2004
    #17
  18. Kent Cooper, AIA

    R.K. McSwain Guest

    If overhead is a problem, you could make individual files for each routine (without defun's), then have your menu macro load the file. The lisp code will be executed without loading a function into memory.
    But on the other hand, with todays hardware, a few lisp functions in memory shouldn't be a problem.
     
    R.K. McSwain, Mar 5, 2004
    #18
  19. Kent Cooper, AIA

    Doug Broad Guest

    Hi Kent,
    Some things to consider:

    1) There is no significant overhead in making something
    a function vs having all this in the menu. The fact that
    there is an additional symbol in the symbol table is insignificant.
    Functions can be autoloaded also.
    2) The menu listing shown is almost unintelligible and would
    seem likely to maintain.
    3) You should consider putting most of this lisp in an MNL
    file with the same name as the menu. Then the functions that
    have similiar operations could be reused and they could be
    maintained by using VLIDE to debug them.
    4) Some features of menus interfere with LISP, such as the
    operation of the backslash. After the initial work of transferring
    the code, you should be happy to have it in a separate file
    which is easy to test without recompiling.
     
    Doug Broad, Mar 5, 2004
    #19
  20. Kent Cooper, AIA

    Doug Broad Guest

    Correction:
    Would seem likely *difficult* to maintain.
     
    Doug Broad, Mar 5, 2004
    #20
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.