Hi.
You can use the AddByValue method. Few examples below:
Dim oDoc As PartDocument = ThisDoc.Document
oDoc.ComponentDefinition.Parameters.UserParameters.AddByValue("myParam", 15, UnitsTypeEnum.kMillimeterLengthUnits)
oDoc.ComponentDefinition.Parameters.UserParameters.AddByValue("myParam2", 15, "mm")
oDoc.ComponentDefinition.Parameters.UserParameters.AddByValue("myParam3", 15, "ul")
The rule will create 3 numeric user parameters. Keep in mind that the length parameters are initially defined in "cm", so you will probably need to divide your value