Jump to content

 
Photo

Arc MXD files in text format

- - - - -

  • Please log in to reply
12 replies to this topic

#1
AIGIS

AIGIS

    Newbie

  • Validated Member
  • Pip
  • 4 posts
  • Gender:Male
  • Canada

Hello all, I'm new to this site but I have a question as to how (or if possible) an Arc MXD file can be read in text format. For example, Map Info workspace files can be opened in notepad and the scripting can be customized. ArcMXD files cannot be opened in notepad, so is there a way I can read this file in text? Your help is much appeciated. Thanks..

#2
gregory

gregory

    Key Contributor

  • Validated Member
  • PipPipPip
  • 96 posts
  • Gender:Male
  • Location:Cracow
  • Poland

Simillar topic already exist on manifold forum:
http://forum.manifol.../forum/t61624.4
But doesn't bring an answer and way to open *.mxd in notepad

Gregory

#3
Eric Wolf

Eric Wolf

    Contributor

  • Validated Member
  • PipPip
  • 16 posts
  • Gender:Male
  • Location:Boulder, CO
  • United States

ArcGIS MXD files are binary and proprietary. The only way to manipulate the contents programatically is within the ArcGIS environment.

What are you wanting to do to the MXDs? You might be able to make changes to your normal.mxt instead.

#4
AIGIS

AIGIS

    Newbie

  • Validated Member
  • Pip
  • 4 posts
  • Gender:Male
  • Canada

ArcGIS MXD files are binary and proprietary. The only way to manipulate the contents programatically is within the ArcGIS environment.

What are you wanting to do to the MXDs? You might be able to make changes to your normal.mxt instead.


I want to edit layers from a text script without opening ArcMap. Reason being so is that I have many layers with a lot of data which takes a lot of load. If I could tweak features in the text file and save it, it would save me time. Any suggestions how to change it programatically? Also, mxt files, do you think if I tweak features in an mxt it could work? Thanks.

#5
Charlie Frye

Charlie Frye

    Master Contributor

  • Validated Member
  • PipPipPipPip
  • 112 posts
  • Gender:Male
  • Location:Redlands, CA
  • Interests:Base map design/data model, political/election maps; use of historical maps for modern GIS analysis
  • United States

If this task were given to me, I would write a VB (C++, .Net, C#, or whatever platform that implements ArcObjects) an application that creates an MXD based on your text file (or database) input. You could start with a new empty MXD or an existing MXD that contains layout elements, where you just need to add the layers.

I wouldn't characterize the programming as difficult; all the tasks are fairly simple, but there are a lot of tasks involved in building a map. Each layer not only needs to be added, but symbolized and potentially labeled. Layout elements may need to by managed based on the state of the data each day. There are code examples for all of these tasks on the EDN website. I would start there.

All of this is of course based entirely on thinking of this as a desktop solution. If your data are published as services, it may be that you can create an MXD or Map Service that is always up to date. All that potentially involving no programming.
Charlie Frye
Chief Cartographer
Software Products Department
ESRI, Redlands, California

#6
pfyfield

pfyfield

    Master Contributor

  • Validated Member
  • PipPipPipPip
  • 100 posts
  • Gender:Male
  • Location:Portland, Oregon
  • United States

Reminds me of old ArcView 3.X files. I would open them in wordpad every time I needed to change the data path.

I'm confused about the problem though. The document files are quite small as they just point to the GIS data- it's the data that are large and take a long time to draw. Could you open the file once, turn off all the layers, and tweak it then? Making sure to save with all layers turned off?
Paul Fyfield
Cartographer, Bureau of Land Management
Oregon State Office
Portland, Oregon
pfyfield@blm.gov

#7
DaveB

DaveB

    Hall of Fame

  • Validated Member
  • PipPipPipPipPipPipPip
  • 1,043 posts
  • Gender:Not Telling
  • Location:Redlands, CA
  • United States

Depends on what you mean by "tweaking features". One thing I sometimes do is make a separate mxd just for editing data (geometry or attribute editing). This "edit mxd" can have layers symbolized with simple symbols and renderers, without labels, with unneeded data either turned off or left out entirely, etc. for better performance.

You might also want to look at what can be done to improve the performance of the mxds. There are things you can do to the data, things you can do with symbology, etc.
Dave Barnes
Esri
Product Engineer
Map Geek

#8
Matt Penner

Matt Penner

    Newbie

  • New Member
  • Pip
  • 4 posts
  • United States

I am interested in this because we just moved all our maps and data to a new server. We were using absolute paths so now we have hundreds of maps all with layers pointing to the old server. If the mxd file was just text or xml I'd just use a tool to change the server names all in one fell swoop. But I don't see any easy solution. It seems that we'll have to update the layer source path whenever we open a map that hasn't been updated.

#9
rodneyp

rodneyp

    Newbie

  • New Member
  • Pip
  • 1 posts
  • No Country Selected

In ArcScripts.ESRI.com are some new tools for
"looking under the hood" of MXDs and geodatabases.

These particular ArcSripts are all written by ERSI employees.

(one link that shows all the tools below) =
http://arcscripts.es...uery=diagrammer

GDB XRay http://arcscripts.es....asp?dbid=15119
ArcMap XRay ;) (part of the GDB XRay download)

