diff --git a/PROMS/DataLoader/DocVersions.cs b/PROMS/DataLoader/DocVersions.cs index 0fa947ae..a6bc597e 100644 --- a/PROMS/DataLoader/DocVersions.cs +++ b/PROMS/DataLoader/DocVersions.cs @@ -94,7 +94,7 @@ namespace DataLoader log.InfoFormat("Completed Migration of {0}", pth); //MessageBox.Show("Completed Migration of " + pth); //jsj commented out to let it run through - if (rofstinfo != null) rofstinfo.ROFSTLookup.Close(); + if (rofstinfo != null) rofstinfo.GetROFSTLookup(DocVersionInfo.Get(docver.VersionID)).Close(); dicTrans_ItemDone.Clear(); dicTrans_ItemDone = null; } diff --git a/PROMS/DataLoader/RefObjs.cs b/PROMS/DataLoader/RefObjs.cs index 0aea15a7..3c645dc9 100644 --- a/PROMS/DataLoader/RefObjs.cs +++ b/PROMS/DataLoader/RefObjs.cs @@ -73,9 +73,10 @@ namespace DataLoader RoUsage ro = RoUsage.MakeRoUsage(content, ROID, null, DateTime.Now, "Migration", rodb); try { - ROFSTLookup.rochild myro = rofstinfo.ROFSTLookup.GetRoChild12(ROID.ToUpper()); + ROFSTLookup mylookup = rofstinfo.GetROFSTLookup(DocVersionInfo.Get(docver.VersionID)); + ROFSTLookup.rochild myro = mylookup.GetRoChild12(ROID.ToUpper()); rotype = Math.Max(rotype, myro.type); - string roval = rofstinfo.ROFSTLookup.GetTranslatedRoValue(ROID.ToUpper(), conv_caret); + string roval = mylookup.GetTranslatedRoValue(ROID.ToUpper(), conv_caret); if (textm[tok] == '\x3a6' && roval.IndexOf('\n')>-1) // figure - just get image name { roval = roval.Substring(0, roval.IndexOf('\n')); diff --git a/PROMS/DataLoader/RoFst.cs b/PROMS/DataLoader/RoFst.cs index 74f1530b..16a1d674 100644 --- a/PROMS/DataLoader/RoFst.cs +++ b/PROMS/DataLoader/RoFst.cs @@ -100,14 +100,15 @@ namespace DataLoader rofst.Dispose(); // Now load any images in... type 8: // Intergrated Graphics RO type - if (rofstinfo.ROFSTLookup != null) + ROFSTLookup mylookup = rofstinfo.GetROFSTLookup(DocVersionInfo.Get(docver.VersionID)); + if (mylookup != null) { - for (int i = 0; i < rofstinfo.ROFSTLookup.myHdr.myDbs.Length; i++) + for (int i = 0; i < mylookup.myHdr.myDbs.Length; i++) { // walk through the rofst 'database' searching for // all nodes that are integrated graphics, i.e. type 8. - if (rofstinfo.ROFSTLookup.myHdr.myDbs[i].children != null) - MigrateRoFstGraphics(roDbpath, rofstinfo.ROFSTLookup.myHdr.myDbs[i].children, rodb); + if (mylookup.myHdr.myDbs[i].children != null) + MigrateRoFstGraphics(roDbpath, mylookup.myHdr.myDbs[i].children, rodb); } } ROImageInfo.FlagImagesZipped();