private void backgroundWorker_DoWork(object sender, DoWorkEventArgs e)
{
Dictionary<long, SEntity> old = this.m_instances;
long lid = this.m_lastid;
try
{
// build dictionary to map IFC type name to entity and schema
Dictionary<string, DocObject> mapEntity = new Dictionary<string, DocObject>();
// build dictionary to map IFC type name to schema
Dictionary<string, string> mapSchema = new Dictionary<string, string>();
this.BuildMaps(mapEntity, mapSchema);
string path = Properties.Settings.Default.OutputPath;
// swap out instances such that constructors go to different cache
this.m_instances = new Dictionary<long, SEntity>();
this.m_lastid = 0;
DocumentationISO.Generate(this.m_project, path, this.m_instances, mapEntity, mapSchema, this.m_publications, this.backgroundWorkerGenerate, this.m_formProgress);
// launch the content
foreach (DocPublication docPub in this.m_publications)
{
string relpath = path + @"\" + DocumentationISO.MakeLinkName(docPub);
System.Diagnostics.Process.Start(relpath + @"\index.htm");
}
}
catch (Exception ex)
{
this.m_exception = ex;
}
finally
{
this.m_instances = old;
this.m_lastid = lid;
}
}