This is really good question. The Attachments form control is quite specific because it needs to store multiple attachment GUIDs. These attachments are eventually stored in CMS_Attachment table and are linked to your page and field using the AttachmentDocumentID and AttachmentGroupGUID (points to guid of field where your attachments are stored) columns.
There is unfortunately to easy/built-in way how you could retrieve these attachments. What I would recommend to do is to create your own transformation method or macro that will programatically get these attachments so that you can work with them.
Following method will get you the attachments programatically:
public ObjectQuery<AttachmentInfo> GetAttachmentsFromField(string className, int documentID, string attachmentColumnName)
{
// get class info
var classInfo = new FormInfo(DataClassInfoProvider.GetDataClassInfo(className).ClassFormDefinition);
if (classInfo != null)
{
// get attachment field definition
var attachmentsField = classInfo.GetFormField(attachmentColumnName);
if (attachmentsField != null)
{
// get attachments strored in the field by GUID
var attachments = AttachmentInfoProvider.GetAttachments()
.WhereEquals("3CCC6E6C-56F3-42EB-8385-979973D99C55", attachmentsField.Guid)
.And()
.WhereEquals("AttachmentDocumentID", documentID);
return attachments;
}
}
return null;
}
And call it like:
string className = "cms.news"; // your page type class
string attachmentFieldColumnName = "MultipleAttachments"; // column name of document attachment control field
int documentID = 26; // test document where attachments are created
var attachments = GetAttachmentsFromField(className, documentID, attachmentFieldColumnName);