MapWindow Home
Search MapWindow.org


  • Home
    • Download
    • Why MW
    • FAQ
    • Contact
  • Products
    • MapWindow
    • ActiveX
    • Plug-ins
  • Software Dev
    • Sample Code
    • Scripts
    • Source
    • Bugs
    • Support
    • Languages
  • Site Tools
    • Forums
    • Tutorials
    • Mailing Lists
    • Team
    • Site Stats
    • Links
  • Get Stuff
    • Buy a CD
    • Buy a T-Shirt
    • MW Book
    • ActiveX Book
    • Donate
    • Buy Support
  • Documentation
    • MWGIS App. User Guide
    • GISTools User Guide
    • MW Plug-ins Dev. Guide
    • MWGIS ActiveX Dev. Guide
    • MWGeoProc Dev. Guide

Configfiles

From MapWindow GIS

Jump to: navigation, search

Configuration and Project Files


The look and feel of MapWindow is stored in a configuration file (*.mwcfg) and project specific information is stored in a project file (*.mwprj). Both of these files are XML format, which means that you can open and edit them directly in a text editor like Notepad.


Every project file uses a specific config file. The reason for this is so that you can set up an "application" by customizing the config file, and then any project file created by that application knows to use the appropriate config file. It also allows you to distribute data to third parties using a more customized looking MapWindow.


If you just open a project file (*.mwprj) in notepad, you will see a line that looks something like this:


<mapwin name= "MapWindow" type="projectfile" version="1.1" configurationpath="..\..\..\Program Files\MapWindow\default.mwcfg">


The first few elements give information about the file type and the version of MapWindow that created it. Notice the "ConfigurationPath". This is a relative path to a configuration file that opens with this project file. Usually it points to the location of your default MapWindow configuration file in the MapWindow installation directory.

However, if you were to create your own configuration file and give it a different name, you could point your project file at it and then when you open this project it would use the new configuration file. For example, make a copy of the "default.mwcfg" file, rename it "test.mwcfg" and place it in the same directory as your project file. Then, in your project file, change the above line to look like this:


<mapwin name= "MapWindow" type="projectfile" version="1.1" configurationpath="test.mwcfg">


Now when you open that project file by double-clicking it, it will open with the configuration file, "test.mwcfg". To make sure it worked, open the project file in MapWindow, save it again, close MapWindow, then open the project file in Notepad again and look at the ConfigurationPath. It should still be pointed at "test.mwcfg". If it changed back to "default.mwcfg" then it either couldn't find the test.mwcfg file, or it was an invalid file.

There are several sections of the configuration file that can be edited. However, the main section to edit is the <AppInfo> section. In the file "default.mwcfg" the AppInfo section looks like this:


<AppInfo name= "MapWindow" version="1.1" builddate="" developer="EMRC" Comments="" HelpFilePath="help\MapWindow30.chm" UseSplashScreen="True" SplashTime="2" DefaultDir="Sample Data\UnitedStates\Shapefiles">

<windowicon> <image type="Icon">AAABAAEAICAAA . . . </image> </windowicon>

<splashpicture> <image type=""> </image> </splashpicture>

</appinfo>


You can directly edit all of the tags in the AppInfo section except for the WindowIcon and the SplashPicture. Changes to the AppInfo section tags show up in the "About" form and also in the application title bar. The icon and the picture tags are encoded images that must be created in code. There is information on this in the discussion forum.

Retrieved from "http://www.mapwindow.org/wiki/index.php/Configfiles"
Views
  • Page
  • Discussion
  • View source
  • History
Personal tools
  • Log in / create account
  • What links here
  • Related changes
  • Upload file
  • Special pages
  • Printable version
  • Permanent link

Geospatial Software Lab

Copyright © 2008 - MapWindow Open Source Team
( last updated: November 12 2008.)
Home | Donate | Download | MapWindow GIS Desktop | MapWinGIS.ocx | Plug-ins | Contact | Lists | Bugs | Sample Code | Documentation
Code Repository | Open Source License | Discussion Forum | Wiki | Join the Team | Site Statistics | Links