XML Workspace Validator http://arcscripts.es....asp?dbid=15505

ArcGIS Diagrammer http://arcscripts.es....asp?dbid=15166
ArcGIS Diagrammer has VERY THOROUGH DOCUMENTATION,
including a 85-page PDF manual, and a training video.

(unlike the old Geodatabase Diagrammer,
ArcGIS Diagrammer does not require Visio.
And none of these require installation with
Admin privileges.)

Weasel Words: These sound cool, but I haven't tried them yet.
Use at your own risk, it's not my fault, etc.

#10
MadMapper

MadMapper

    Newbie

  • New Member
  • Pip
  • 2 posts
  • Canada

I'm not sure I understand exactly what you want to do but, if you are just trying to change the path from the MXD to the data, you can do that in ArcCatalog just by right clicking on the MXD and selecting "Set Data Source(s)".

#11
Matt Penner

Matt Penner

    Newbie

  • New Member
  • Pip
  • 4 posts
  • United States

In ArcScripts.ESRI.com are some new tools for
"looking under the hood" of MXDs and geodatabases.

These particular ArcSripts are all written by ERSI employees.

(one link that shows all the tools below) =
http://arcscripts.es...uery=diagrammer

GDB XRay http://arcscripts.es....asp?dbid=15119
ArcMap XRay ;) (part of the GDB XRay download)

XML Workspace Validator http://arcscripts.es....asp?dbid=15505

ArcGIS Diagrammer http://arcscripts.es....asp?dbid=15166
ArcGIS Diagrammer has VERY THOROUGH DOCUMENTATION,
including a 85-page PDF manual, and a training video.

(unlike the old Geodatabase Diagrammer,
ArcGIS Diagrammer does not require Visio.
And none of these require installation with
Admin privileges.)

Weasel Words: These sound cool, but I haven't tried them yet.
Use at your own risk, it's not my fault, etc.


Thanks! It looks like GDB XRay may have some ability to do this since it works with ArcMap documents. I have an email out to Steve (the author) asking for more detail about my problem.

I'll write back with what I find out.

#12
Matt Penner

Matt Penner

    Newbie

  • New Member
  • Pip
  • 4 posts
  • United States

I'm not sure I understand exactly what you want to do but, if you are just trying to change the path from the MXD to the data, you can do that in ArcCatalog just by right clicking on the MXD and selecting "Set Data Source(s)".


Thanks MadMapper. I wasn't aware you could do this. This does help on a map by map basis and I'll start using it as I open legacy maps.

I'm still looking for a programmatic solution since it would be a lot easier to change all the maps at once.

Thanks,
Matt

#13
Matt Penner

Matt Penner

    Newbie

  • New Member
  • Pip
  • 4 posts
  • United States

Thanks! It looks like GDB XRay may have some ability to do this since it works with ArcMap documents. I have an email out to Steve (the author) asking for more detail about my problem.

I'll write back with what I find out.


Steve just wrote back. Wow, he's quick! Here's his reply:

Hi Matt, XRay can help you to see which layers are pointing to which data sources, but it does not provide a tools to change the layer source properties.

There is a developer sample that repoints layers to a new data source. This should help with the problem you are describing:
http://resources.esr...5087eb96f02.htm

Steve






0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users

-->