Community
Inventor Programming - iLogic, Macros, AddIns & Apprentice
Inventor iLogic, Macros, AddIns & Apprentice Forum. Share your knowledge, ask questions, and explore popular Inventor topics related to programming, creating add-ins, macros, working with the API or creating iLogic tools.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Linking custom buttons on ribbon with rules in ipts etc

3 REPLIES 3
Reply
Message 1 of 4
Tony_Pepper
372 Views, 3 Replies

Linking custom buttons on ribbon with rules in ipts etc

Hi everyone,

I have been set the task of creating a bespoke corporate ribbon  for use in Inventor 2014 using VB 2010 Express.  So far I have managed to create the ribbon, complete with panels & custom buttons, but now finding myself needing a bit of assistance.

I now need to link these buttons to their individual operations, such as triggering a rule within the model  template, etc.  Whilst there seems to be bits and pieces of information available on the forum, they all assume that you are fully conversant with where the pieces of code needs to go in order for the action to work.

Unfortunately,  I am  a complete newbie when it comes to this, so can anybody direct me to where I can find a simple set of instructions as to how to do this in VB.Net so I can understand the logic involved.

Many thanks in advance

3 REPLIES 3
Message 2 of 4
humbertogo
in reply to: Tony_Pepper

If you want to run a rule from .net

Look at here

Message 3 of 4

It's a kind of open question you are asking ... If you are a newbie with the Inventor API, start by learning the basics. When we post code samples, we don't want to assume people have no prior knowledge about the API.

 

Here is a resource that exposes the basics:

 

http://usa.autodesk.com/adsk/servlet/index?siteID=123112&id=17324828

 

We have also posted tutorials along with multiple code samples broken down into multiple modules, for example you can look at the User Interface module to have a better understanding about how to create ribbon items:

 

https://github.com/ADN-DevTech/Inventor-Training-Material

 

You can also find multiple resources on our blogs:

 

http://adndevblog.typepad.com/manufacturing/

 

http://modthemachine.typepad.com/

 

As humberto pointed out, once you have a button, you can fire a rule using the API.

 

Regards,

Philippe.

 

 

 



Philippe Leefsma
Developer Technical Services
Autodesk Developer Network

Message 4 of 4

Hi Guys

thanks for your prompt responses.

I have worked through the tutorials you sent the link to and got the buttons to call the button execution sub routines, as this was fairly straightforward with the button selection and "click" option on the top of the text screen. However, when trying to link the subs to the ribbon button, these options are not available.

The ribbon, panels, and buttons that I have created currently work when calling up a message box, but I am still unsure as to what the equivalent command is to call the button click sub outine.   A typical button declaration and call I am using is as follows:

 

 '"DRAWING TOOLS" PANEL BUTTON 1 CREATION

 

 'Delaration of "Drawing Tools" Button 1 Icon

 Dim icon5S As New Icon(GetType(AddinGlobal), "idw16x16.ico") 'ICO embedded

 Dim icon5L As New Icon(GetType(AddinGlobal), "idw32x32.ico") 'ICO embedded

 

 'Delaration of "Drawing Tools" Button 1

 Dim button5 As New InventorButton("IDW Creator", "Ruskin.InventorAddin.RAML_Panel3_Button1", "Button 1 description", "Button 1 tooltip", icon5S, icon5L, CommandTypesEnum.kEditMaskCmdType, ButtonDisplayEnum.kAlwaysDisplayText)

button5.Execute = Function() MessageBox.Show("This will create a new drawing!", "Test Message")

 

Hopefully you can now understand what I am trying to achieve and point me in the right direction.

If you wish to see the full code I am using, see my attachment

Thanks in advance,

Tony

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Autodesk Design & Make Report