Add error handler for PSI failures.
Support appending to an existing Procedure Set
This commit is contained in:
@@ -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++)
|
||||
{
|
||||
|
Reference in New Issue
Block a user