This keyword loads another generation template for processing. After the loaded template has been processed, control returns to the point in the calling template immediately after the %load statement.
The called template can be preceded by a relative path, that is, a path relative to the folder in which the generation template making the call resides. When specifying a relative path, you must use the '\\' escape code to specify a backslash. For example:
%load "..\\..\\HasStereotype.sdl"
The path in which the Generate.sdl template resides is recorded through the sysSchemeDirectory system variable.
Parameters can be passed to the called generation template through the %param keyword. The %param keyword can pass a local variable to the called generation template. The called generation template can get the value of the passed parameter through the %getparam keyword and set the value of the passed parameter through the %setparam keyword.
In this example, the PackageName.sdl template is loaded and processed.
%load "PackageName.sdl"
Example 7. %load with parameters
In this example, the GetRelativePathDots.sdl generation template is loaded and processed. The GetRelativePathDots.sdl is passed the strDots local variable as a parameter.