Dynamically Load Assemblies

You can dynamically switch window, visual object, menu, and some other objects defined in different PB assemblies at runtime. There are three new system functions in PowerBuilder .NET to allow this: AddAssemblyReference, SetAssemblyReference and GetAssemblyReference.

These system functions enable you to add a reference to a PowerBuilder assembly deployed by PowerBuilder .NET at runtime. After adding a reference, all types defined in it can be consumed at runtime. Types in the referenced assembly cannot be directly used to define a variable, a return value, or a parameter. Types are typically used in some system functions as a string parameter where the value is the datatype you want to create.