Inventor Customization

Inventor Customization

Reply
Mentor
TONELLAL
Posts: 162
Registered: ‎01-17-2010
Message 1 of 3 (127 Views)
Accepted Solution

Need to reload an addin for each file

127 Views, 2 Replies
02-13-2013 07:39 AM

Hello,

I have an addin which displays a form, then when I clic a button operations are launched.

The form is no modal, so I display it, select objects, apply, selct objects, apply,... then close the form with another button (form.close).

All functions, but only on the first opend file : I open the file, use the addin, close the form. I open another file, the addin is always loaded, but when I clic on the icon to display the form nothing happens... I have to unload the addin and reload it.

Where is the problem ?

 

 

I thought it was something like that...

 

The Onexecute event is only :

Sub oRibbonButton_NewButton_OnExecute(....)

    form.Show()

EndSub

 

BUT...

...the form is not delared in the sub. I moved the declaration in the sub, it seems to be right !

Mentor
krieg
Posts: 176
Registered: ‎11-22-2009
Message 2 of 3 (119 Views)

Re: Need to reload an addin for each file

02-13-2013 12:08 PM in reply to: TONELLAL

Hello

 

I think with form.close the form is destroyed, so a form.show later won't work. Try from.hide instead form.close.

Mentor
TONELLAL
Posts: 162
Registered: ‎01-17-2010
Message 3 of 3 (107 Views)

Re: Need to reload an addin for each file

02-14-2013 02:06 AM in reply to: krieg

I thought it was something like that...

 

The Onexecute event is only :

Sub oRibbonButton_NewButton_OnExecute(....)

    form.Show()

EndSub

 

BUT...

...the form is not delared in the sub. I moved the declaration in the sub, it seems to be right !

Post to the Community

Have questions about Autodesk products? Ask the community.

New Post
Announcements
Do you have 60 seconds to spare? The Autodesk Community Team is revamping our site ranking system and we want your feedback! Please click here to launch the 5 question survey. As always your input is greatly appreciated.