1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

How to create your own simple Add-on Button

Discussion in 'Add-on Development' started by albie0803, Nov 10, 2017.

  1. albie0803

    albie0803 Alibre Super User

    I have long desired to be able to collect my favourite CAD websites as buttons on the Add-On ribbon.

    With help from Andy who writes the fantastic Wizoscript and a programmer friend of mine I have been able to put together generic program and webpage launchers that you can modify as you desire.

    NOTE: These are very simple openers, there is no integration of any sort, all they do is launch a particular file or site.

    The add-on folder below shows the basic parts needed.

    First we will look at the program launcher.

    External: is a shortcut to the desired program renamed as External. This MUST be named External as this is the name that the dll file looks for.
    ExternalAddOn.dll: is the file that does the calling and needs no alteration
    MyProgam.adc: is what makes the button in Alibre. We will need to edit it as shown below.
    MyProgam.ico: is the picture shown in the button

    Building a Program Launcher Addon

    Grab a copy of MyProgram.zip from below and unpack the folder to the desktop.

    Rename the folder to the name of the program you want to launch and then open it.

    You can rename MyProgram.adc to reflect the program you are opening if you want to.

    Open the location of the program you want to launch and drag a shortcut for it to your add-on folder. Now rename the shortcut to External

    Open MyProgram.adc in a text editor. It will look like this

    ADC File.PNG

    Change the highlighted text to the name of the program you wish to launch.

    ADC File1.PNG

    Add a description that will show when the mouse hovers over the button

    ADC File3.PNG

    If you want to you can drop an icon file for your chosen program into the folder and change the name here to be the same.

    ADC File2.PNG

    Lastly you need the “Identifier” value. For your first add-on you can use the number as it is but any further buttons you create will need their own unique number. For the identifier I recommend using this website. Ignore the settings and just click on the generate button. Then copy and paste:
    https://www.guidgenerator.com/online-guid-generator.aspx Make sure when copying and pasting you keep the braces '{' and '}'.

    ADC File4.PNG
    Save and close your file.

    So you now have in your folder:
    • A shortcut to your desired program renamed to External
    • ExternalAddOn.dll
    • The modified {add-on name}.adc file
    • The desired icon file {add-on name}.ico
    Move the folder to C:\Program Files\Alibre Design\Program\Addons and start Alibre

    Open a part and go to the Add-On tab where your new button should be showing.

    Building a Webpage Launcher Addon

    Grab a copy of MyWebpage.zip from below and unpack the folder to the desktop.

    Rename the folder to reflect the webpage you want to open.

    The webpage launcher is set up in the same way except the file ExternalUrlAddOn.dll is used and instead of a program shortcut, an internet shortcut is used. Open your browser to the desired webpage, highlight the web address and then drag it to the desktop or folder to get an internet shortcut. Once again the internet shortcut MUST be renamed to External


    Edit the .adc file and icon as in the first example.

    ADC File5.PNG

    The webpage will be opened in your default browser.

    Getting Icons

    You can grab the icon from a program by using a simple free utility called IconsExtract https://www.nirsoft.net/utils/iconsext.html There are instructions on the page.

    To get an icon for a web page I used the snipping tool built into windows to get part of a web page or googled a suitable logo image. I then used the free program Greenfish Icon Editor Pro http://greenfishsoftware.org/ to import the image, convert it to an icon and then save it as an .ico file.

    The attached zip files are ready made folders for you to use as a starter for your own buttons.


    Attached Files:

    Last edited: Nov 11, 2017
    cadtec and NateLiqGrav like this.
  2. ajayre

    ajayre Senior Member

    albie0803 likes this.
  3. albie0803

    albie0803 Alibre Super User

    Thanks Andy for the input, I've pasted it into the tutorial.
  4. NateLiqGrav

    NateLiqGrav Alibre Super User

    albie0803 I'm having trouble with the Program Launcher example. I get the attached error msg. I followed your steps and can't get it to work. I even simplified it by trying to just open Calc with the shortcut labeled External.

    Attached Files:

    Last edited: Nov 26, 2017
  5. NateLiqGrav

    NateLiqGrav Alibre Super User

    BTW I did get the Webpage one to work flawlessly. Thanks
  6. albie0803

    albie0803 Alibre Super User

    Umm... I have no idea. Could you please zip up the addon folder you made and I will have a look.
  7. NateLiqGrav

    NateLiqGrav Alibre Super User

    Ok, according to the instructions this is supposed to open Calc on Windows 7.

    Attached Files:

  8. albie0803

    albie0803 Alibre Super User

    I unzipped the folder into C:\Program Files\Alibre Design\Program\Addons and loaded Alibre. The button showed and worked first go, so I have no idea. Sorry I can't help. I don't even know if the message you got is a windows or Alibre message. All I can say is it works on my win10.
    Hopefully someone else will try it and report on how it goes.
  9. NateLiqGrav

    NateLiqGrav Alibre Super User

    Well I haven't updated my Alibre on my home PC since v2017. I'll let you know if that fixes it.
    For the time being I got the Webpage one to open an .exe by using the url format for a local file: For example "file:///C:/Windows/system32/calc.exe"

Share This Page