A simple example to start with for a spline is to extrude a cut and pattern it around the axis of a shaft. Once you have the features created go to the Tools tab and select UDF Library in the Utilities section. When you select Create Creo will ask you to specify a name, whether you want the UDF to be stand alone or subordinate, stand alone will ask if you want to include reference part, select features to be part of the UDF, specify reference prompts, and specify optional items. When you select OK if you have made the UDF subordinate it will save the model, this model is required in order to use the UDF. If you have made it stand alone with include reference model it saves a model file with the name UDF-name_GP.prt where UDF-name is name for the UDF you specify during creation of the UDF, the part file is needed so you can view the reference model when you are selecting references. However, it is not required for the stand alone UDF to work, if you were to delete the file the UDF still works you just wouldn't be able to view the reference model during reference selection for UDF placement. The reference prompts are for any references that were specified for creating the features that are part of the UDF. For an axis pattern of the splines you have an Axis prompt, for the extrude cut you have the Placement Plane and two Orientation Planes which correspond to the references used to setup the extrude sketch, and you also might have other references if they were specified during feature creation such as the shaft surface.