Hi @alexander.naljot. Here is an example of an iLogic rule that you can use on a part document to find/get a named face, then get its area, then convert its units from default 'database' units (centimeters squared) to document units, then write that value to a custom iProperty. I just tested it in one of my parts, and it worked OK, but you may need to change the name I am specifying for the Face to match yours. I don't think my keyboard puts the two little dots over the letter "a", like what is shown in your image. Then, as I said before, try putting this rule under the "Part Geometry Change" event in the Event Triggers (and/or the "Any Model Parameter Change" event, if necessary).
If ThisDoc.Document.DocumentType <> DocumentTypeEnum.kPartDocumentObject Then
MsgBox("A Part Document must be active for this rule to work. Exiting.", vbCritical, "")
Exit Sub
End If
Dim oPDoc As PartDocument = ThisDoc.Document
Dim oNEs As NamedEntities = iLogicVb.Automation.GetNamedEntities(oPDoc)
'<<<< CHANGE THIS NAME, IF IT DOES NOT MATCH YOUR FACE NAME >>>>
Dim sFaceName As String = "Stirnflache"
Dim oMyFace As Face = oNEs.TryGetEntity(sFaceName)
If IsNothing(oMyFace) Then
MsgBox("No Face named " & sFaceName & " was not found.", vbCritical, "Face Not Found")
Exit Sub
End If
Dim oArea As Double = oMyFace.Evaluator.Area
'convert units from 'database' units (centimeters squared) to document units
Dim UOM As UnitsOfMeasure = oPDoc.UnitsOfMeasure
If UOM.LengthUnits <> UnitsTypeEnum.kDatabaseLengthUnits Then
DLU = UOM.GetStringFromType(UOM.LengthUnits)
oArea = UOM.ConvertUnits(oArea, "cm^2", DLU & "^2")
End If
'now write this value to the custom iProperty
Dim oCProps As PropertySet = oPDoc.PropertySets.Item("Inventor User Defined Properties")
Dim oAreaProp As Inventor.Property = Nothing
Try
oAreaProp = oCProps.Item(sFaceName & " Area")
Catch
oAreaProp = oCProps.Add(oArea, sFaceName & " Area")
End Try
If oAreaProp.Value <> oArea Then oAreaProp.Value = oArea
If this solved your problem, or answered your question, please click ACCEPT SOLUTION .
Or, if this helped you, please click (LIKE or KUDOS) 👍.
Wesley Crihfield

(Not an Autodesk Employee)