Load user's custom menu using "username" as menu name

Discussion in 'AutoCAD' started by Eugene, Aug 19, 2003.

  1. Eugene

    Eugene Guest

    Hello

    I am trying to create a macro that will load the users partial menu if
    found. The partial menu's are located on our network, for example
    \server\Autodesk\users\(username)\(username).mns...... (username) being the
    users logon.

    I've found how to get the environment variable (username) but I cant seem to
    use it's string value when calling the menu name "(username).mns". Instead
    it looks for exactly what I've typed...in this case it would return with
    "cant find (username).mns" not the users logon name, but a menu named
    (username).mns. Please help, I have attached my simple code below. Also, if
    anyone has done anything like this before I'd appreciate any suggestions

    Option Compare Text
    Sub main()
    Dim sCurUser As String
    sCurUser = Environ("username")
    ThisDrawing.Application.MenuGroups.Load "scuruser.mns"
    End Sub

    Thanks,
    Eugene
     
    Eugene, Aug 19, 2003
    #1
  2. Eugene

    Eugene Guest

    That's the ticket. I thought it was something like that, thanks for pointing
    me in the right direction.

    Thanks Frank!
     
    Eugene, Aug 19, 2003
    #2
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.