The property outputs a GUID, if it is not null, but from that GUID, how can I get a filename?
Please refer here for property page: http://producthelp.sdl.com/SDK/ProjectAutomationApi/3.0/html/0597a5f6-ad63-7c89-01ad-27e846158bcb.htm
The property outputs a GUID, if it is not null, but from that GUID, how can I get a filename?
Please refer here for property page: http://producthelp.sdl.com/SDK/ProjectAutomationApi/3.0/html/0597a5f6-ad63-7c89-01ad-27e846158bcb.htm
This question might be very basic, but I still can't figure this out.
Can some one please help me figure out how I can get a name of the file that is generating a message via ExecutionMessage.ProjectFileId?
You can use GetFile method from FileBasedProject class. This method has a Guid parameter where you can specify ProjectFieldId value. The returned value its a ProjectFile which has a property Name which store the name of the file.
Hope this helps.
Romulus Crisan | Translation Productivity Development Manager | SDL | (twitter) @cromica_82 | (blog) http://www.romuluscrisan.com/
I think I found the answer.
If ExecutionMessage::ProjectFileId is not null
then input that into FileBasedProject::GetFile and then use ProjectFile properties.
Is this correct? Is there any better way?
Thank you!
Rieko
You are correct. I'm afraid this is the only way to get the filename.
Romulus Crisan | Translation Productivity Development Manager | SDL | (twitter) @cromica_82 | (blog) http://www.romuluscrisan.com/