public void Suppression(InventorDocument document, string component, string suppressed, SuppresionType suppresionType) { var status = suppressed.ToUpper() == "S"; try { switch (suppresionType) { case SuppresionType.Component: document.GetAssemblyDocument().Components.SetComponentStatus(component, status); break; case SuppresionType.Constraint: document.GetAssemblyDocument().Constraints.SetConstraintStatus(component, status); break; case SuppresionType.Pattern: document.GetAssemblyDocument().Patterns.SuppressPattern(component, status); break; case SuppresionType.Feature: document.SetFeatureStatus(component, status); break; } } catch (Exception ex) { LogManager.Add(ex.Message); } }
public void DeleteReferenced(InventorDocument document, string component) { try { document.GetAssemblyDocument().Components.DeleteComponents(component); } catch (Exception ex) { LogManager.Add(ex.Message); } }