4D v18 R5 introduces a new method that allows custom functions to be added to a 4D View Pro with the VP SET CUSTOM FUNCTIONS command. The command does have some requirements to use it properly.
The command targets a specific 4D View Pro area object, and must be applied before the object is "ready" (On VP Ready). Thus the command has to be applied on the containing Form's On Load event, however this also means that new custom functions cannot be added on the fly without reloading the 4D View Pro area.
Something else to keep in mind is that only one formula object can be applied to the 4D View Pro object with the latest/last one applied taking priority replacing any prior formula objects. This does not mean that only one function can be applied, as the formula object can contain multiple functions.
To properly use the command some forsight and planning is needed, all of the required functions need to be built into a single formula object and then applied to the specific 4D View Pro area object through the containing form's On Load event.