//Create a Store
Type[] modelTypes = new Type[] { typeof(CoreDesignSurfaceDomainModel), typeof(FEGeneratorDomainModel) };
Store store = new Store(modelTypes);
RootElement root;
using (Transaction t =
store.TransactionManager.BeginTransaction("Create Elements"))
{
root = FEGeneratorSerializationHelper.Instance.LoadModel(store, diagramPath, null, null);
t.Commit();
}
//Do whatever custom things you want!
SerializationResult result = new SerializationResult();
//Save the file
FEGeneratorSerializationHelper.Instance.SaveModel(result, root, diagramPath);
Luis Filipe
2008-11-12 19:02:30