Date: Thu, 28 Mar 2024 23:59:19 +0100 (CET) Message-ID: <1863891974.1233.1711666759844@nm-docs> Subject: Exported From Confluence MIME-Version: 1.0 Content-Type: multipart/related; boundary="----=_Part_1232_1648316986.1711666759844" ------=_Part_1232_1648316986.1711666759844 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Content-Location: file:///C:/exported.html
The AlfImporter class provides the basic interface for imp= orting Alf code from external files. An AlfImporter is instantiate= d with two pieces of information:
Importing of Alf code then takes place in two steps:
The API allows you to carry out these steps individually (which is usefu= l if, for example, you wish to import multiple model unit files before mapp= ing) or using a single call (for a s= ingle model unit file).
Importation takes place into the currently open and active Project. Once= you instantiate an AlfImporter object in a Project, it is no long= er consistent to use an AlfCompiler object in that Project. Instea= d, once you have completed any importation, you must use the AlfActionU= til,.resetActiveProject method to return the currently active project = to a state in which the AlfCompiler can be used (see Importer API: Mapping). Alternatively, you can use the Al= fActionUtil.importFrom method to do the importation (as described in <= a href=3D"https://docs.nomagic.com/display/ALFP2021xR1/Importer+API%3A+Util= ities" rel=3D"nofollow">Importer API: Utilities), in which case the Pro= ject will be restored for normal Alf operations at the completion of the me= thod.