Remove "languages engaged in generation" programatically

Gentlemen, 

i m just wondering how i can access the "languages engaged in generation" list of a model. Basically, i just have to clear that list in every project model i have. 

 

I wrote a plugin action, accessing MPSProject and all the models. 

 

 

However, i looked around to find an access to the languages, but found none ..... 

 

Any hint? 

 

Cheers,

Daniel

 

2
2 comments

You can access the languages engaged properties by using the following piece.


Collection<SLanguage> languagesEngagedOnGeneration = new ArrayList<SLanguage>(((SModelBase) smodel).getLanguagesEngagedOnGeneration());

foreach l in languagesEngagedOnGeneration {
((SModelBase) smodel).removeEngagedOnGenerationLanguage(l);
}

 

For further reference, visit Vaclav's Voice menu demo. https://github.com/vaclav/voicemenu 

0

Hi Nandha,

 

thanks a lot for your recommendation! Works as expected  .. 

 

1

Please sign in to leave a comment.