See the top rated post in this thread. Click here

Results 1 to 9 of 9

Thread: Acad 2010 (menucmd...) problems

  1. #1
    Member
    Join Date
    2001-11
    Posts
    11
    Login to Give a bone
    0

    Default Acad 2010 (menucmd...) problems

    Until recently, I have been running AutoCAD 2009, but upgraded to 2010 earlier this month. Probably since AutoCAD 2002, I have used a Lisp program called by keystrokes defined in a "acad.pgp" file, to pull down certain customized menus from the menu bar. At startup the custom menu files are loaded and the Lisp routine is used to pull down or "Pop" (display) the menu. The problem I am experiencing is that the Lisp program no longer pulls down any menu. The menus are succesfully loaded as can be seen by the title on the menu bar and also, they can be manually pulled down by selecting the title.

    In short, the Lisp code to pull down the menu, (menucmd "p13=*"), no longer functions after installing AutoCAD 2010. However, I still have AutoCAD 2009 installed on the same computer and it works well. Both versions of AutoCAD use the exact same customization files: Acaddoc.lsp, ".mnl", and ".lsp", etc. files. Also, the new compiled menu files, (AutoCAD 2010: .cuix - AutoCAD 2009: .cui, mnr, etc.) are created from the same original ".mnu" file.

    I have tried simply entering the (menucmd "pn=*") at the command prompt, with no success, except when I use n=0, in the Lisp command. Only then, a context menu appears, which is not a pull-down. No other menu slot number works. However, all slot numbers (1-16) work as expected when I launch AutoCAD 2009.

    I am aware AutoCAD has changed the compiled menu format AGAIN!!!!!!! in 2010 and I wonder if something is not working correctly in this new format, or if there is a new system variable that I am not aware of, that freezes the menus. (Can't imagine why.) The circumstances seem to point to a "bug" in the new menu structure.

    Any help would be appreciated.

  2. #2
    Certifiable AUGI Addict ccowgill's Avatar
    Join Date
    2004-08
    Location
    Iron Station, NC
    Posts
    3,197
    Login to Give a bone
    0

    Default Re: Acad 2010 (menucmd...) problems

    I dont know that I would consider it a bug, but Autodesk is attempting to eliminate menus all together, this could account for the change in how the command functions. Can you assign an alt+ key to get them to pop down, like you used to be able to press Alt+F and get the file menu to drop down?
    Christopher T. Cowgill, P.E.
    Autodesk Expert Elite
    AEC Collection Civil 3D 2020
    Windows 10

  3. #3
    Certifiable AUGI Addict irneb's Avatar
    Join Date
    2015-11
    Location
    Jo'burg SA
    Posts
    4,512
    Login to Give a bone
    0

    Default Re: Acad 2010 (menucmd...) problems

    I wonder if there's a way of using WScript's SendKeys method. I've tried linking to the ActiveX object of WScript.Shell, but it doesn't appear to have the SendKeys function in AutoLisp as it does with other programing languages. There's only an Exec method.

    If this was possible you could send "%F" to emulate pressing Alt+F.
    Knowledge is proportional to experience, but wisdom is inversely proportional to ego!
    My little bit of "wisdom": Hind-sight is useless, unless used to improve the next forethought!

  4. #4
    Administrator Opie's Avatar
    Join Date
    2002-01
    Location
    jUSt Here (a lot)
    Posts
    8,659
    Login to Give a bone
    0

    Default Re: Acad 2010 (menucmd...) problems

    This appears to be a bug. The (menucmd "p13=*") code works in Civil 3D 2010. I was not successful with AutoCAD 2010.
    If you have a technical question, please find the appropriate forum and ask it there.
    You will get a quicker response from your fellow AUGI members than if you sent it to me via a PM or email.
    jUSt

  5. #5
    Certifiable AUGI Addict irneb's Avatar
    Join Date
    2015-11
    Location
    Jo'burg SA
    Posts
    4,512
    Login to Give a bone
    0

    Default Re: Acad 2010 (menucmd...) problems

    Is it maybe something to-do with the ribbon? Have you got the menu bar turned on / classic interface Workspace?
    Knowledge is proportional to experience, but wisdom is inversely proportional to ego!
    My little bit of "wisdom": Hind-sight is useless, unless used to improve the next forethought!

  6. #6
    Administrator Opie's Avatar
    Join Date
    2002-01
    Location
    jUSt Here (a lot)
    Posts
    8,659
    Login to Give a bone
    0

    Default Re: Acad 2010 (menucmd...) problems

    Quote Originally Posted by irneb View Post
    Is it maybe something to-do with the ribbon? Have you got the menu bar turned on / classic interface Workspace?
    I just tested this again with no problems. The quick (menucmd "p13=*") function worked. Yesterday's test, I had AutoCAD 2010 open along side Civil 3D 2010. I have no idea what happened yesterday.
    If you have a technical question, please find the appropriate forum and ask it there.
    You will get a quicker response from your fellow AUGI members than if you sent it to me via a PM or email.
    jUSt

  7. #7
    Certifiable AUGI Addict irneb's Avatar
    Join Date
    2015-11
    Location
    Jo'burg SA
    Posts
    4,512
    Login to Give a bone
    0

    Default Re: Acad 2010 (menucmd...) problems

    Quote Originally Posted by Opie View Post
    I just tested this again with no problems. The quick (menucmd "p13=*") function worked. Yesterday's test, I had AutoCAD 2010 open along side Civil 3D 2010. I have no idea what happened yesterday.
    Maybe the 2 versions screw with each other's memory spaces. Not impossible since they share quite a few libraries.
    Knowledge is proportional to experience, but wisdom is inversely proportional to ego!
    My little bit of "wisdom": Hind-sight is useless, unless used to improve the next forethought!

  8. #8
    100 Club hofcad's Avatar
    Join Date
    2005-09
    Posts
    111
    Login to Give a bone
    1

    Default Re: Acad 2010 (menucmd...) problems

    Quote Originally Posted by irneb View Post
    I wonder if there's a way of using WScript's SendKeys method. I've tried linking to the ActiveX object of WScript.Shell, but it doesn't appear to have the SendKeys function in AutoLisp as it does with other programing languages. There's only an Exec method.

    If this was possible you could send "%F" to emulate pressing Alt+F.
    You mean:
    Code:
    (defun SendKeys (KEYS / WSCRIPT)
      (vl-load-com)
      (if (setq WSCRIPT (vlax-create-object "WScript.Shell"))
        (progn
           (vlax-invoke-method WSCRIPT 'sendkeys KEYS) 
           (vlax-release-object WSCRIPT)
        )
      )  
      (princ) 
    )
    (defun c:%F() (SendKeys "%F"));File Menu
    (defun c:%E() (SendKeys "%E"));Edit Menu
    (defun c:%V() (SendKeys "%V"));View Menu
    Regards, HofCAD.
    Last edited by hofcad; 2010-01-27 at 08:07 AM.

  9. #9
    Certifiable AUGI Addict irneb's Avatar
    Join Date
    2015-11
    Location
    Jo'burg SA
    Posts
    4,512
    Login to Give a bone
    0

    Default Re: Acad 2010 (menucmd...) problems

    Thanks, that's what I tried ... must have mistyped somewhere

    Works great!
    Knowledge is proportional to experience, but wisdom is inversely proportional to ego!
    My little bit of "wisdom": Hind-sight is useless, unless used to improve the next forethought!

Similar Threads

  1. ACAD 2008 vba compatible with acad 2010?
    By Ammon in forum VBA/COM Interop
    Replies: 3
    Last Post: 2011-01-12, 10:27 PM
  2. Serious problems between Navisworks 2010 & Revit 2010
    By dramage.190144 in forum NavisWorks - General
    Replies: 1
    Last Post: 2009-09-15, 03:11 AM
  3. Problems with exporting from Revit 2010 to NW 2010
    By anthony.foster-davis in forum NavisWorks - General
    Replies: 4
    Last Post: 2009-06-12, 04:39 PM
  4. Problems with ACAD.LIN
    By Chris.Partin in forum AutoCAD Customization
    Replies: 2
    Last Post: 2005-04-22, 02:11 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •