mikaso
Mechanical
- Apr 14, 2006
- 4
Hi all,
I wanted to write some function which starts with opening of part then it do somethink and finish with SaveAs. But during SaveAs method I recieve for some parts exception with meassage "Invalid part tag", errorcode is 641018. I don't have any idea what does it mean
Code:
foreach (string path in partlist)
{
try
{
session.ListingWindow.WriteLine(System.DateTime.UtcNow.ToShortTimeString() + @": " + partlist.IndexOf(path) + @" : " + System.IO.Path.GetFileName(path));
dp = session.Parts.Open(path, out pls);
dp.SaveAs(conf.TargetPath + @"\" + System.IO.Path.GetFileName(path));
}
catch (Exception e)
{
session.ListingWindow.WriteLine(e.Message);
}
finally
{
if (dp != null)
{
dp.Close(BasePart.CloseWholeTree.True, BasePart.CloseModified.CloseModified, null);
}
}
}
I wanted to write some function which starts with opening of part then it do somethink and finish with SaveAs. But during SaveAs method I recieve for some parts exception with meassage "Invalid part tag", errorcode is 641018. I don't have any idea what does it mean
Code:
foreach (string path in partlist)
{
try
{
session.ListingWindow.WriteLine(System.DateTime.UtcNow.ToShortTimeString() + @": " + partlist.IndexOf(path) + @" : " + System.IO.Path.GetFileName(path));
dp = session.Parts.Open(path, out pls);
dp.SaveAs(conf.TargetPath + @"\" + System.IO.Path.GetFileName(path));
}
catch (Exception e)
{
session.ListingWindow.WriteLine(e.Message);
}
finally
{
if (dp != null)
{
dp.Close(BasePart.CloseWholeTree.True, BasePart.CloseModified.CloseModified, null);
}
}
}