PMFJI, MicroStationAPI has provided a perfect approach to append XAttributes to a model or file (independent of any specific element). For example,
ApplicationSettings fileSettings = IMstnSettings::GetCurrentSettings().GetFileApplicationSettings(ACTIVEMODEL);
XAttributeHandlerId handlerId (XATTRIBUTEID_MyMajorId, XATTRIBUTEID_FileParams);
fileSettings.SaveSetting(handlerId, 1, &fileParams, sizeof(FileParameters));
Unfortunately, these C++ objects are incovenient to use directly by C#. They can be directly used by C++/CLI if you like to write MicroStation Addin applications.
Regards, YongAn