Posted on
Export and Import Models and Model files in AX 2012 (CMD)

A model is a set of elements in a given layer. Each layer consists of one or more models.
Each layer contains one system-generated model that is specific to that layer.
Every element in a layer belongs to only one model. In other words, no element can belong to
two models in the same layer, and every element must belong to a model.
A default model owned by Microsoft exists in each layer. Default models cannot be modified.
A model is permanently associated with the layer that the model was created in.
If you need to move one of your models from one layer to another,
you must create a project from the model in the Application Object Tree (AOT),
export the project as an xpo file, create a target model in the desired layer,
delete the original model to avoid having to resolve layer conflicts, and import
the xpo file to the target model. If you are moving elements between models in the same layer,
 you can use the Move to model command in the AOT.
Models are stored in the model store.

The model store is a database in which all application elements for Microsoft Dynamics AX are stored.
Customizations are also stored in the model store.
The model store replaces the Application Object Data (AOD) files that were used in
earlier versions of Microsoft Dynamics AX.
Models that have been installed in the model store are used at run time.

Note: This Works with CMD

Create a new model files

Step 1: Goto command prompt (Note: Run as Administrator)

Cd c:program filesMicrosoft Dynamics AX60serverMicrosoftDynamicsAXbin

c:program filesMicrosoft Dynamics AX60serverMicrosoftDynamicsAXbin>
AXUtil.exe Create /Model:NewCustomer /Layer:USR

Export a model file

c:program filesmicrosoft Dynamics AX60serverMicrosoftDynamicsAXbin>
AxUtil.exe export /file:d:Modificatoins.axmodel /model:Modificatoins

Note: If the file name is like Xyz Company Modificatoins use same command with “Xyz Company Modificatoins”

Like: c:program filesMicrosoft Dynamics AX60servericrosoftDynamicsAXbin>
AxUtil.exe export /file:d:”Xyz Company Modificatoins.axmodel” /model:”Xyz Company Modificatoins”

Delete a model file

c:program filesMicrosoft Dynamics AX60servermicrosoftDynamicsAXbin>
AxUtil.exe Delete /model:NewCustomer

Import a model file

c:program filesMicrosoft Dynamics AX60servermicrosoftDynamicsAXbin>
AXUtil.exe import /file:d:Modificatoins.axmodel

Note1: If the file name is like Xyz Company Modificatoins use same command with “Xyz Company Modificatoins”

Like: c:program filesMicrosoft Dynamics AX60servermicrosoftDynamicsAXbin>
AxUtil.exe import /file:d:”Xyz Company Modificatoins.axmodel”

Note2: If you face with conflicting of Models Use /conflict:push

Like: c:program filesMicrosoft Dynamics AX60servermicrosoftDynamicsAXbin>
AxUtil.exe import /file:d:”Xyz Company Modificatoins.axmodel” /conflict:push

How to Import/Export Model on correct AOS

Axutil import /file:<path>  /config:instance name

Axutil Export /file:<path>  /config:instance name

Example for selective model with AX 2012 Target Config

axutil export /model:UKUSDMCus /file:C:UKUSDMCus.axmodel /config:AXPROD

Detailed Example will look like:

Microsoft Windows [Version 6.1.7601]
Copyright (c) 2009 Microsoft Corporation.  All rights reserved.

C:Windowssystem32>cd

C:>cd C:Program FilesMicrosoft Dynamics AX60ServerAXPRODBin
C:Program FilesMicrosoft Dynamics AX60ServerAXPRODbin>axutil export /model:UKUSDMCus /file:C:UKUSDMCus.axmodel /config:AXPROD

Leave a Reply

Your email address will not be published. Required fields are marked *