Delete workpoints and workaxis using API
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Hello,
I am trying to delete the work points but getting an unspecified error in the delete line.
public static void DeletePoints(string wpoint)
{
AssemblyComponentDefinition assCompDef = assyDoc.ComponentDefinition;
for (int i = 1; i <= assCompDef.WorkPoints.Count; i++)
{
try
{
if (assCompDef.WorkPoints[i].Name== wpoint)
{
assCompDef.WorkPoints[i].Delete();
}
}
catch (Exception)
{
}
}
}
Thanks in advance.
