HowTo: Augmented Reality in GeneXus applications

Official Content
This documentation is valid for:

Augmented Reality (AR) is an enhanced version of reality where live views of physical real-world environments are augmented with superimposed computer-generated images over a user's view of the real-world, thus enhancing the current perception of reality.


Show a 3D model of some object and how it would fit to a place (augment the given reality).

To cover this scenario, the following API is available in GeneXus:

ARPreview external object

IsAvailable property

Type Boolean
Description Indicates if the device supports the 3D models

PreviewObject method

Description Displays the 3D Model
Parameters 3D object: URL domain
Returns None

The file URL can be a local URL (i.e. offline applications), or a remote (http/https) URL. When using remote URLs, the content is downloaded before displaying it.

Supported formats of 3D object

Apple USDZ
Android 3D assets files (glTF), Sceneform binary assets (SFB)

These file formats group all the information needed to represent a 3D model. There are several sites with models available to download, for example, AR Quick Look Gallery or

Sample Code

Event '3D'
   &URL3D = !""
   if ARPreview.IsAvailable // Check if device supports 3D models
      ARPreview.PreviewObject(&URL3D) // Display the 3D model of the URL
      msg("Your device doesn't support Augmented Reality")




This property is available since GeneXus 16 upgrade 9.


For Apple, not all 3D models are suitable for this. If a message like "Preview Universal Scene Description (Mobile)" appears in runtime, refer to Adding visual effects in AR Quick look.