create a toolbar and icon

Discussion in 'AutoCAD' started by vijaya, Dec 8, 2004.

  1. vijaya

    vijaya Guest

    1. How to create a toolbar and add an icon whenever autocad starts? And When I click on the icon I want to run my vba code. How do I do that?Can Any one help me?
    2. I created a toolbar and add icons. once I close and open autocad I'm getting smiling faces instead of icons.What should I do to avoid that ?
     
    vijaya, Dec 8, 2004
    #1
  2. 1. Look at custom_menu.dvb located under [install]\VBA\VBAIDEMenu

    2. Make sure the icons are located within AutoCAD's support file path
    and/or code the entire path name to the icons. Additonally, you can create
    a resource dll to stre/retrieve the icons.

    -- Mike
    ___________________________
    Mike Tuersley
    CADalyst's CAD Clinic
    Rand IMAGINiT Technologies
    ___________________________
    the trick is to realize that there is no spoon...
     
    Mike Tuersley, Dec 8, 2004
    #2
  3. vijaya

    vijaya Guest

    Thanks for your reply.
    Can you explain more clearly about a resource dll. I dont have any idea about a resource dll.
    Actually I want to create a toolbar in a remote system. So when I run my exe (setup file), I'm loading (coping) all my files into a new folder. When I run Autocad it is searching in support folder and icons are not coming. Can you please advice me
     
    vijaya, Dec 11, 2004
    #3
  4. vijaya

    Ed Jobe Guest

    A resource file contains things like icons, bitmaps, and dialogs that are
    used elsewhere in your exe. There is a vb add-in called VB6 Resource Editor
    to allow you to work with this kind of file. VB comes with a command line
    tool calle rc.exe (resource compiler) for creating it. With this file, you
    wouldn't need to install a bunch of bitmaps, just one dll.

    The other problem you are having, is it seems that you havn't told acad
    where to search for your icons. You can manually do this from Options>Files
    tab>Support File Search Path and adding your folder to the list. During your
    setup, you can programatically alter
    AcadApplication.Preferences.Files.SupportPath.

    --
    ----
    Ed
    ----
    exe (setup file), I'm loading (coping) all my files into a new folder. When
    I run Autocad it is searching in support folder and icons are not coming.
    Can you please advice me
     
    Ed Jobe, Dec 13, 2004
    #4
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.