Inventor AddIn problem: It can't AddButtonDefinition

Inventor AddIn problem: It can't AddButtonDefinition

todorovicDNSSU
Explorer Explorer
391 Views
2 Replies
Message 1 of 3

Inventor AddIn problem: It can't AddButtonDefinition

todorovicDNSSU
Explorer
Explorer

Hello, 

I work on new Inventor AddIn development. 
I add Tab and Panel on "ZeroDoc" Ribbon, and I add one Button, for test. It worked properly. 

Now, I add more panels and ButtonDefinitions. 
For new Buttons it can't add ButtonDefinitions. 
Detail on screenshoot on link: https://prnt.sc/xy6dV9EmyIJH

All ButtonDefinitions are declared in StandardAddInServer class, not in Activate() Methode. 

What could be the problem?
I haven't had this problem before in other AddIns development. 

Thanks. 
Slavisa

0 Likes
Accepted solutions (1)
392 Views
2 Replies
Replies (2)
Message 2 of 3

Frederick_Law
Mentor
Mentor
Accepted solution

Not sure.

I setup buttons in Sub Activate().

Add them to Ribbon in Sub RibbonSetup() if it's "firstTime".

AddinButton-01.jpg

 

Maybe those buttons were added already?

Try unload the addin.

0 Likes
Message 3 of 3

todorovicDNSSU
Explorer
Explorer

@Frederick_Law wrote:

Maybe those buttons were added already?

 


Yes, 
I copy/paste ButtonDefinition-s lines from another AddIn, since I have the same workflow in new AddIn. 
But InternalName of ButtonDefinition must be unique. 
I change InternalName strings for new Buttons and it works now. 

Thank you!
Regards, 
Slavisa

0 Likes