This post is machine-translated. The original post in german language can be found here.
These post applies to following version:
Dynamics AX 2012
Dynamics AX 2012
|
|
|
|
|
|
|
This post is machine-translated. The original post in german language can be found here.
These post applies to following version:
Dynamics AX 2012
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Such information can be read with the Microsoft Dynamics AX 2012 Management Shell:
Here's how it looks:
Manifest Summary Elements -------- ------- -------- Microsoft.Dynamics.AX.F... {Classes: 3} {ClassesWHSLoadLineI...This output isn't very helpful yet, so we'll get a little more detail in our query and now just query the path from the elements container:
Result:
In the list above you can see that method names are also output. If, for example, I only want to see objects listed, I can do this as follows:
(Get-AXModel -File 'c: empdynamicsax2012r3_cl4555332.axmodel' -Details).Elements | Select-Object Path, ParentHandle | Where{$_.parenthandle -like 0 }Result:
The automatic adjustment to the output window is still a problem, which leads to the fact that long names are displayed cut off, this can be circumvented as follows:
(Get-AXModel -File 'c: empdynamicsax2012r3_cl4555332.axmodel' -Details).Elements | Select-Object Path, ParentHandle | Where{$_.parenthandle -like 0 } | format-table -AutoSizeResult:
If, for example, you only want to output all classes to a text file, you can do this as follows:
(Get-AXModel -File 'c: empdynamicsax2012r3_cl4555332.axmodel' -Details).Elements | Select-Object Path, ParentHandle, ElementType | Where{$_.elementtype -like "class" } | Where{$_.parenthandle -like 0 } | format-table -AutoSize | out-file c: empobjects.txtOf course you can even sort them:
(Get-AXModel -File 'c: empdynamicsax2012r3_cl4555332.axmodel' -Details).Elements | Select-Object Path, ParentHandle, ElementType | Where{$_.elementtype -like "class" } | Sort-object Path | Where{$_.parenthandle -like 0 } | format-table -AutoSize | out-file c: empobjects.txtIf you want a CSV file instead of a simple text file, this is also possible (you have to omit Format-Table):
(Get-AXModel -File 'c: empdynamicsax2012r3_cl4555332.axmodel' -Details).Elements | Select-Object Path, ParentHandle, ElementType | Where{$_.elementtype -like "class" } | Sort-object Path | Where{$_.parenthandle -like 0 } | export-csv -path "c: empobjects.csv" -delimiter "," -notypeinformation -encoding utf8And this is how the CSV file looks like: