## Generated Code

The UI Designer related files consist of *.RSS, *.RSSI, *.HRH, *.LOC, *.LXX, and *.RLS files. These files may be edited, but designer-generated resources, strings, and #include statements should not be renamed or removed.

New resources and #include statements may be added freely.

You may add initializers for otherwise unhandled fields of RESOURCE statements or expressions, but any that the designer handles will be replaced on save to match the contents of the design. The designer does not have "two-way" support in this regard. Check whether the object supports the properties you need, and edit those first, before resorting to editing RSS.

The designer allows, and is aware of, edits to existing strings in .LOC, .LXX, and .RLS files. Existing #define directives or rls_string statements may be edited, and these changes will be reflected back in the model (immediately, if the design is open in an editor, or upon opening the design). New strings may be added but are not otherwise visible in the designer. Strings should not be renamed, since the designer will write back the names with the old values on the next save. Note: only strings stored in the correct format for the expected file extensions are recognized (.LXX files contains #define, not .LOC; and .RLS contains rls_string, not macros)

To remove generated resources, delete the appropriate object from the design, or take ownership of an .RSSI file by removing the design from the UI Designs page of the Application Editor. Otherwise, deleted resources will be regenerated on save.

The designer will replace #include "....rssi" statements in the primary .rss file whenever the application design is saved. To avoid conflicts, when adding custom resource #include statements, or when resurrecting a removed design's resources, be sure to use a different suffix from .rssi or use a system #include statement ( #include <...>).

In generated C++ sources, certain regions of code are marked with block comments of the form "// [[[" and "// ]]]". These sections are important to the source generator and must not be deleted. The comments themselves should never be modified, although variations in spacing are tolerated, for example by a source formatting program. The following shows how these regions may appear in a source file:

CHelloUIDAgainSettingItemList::~CHelloUIDAgainSettingItemList()
{
// [[[ begin generated region: do not modify [Generated Contents]
// ]]] end generated region [Generated Contents]
}

If the first comment of a region says "do not modify!", such regions are considered "owned" by the designer. All edits within it will be lost upon the next save.

Other such regions are used for placement of new code (i.e., methods, base classes), and their contents may be edited. User edits are allowed outside any such comments. If such sources contain syntax errors, further UI design save operations may corrupt the source.

##### Related tasks

- Generated File Tasks

##### Related references

- Generated Files