Project Automation API - setting the file role to translatable, reference etc. does not seem to work

Hi all,

I have this vb.net code that should apply the "translable" file role to my project files, however, after calling the function, the file role is still set to "unknown". I guess this is a bug in the API or is it my code?

I basically do this:

Dim NewProjInfo As New ProjectInfo
Dim NewProj As FileBasedProject = New FileBasedProject(NewProjInfo, ProjTemplate)
Dim SourceFiles() As ProjectFile = New ProjectFile() {}

SourceFiles = NewProj.GetSourceLanguageFiles()

NewProj.SetFileRole(SourceFiles.GetIds, Sdl.ProjectAutomation.Core.FileRole.Translatable)

Many thanks for any idea why this does not work.

Cheers, Tom