Dynamic labels for geometric elements (i.e. vector, CAD, shape) can be rendered in the View window based on database attributes associated with the elements.
Dynamic labels are set up in the Layer Controls' tab for the element of interest. For example, set up dynamic labels for polygons via the Vector Layer Controls' Polygons tab.
The label text can be set 'By Script', which lets you create a label string from the data in associated records in any table in the database. The expression is executed for every polygon. Elements you don't want labeled should return an empty string.
Following are some examples you can look at to help you create dynamic labels for your own geometric data.