Announcements
Attention for Customers without Multi-Factor Authentication or Single Sign-On - OTP Verification rolls out April 2025. Read all about it here.

Error in rule member not found?

Anonymous

Error in rule member not found?

Anonymous
Not applicable

Hi All,

I tried to get mass of sub assembly and then copy to iproperties. But I get an error message like this:

 

error.jpg

Here is the iLogic code I used:

 

Dim openDoc As Inventor.Document

Dim docFile As Inventor.Document

Dim FNamePos As Long

Dim docFName As String

 

 

DrawingDoc = openDoc

openDoc = ThisApplication.ActiveDocument

 

For Each docFile In openDoc.AllReferencedDocuments

 

'change project iproperty in all sub-assembly files of opened assembly

If docFile.DocumentType = kAssemblyDocumentObject   Then

      

       FNamePos = InStrRev(docFile.FullFileName, "\", - 1)

       docFName = Mid(docFile.FullFileName, FNamePos + 1, Len(docFile.FullFileName) - FNamePos)

                 

       iProperties.Value(docFName,"Custom", "iMass") = Round(docFile.ComponentDefinition.MassProperties.Mass,2)  

End If

 

Next

 

iLogicVb.UpdateWhenDone = True

 

Any Suggestions?

Thanks.

0 Likes
Reply
309 Views
0 Replies
Replies (0)