This might serve. If it is metal sheet, add the field to the property (check that the unit "mm" is suitable) Then add the event for example before saving the document or before any change of the geometry.
Note that if the part is not metal sheet, it will erase the field. In case the part has been changed from metal sheet to normal part, then it will erase the field.
Dim doc As Document = ThisDoc.Document
Try
Dim oThick As Double = Round(doc.componentdefinition.thickness.value, 2)
iProperties.Value("Project", "Stock Number") = oThick & " mm"
Catch
iProperties.Value("Project", "Stock Number") = ""
End Try
I hope this works for your problem. Regards
Please accept as solution and give likes if applicable.
I am attaching my Upwork profile for specific queries.
Sergio Daniel Suarez
Mechanical Designer
| Upwork Profile | LinkedIn