[Inventor] 使用iLogic抑制装配体中的零件

JUMU实名认证 发表于 2021-06-17 21:58 | 显示全部楼层 | 复制链接分享      上一主题  翻页  下一主题
Setting the Level of Detail with iLogic

iLogic requires a custom Level of Detail (LoD) before it can perform an operation that suppresses a component. If a custom LoD is not active or one does not exist you will get an error message. I get a lot of enquires about this dialog box and how one can avoid the hassle.

First create a rule called “LoD” and populate with the following code:

  1. Dim doc as AssemblyDocument = ThisDoc.Document
  2. Dim oLOD As LevelOfDetailRepresentation
  3. Dim oAsmCompDef As ComponentDefinition
  4. oAsmCompDef = doc.ComponentDefinition

  5. Try
  6.    oLOD = oAsmCompDef.RepresentationsManager.LevelOfDetailRepresentations.Item("iLogic").Activate(True)
  7. Catch

  8.    Dim nLOD As LevelOfDetailRepresentation
  9.    nLOD = oAsmCompDef.RepresentationsManager.LevelOfDetailRepresentations.Add("iLogic")
  10.    oLOD = nLOD
  11. Finally
  12.    oLOD = oAsmCompDef.RepresentationsManager.LevelOfDetailRepresentations.Item("iLogic").Activate(True)
  13. End Try




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

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