AddIn active in wrong environment

Legend
Legend

Hello everybody,

 

i wrote a small addin which is setting some properties to String.Empty when using the "save as" or "replace with copy" command. The addin is only registered for asm, par and psm environment.

CleanCopy.jpg

When i save a draft with "save as" the addin is also execute.

Can anybody reproduce this behavior?

 

Greetings from Germany

 

Christian

 

Greetings from Germany
Christian Kunkel
https://c-k-m.info
2 REPLIES

Re: AddIn active in wrong environment

Solution Partner Phenom Solution Partner Phenom
Solution Partner Phenom

Hello Christian, I think this is correct.

I assume you are using the applivation events to do the job,

These are fired independent of the current environment.

When you register the addin for an environment just means that it is initalized when this environment is started the first time after Solid Edge Application start.

If your addin hooks to application events when for example the Part envonment is started, then the event sink is called also when a Draft document is saved.

So your addin must check the document type at the start of the event handler.

You will experience that your event handler is not called if you start Solid Edge and open a Draft document and execute save as.

 

Regards Jürgen

regards

JB
VS2015, SE ST10

Re: AddIn active in wrong environment

Legend
Legend

Hello Jürgen,

 

this is exact what i see here. I thought, the addin would be inactive for not registered environments.

Thanks for your reply

 

Greetings from Germany

 

Christian

Greetings from Germany
Christian Kunkel
https://c-k-m.info