SW Thickness Property

Hi! Does anyone have a macro that writes the thickness property of a sheet metal part as a custom property, or if the part is not made out of sheet metal it lets you pick a dimension to link as thickness?

Thanks!

SolidworksApi macros