The Design Import option allows you to create GeneXus objects from a user interface design made with a designer tool (like Figma or Sketch).
In order to achieve a good result, the designer must follow specific design guidelines and best practices.
From the GeneXus toolbar, go to Tools and select the Design Import option.
Once the dialog is opened, the settings for importing a new design file will be displayed.
Used for linking or selecting a design file from a file system using the Select File button.
Keep in mind that:
- Local files must have any of these extensions:
○ |
.sketch |
○ |
.gxsketch |
○ |
.sketchcloud |
○ |
.gxsketchcloud |
- Remote file links must reference any of these domains:
○ |
www.figma.com/file/* |
○ |
Any publicly accessible file link, downloadable via a GET request (e.g., https://files.genexus.com/pub/TravelAgencySample.gxsketch). For more information, see the FAQ and Troubleshooting article. |
Used for entering a service access token when importing design files from tools that require authentication (like Figma access token).
Used for indicating the Design System Object name where tokens and styles will be created. You can either type a custom name for creating a new object or select an existing Design System object from the Knowledge Base. If this field is left empty, GeneXus will suggest a new name based on the name of the design file that is being imported.
Used for indicating the Module object where the objects will be created. By default, objects are placed in the Root module.
Note that using a dedicated module for the imported objects helps avoid naming conflicts with existing objects in other modules, thus preventing accidental overrides.
Used for indicating whether to create a Web Panel object (when selected) or a Panel object (when cleared) for each screen in the design file.
Keep in mind that:
- Panel objects are meant for both Mobile and Angular applications.
- Multi-experience apps (with mobile and desktop variants) must follow the Multiple Layout conventions.
- When importing your design as Panel objects, a Menu object will also be created for navigation purposes.
Used for indicating whether to fit images within the preview section (when selected) or to retain their original size (when cleared), adding a scrollbar for better visualization.
Used for selecting a design file from your file system. The Path/URL/File option will automatically be updated once a file is selected.
Once the Path/URL/File option is set, either by selecting a file in the file system or by manually entering a file link, the button’s caption will change to “Load File”.
By clicking on the “Load File” button, GeneXus will start loading your design file for inspection. It will display a sequence of progress messages and keep its full trace visible for any errors that may be raised.
Finally, you will be able to see the preview section, which displays what GeneXus has inferred from your design file before actually creating objects in the Knowledge Base. At this stage, the button’s caption will change to "Reload File" (as shown in the following section), enabling you to refresh the preview content.
After loading a design file, GeneXus displays a preview of the objects that will be imported.
Note: Inspecting the preview dialog is strongly recommended to identify potential issues before importing your design file. Such issues may include missing control conventions, inconsistencies in naming conventions, excessive layer nesting, missing assets, or any other details that may have a negative impact on the project maintenance, object generation, or runtime execution of the application.
The preview screen is divided into two main sections:
- On the left side, it displays a tree structure of the objects to be imported.
- On the right side, it displays contextual information for the selected item, organized in tabs.
You can select or deselect objects in order to customize what objects are going to be imported into the Knowledge Base. Please note that the dialog does not currently validate dependencies between the objects to be imported; therefore, proceed with caution when deselecting items as it may result in import errors.
Panels or Web Panels node
Lists every Panel object or Web Panel object to be created, depending on the value of the Import as Web Panels checkbox.
Contextual information includes:
When the Import as Web Panels checkbox is cleared, and the design adheres to the Multiple Layouts conventions, Panels may include nested Panels representing their layout variations. These variations are indicated with proper suffixes for identification, such as (Web), (Phone), (Phone Landscape), etc.
Stencils node
Same as Panels or Web Panels node but listing every Stencil object. These objects will be created in the Knowledge Base under a “Stencil” folder object.
Lists every Image object to be created.
Contextual information includes:
- Composition
A preview of the selected image is displayed here with its original size if the Fit Image checkbox is cleared.
If the design file includes images with resolution variations (e.g. 1x, 2x, 3x, etc.), the base resolution image will define the object's names in the Knowledge Base and the variations will be nested in the tree view.
Lists every font File object to be created.
Contextual information includes:
- Composition
A preview of the selected font is displayed here, using a pangram sequence for displaying size variations.
Describes the Design System Object to be created.
Contextual information includes:
Once you have inspected the preview section and finally decide to import the design into your Knowledge Base, simply click on the "OK" button. You will be able to see the import progress execution in the Output Window (General view).
Once the import process is complete, the new objects will be available in the KB Explorer.
If you imported a local design file (e.g. a Sketch file), an additional File object will be created as a backup for your design file (with the "+backup" suffix).
Keep in mind that the backup file will be overridden if additional imports of the same file are made. However, you will be able to inspect or recover the object’s previous versions from the object History. In addition, you can always perform a "Save" operation to download this backup file.
- To enhance the experience of using the Design Import option, the following values will be saved after loading a file preview and automatically restored if the dialog is closed and reopened:
Guide for designers
Guide for developers
GeneXus Markup Language (GXML)
Export design