Ia loading multiple step files into the model, but they are not visible. However when loading the step files one by one, they are visible. What is the problem...
protected override void OnLoad(EventArgs e)
{
List<ReadSTEP> stp_list = new List<ReadSTEP>();
string Path = @"----directory----";
System.IO.DirectoryInfo di = new System.IO.DirectoryInfo(Path);
foreach (var item in di.GetFiles())
{
stp_list.Add(new ReadSTEP(item.Name));
}
for (int i = 0; i < stp_list.Count; i++)
{
if (true)
{
stp_list[i].DoWork();
stp_list[i].AddToScene(model1);
Trace.WriteLine(stp_list[i].FileName + " is loaded");
}
}
model1.Invalidate();
model1.ZoomFit();
}