Sometimes it's nice to know where the AWR Design Environment will look for certain files on your system. A listing of these directories along with names that provide a hint at what they are used for is available from the MWOffice application object as the Directories collection. We can print a listing of these directories using the following script code:
' Code Module Sub Main Dim attr As Attribute Debug.Clear For Each attr In MWOffice.Directories Debug.Print attr.Name & " = " & attr.Value Next attr End Sub |
The MWOffice.Directories collection provides Attribute objects which each have a name and value. In the code above we iterate through the attributes in the MWOffice.Directories collection and print the name and the value of each attribute object.
Running this program gives us the following output:
AppDir = C:\Program Files (x86)\AWR\AWRDE\13
AppData = C:\Users\<username>\AppData\Local\AWR\Design Environment\13.0
AppDataUser = C:\Users\<username>\AppData\Local\AWR\Design Environment\13.0
AppDataCommon = C:\ProgramData\AWR\Design Environment\13.0
TempFile = C:\Users\<username>\AppData\Local\AWR\Design Environment\13.0\temp
AppDataLog = C:\Users\<username>\AppData\Local\AWR\Design Environment\13.0\logs
AppDataLibraryCache = C:\ProgramData\AWR\Design Environment\13.0\libcache
Examples = C:\Program Files (x86)\AWR\AWRDE\13\examples
Libraries = C:\Program Files (x86)\AWR\AWRDE\13\library
EmModels = C:\Program Files (x86)\AWR\AWRDE\13\em_models
Models = C:\Program Files (x86)\AWR\AWRDE\13\models
Cells = C:\Program Files (x86)\AWR\AWRDE\13\cells
Symbols = C:\Program Files (x86)\AWR\AWRDE\13\symbols
Signals = C:\Program Files (x86)\AWR\AWRDE\13\signals
Textures = C:\Program Files (x86)\AWR\AWRDE\13\textures
Data = C:\Program Files (x86)\AWR\AWRDE\13\data
HSpice = C:\Program Files (x86)\AWR\AWRDE\13\analog
TestResults = C:\Users\<username>\AppData\Local\AWR\Design Environment\13.0\testresults
EmModelsUser = C:\Users\<username>\AppData\Local\AWR\Design Environment\13.0\em_models
Logs = C:\Users\<username>\AppData\Local\AWR\Design Environment\13.0\logs
LibraryCache = C:\ProgramData\AWR\Design Environment\13.0\libcache
Analog = C:\Program Files (x86)\AWR\AWRDE\13\analog
Projects = C:\Users\<username>\Documents\AWR Projects
Scripts = C:\Program Files (x86)\AWR\AWRDE\13\scripts
ScriptsUser = C:\Users\<username>\AppData\Local\AWR\Design Environment\13.0\scripts
CurrentProject = C:\Users\<username>\Documents\AWR Projects
Documents = C:\Users\<username>\Documents
DesignKits = C:\Program Files (x86)\AWR\AWRDE\13
Measurements = C:\Program Files (x86)\AWR\AWRDE\13\measurements
XmlUser = C:\Users\<username>\AppData\Local\AWR\Design Environment\14.0\xml
If you'd like to get the same results in PowerShell we can do that with the following two lines:
PS > $MWOffice = new-object -comobject MWOApp.MWOffice PS > $MWOffice.Directories | Select-Object Name,Value |
And PowerShell will format the results into two columns:
Name Value ---- ----- AppDir C:\Program Files (x86)\AWR\AWRDE\13 AppData C:\Users\<username>\AppData\Local\AWR\Design Environment... AppDataUser C:\Users\<username>\AppData\Local\AWR\Design Environment... AppDataCommon C:\ProgramData\AWR\Design Environment\13.0 TempFile C:\Users\<username>\AppData\Local\AWR\Design Environment... AppDataLog C:\Users\<username>\AppData\Local\AWR\Design Environment... AppDataLibraryCache C:\ProgramData\AWR\Design Environment\13.0\libcache Examples C:\Program Files (x86)\AWR\AWRDE\13\examples Libraries C:\Program Files (x86)\AWR\AWRDE\13\library EmModels C:\Program Files (x86)\AWR\AWRDE\13\em_models Models C:\Program Files (x86)\AWR\AWRDE\13\models Cells C:\Program Files (x86)\AWR\AWRDE\13\cells Symbols C:\Program Files (x86)\AWR\AWRDE\13\symbols Signals C:\Program Files (x86)\AWR\AWRDE\13\signals Textures C:\Program Files (x86)\AWR\AWRDE\13\textures Data C:\Program Files (x86)\AWR\AWRDE\13\data HSpice C:\Program Files (x86)\AWR\AWRDE\13\analog TestResults C:\Users\<username>\AppData\Local\AWR\Design Environment... EmModelsUser C:\Users\<username>\AppData\Local\AWR\Design Environment... Logs C:\Users\<username>\AppData\Local\AWR\Design Environment... LibraryCache C:\ProgramData\AWR\Design Environment\13.0\libcache Analog C:\Program Files (x86)\AWR\AWRDE\13\analog
Either way getting a listing of all the special directories used by the AWR Design Environment takes just a few lines of code.