[Inventor] 使用iLogic删除已抑制的装配体中的零部件

JUMU实名认证 发表于 2021-06-17 22:00 | 显示全部楼层 | 复制链接分享      上一主题  翻页  下一主题
Here's how to do it, ignoring occurrences in patterns.
  1. Trace.WriteLine("   Starting....")

  2. Dim oComp As ComponentOccurrence
  3. Dim oComps As ComponentOccurrences

  4. oComps = ThisDoc.Document.ComponentDefinition.Occurrences

  5. For Each oComp In oComps
  6. If oComp.Suppressed Then
  7. Trace.WriteLine(oComp.Name + " is suppressed")
  8. If Not oComp.IsPatternElement Then         
  9. oComp.Delete
  10. End If
  11. Else
  12. Trace.WriteLine(oComp.Name + " NOT suppressed")
  13. End If
  14. Next
复制代码


  距米网  

找到您想要的设计

工程师、学生在线交流学习平台
关注我们

手机版- 距米网 |苏公网安备32041102000587号

© 2017-2024 常州居居米智能技术有限公司 苏ICP备18040927号-1