[Inventor]
                                                                    iLogic自动运行子装配中的规则
            
            
            
                    
        
        
        
        
            
        
                             
            
                
 
 
 
规则是可以监视并控制其他 Inventor 参数、特征或零部件的 Visual Basic (VB.NET) 小程序。 
iLogic 将规则作为对象直接嵌入到零件、部件和工程图文档中。规则可确定并驱动设计参数和属性值。通过控制这些值,您可以定义模型属性、特征及零部件的行为。 
 
使用如下代码… 
- iLogicVb.UpdateWhenDone = True
 
 - Dim oAsm As AssemblyDocument = ThisDoc.Document
 
 - For Each oRefDoc As Document In oAsm.AllReferencedDocuments
 
 -          If oRefDoc.DocumentType = DocumentTypeEnum.kPartDocumentObject AndAlso _
 
 -                  oAsm.ComponentDefinition.Occurrences.AllReferencedOccurrences(oRefDoc).Count > 0
 
 -                  On Error Resume Next
 
 -                  iLogicVb.Automation.RunRule(oRefDoc, "iLogic_rule")
 
 -         End If
 
 - Next
 
  复制代码 
 |   
	
                
 
 
 
 | 
| 
        
        
        
        
        
        
 | 
| 
 | 
| 
 |