Add error handler for PSI failures.

Support appending to an existing Procedure Set
This commit is contained in:
Rich
2014-12-08 20:25:37 +00:00
parent 7511ebcd2c
commit 13d9350fdf
2 changed files with 53 additions and 37 deletions

View File

@@ -90,18 +90,24 @@ namespace DataLoader
rofst = ROFst.MakeROFst(rodb, ab, null, fi.LastWriteTimeUtc, "Migration");
}
// Next hook the rofst to the docversion using the associations table.
DocVersionAssociation dva = docver.DocVersionAssociations.Add(rofst);
AssociationConfig assoc_cfg = new AssociationConfig();
assoc_cfg.RODefaults_graphicsprefix = img_prefix;
assoc_cfg.RODefaults_setpointprefix = sp_prefix;
dva.Config = assoc_cfg.ToString();
docver.Save();
bool appending = false;
if (docver.DocVersionAssociationCount == 0)
{
DocVersionAssociation dva = docver.DocVersionAssociations.Add(rofst);
AssociationConfig assoc_cfg = new AssociationConfig();
assoc_cfg.RODefaults_graphicsprefix = img_prefix;
assoc_cfg.RODefaults_setpointprefix = sp_prefix;
dva.Config = assoc_cfg.ToString();
docver.Save();
rofst.Dispose();
}
else
appending = true;
rofstinfo = ROFstInfo.Get(rofst.ROFstID); // refresh the info record!
rofst.Dispose();
// Now load any images in... type 8: // Intergrated Graphics RO type
ROFSTLookup mylookup = rofstinfo.GetROFSTLookup(DocVersionInfo.Get(docver.VersionID));
if (mylookup != null)
if (!appending && mylookup != null)
{
for (int i = 0; i < mylookup.myHdr.myDbs.Length; i++)
{