Hot answers tagged

36

This looks like the sort of thing you want: https://underdark.wordpress.com/2011/05/27/converting-mxd-to-qgis-project-file/ On Wednesday, Allan Maungu announced MXD2QGS, a converter that exports layers from an Arcmap 10 document into a Quantum GIS project file. The tool is built as an ArcToolbox and can be downloaded from the blog. The only working ...


31

Yes, it is possible. Before you can add a feature class you need to turn it into a feature layer. This arcpy code should help: import arcpy FC = r"C:\...\featureclass" arcpy.MakeFeatureLayer_management(FC, "nameoffeatureclass") MXD = arcpy.mapping.MapDocument(r"C:\...\your.mxd") DF = arcpy.mapping.ListDataFrames(MXD)[0] layer = arcpy.mapping.Layer("...


30

I've seen similar complaints on the Esri discussion forums and a quick search turned up this thread. Some suggestions: Save a copy of the mxd Open the geoprocessing results window and delete the history Under geoprocessing options, results management, change the value to a day or two


23

I know this question is a few months old, but I'm posting this in case it helps others. I developed this kludge to parse version numbers from MXD documents. It basically reads the first 4000 or so characters of an MXD document and searches for a version number. I tested with MXD versions 9.2, 9.3, 10.0, and 10.1. import re def getMXDVersion(mxdFile): ...


17

This is because arcpy.Rename_management does not work on a map layer object - it works on objects on the disk. Instead try: layer.name = newName layer.name is a read/write attribute of the arcpy.mapping.Layer class.


15

In addition to @PolyGeo second suggestion, there is an extension called CarryMap. It does what you exactly want. It exports your MDX into an exe file that can be opened with a double-click; no other software is needed. Furthermore, it exports your map for use in Android or iOS devices as well! However, you should pay to have the extension (commercial ...


14

If you are going to ArcMap 10.1 you could create a python add-in. The add-in gives you access to an "on open" function that will run code when you open the mxd. The help here explains how to create one and has a sample that adds a base layer to the mxd when opening.


14

The function below is based on Ryan's idea, but is a little more direct. ArcGIS map documents are actually OLE documents, which can be parsed with the oletools module (available on pypi: https://pypi.python.org/pypi/oletools). The function opens the file and reads the version string. Tested with 9.0, 9.3, 10.1 and 10.3, but should work with anything (not ...


13

The way to do this is to create a map package: Map packages (.mpk) make it easy to share complete map documents with others. A map package contains a map document (.mxd) and the data referenced by the layers it contains, packaged into one convenient, portable file. The downside of this will be that with the inclusion of raster data sources, your *....


11

It's not an *.exe but you can either: export your map to a layered PDF so that anyone with the free Adobe Reader can view it use the Publisher extension to publish your map as a PMF so that anyone with the free ArcReader can view it


9

Code If the layer is a shapefile, Layer.datasetName will return the file name. Please read the documentation in the following link to help you understand more about the datasetName parameter of the Layer object: dataSource (Read Only) : Returns the complete path for the layer's data source. It includes the workspacePath and the datasetName properties ...


9

No it's not possible. Like PolyGeo said you could write a conversion script using ArcPy that reads the QGIS project file (which is just XML) and load each layer. There would be a bit of work but you might even be able to match some of the styling. However there would be a lot of effort in this and it might not be worth it for a single project.


9

You need to save a copy of the mxd to an earlier version if you have saved the mxd in ArcGIS latest version 10.6. Based on ArcGIS help: Saving a map: New documents cannot be opened in earlier versions of the software; however, you can use the Save A Copy command to make a copy of a map document so you can open and work with it in previous versions of ...


8

To open an mxd, to the best of my knowledge, you will need a license of ArcGIS for Desktop to use its ArcMap application, which is by no means cheap. It seems that there are some tools out there to convert an ESRI document into a format that an open source solution like QGIS can read but it looks like they require access to an ArcGIS license as well. I ...


8

Use os.walk to walk through defined directory, and .endwith to find all mxd's within directory/sub directory, see example below: import arcpy, os for root, dirs, files in os.walk(r"C:\Project"): for f in files: if f.endswith(".mxd"): mxd = root + '\\' + f analysis = arcpy.mapping.AnalyzeForMSD(mxd) ...


8

I maintain several PLTS Atlas projects with north of 80 layouts per MXD. I have long paths as well as complex labeling and complex layer symbolization. The easiest solution I've found to get the file sizes down and improve performance is to use the "Save a copy" function. I've learned the hard way that the Defrag tool will re-path/disconnect features that ...


8

What you are after may not be determinable, it requires that the document info was saved/embedded and as you've found that is not often embedded into the document. I cannot find any reference to when this data is saved/skipped. For what it's worth this is another method: import os, sys, arcpy from comtypes.client import GetModule, CreateObject BasePath = ...


8

You achieve this by having multiple data frames Working with additional data frames Then setting a difference reference scale per data frame. While in many maps, you'll only need one data frame, you can add more data frames by clicking Insert > Data Frame on the main menu. You can remove a data frame by right-clicking the data frame name in the table of ...


7

I believe that you need a license of ArcGIS for Desktop to use its ArcMap application as well. You can also ask the client to send the shape-file and open them in the open-source tool QGIS


7

If you want to learn ArcMap I think searching its online help for tutorials will be your best starting point. An MXD file on its own does not contain spatial data so a search for map packages *.mpk (MXD + spatial data) may prove more productive.


7

The ESRI ArcGIS Resources page for Local Goverment has several sample maps that are available for download. The download includes the mxd and all associated data in a file geodatabase. I would say download the Tax Parcel Map Book and the Campus Editing samples as places to start.


7

I just gave this a test using ArcGIS for Desktop 10.2 on Windows 7 SP1 and was able to create a PNG and GIF files that had a transparent background that I could verify by inserting them as pictures into Word 2010 as In Front Of Text. I followed the Exporting your map instructions from the ArcGIS 10.1 Online Help, using Rose Quartz as both Background and ...


7

Short Answer: No, not directly Long Answer You need to understand that these are two different technologies. a ArcMap Document (.mxd) is a file which tells ArcMap which layers to use and how to render them etc. OpenLayers is a JavaScript Library that is used for creating application which consume Web Services. A .mxd file can only be opened in ArcMap, ...


7

As handy as R is for so many tasks, it is important to remember that 1) R is not a GIS and 2) quality mapping is downright difficult compared to creating maps with QGIS or ArcGIS. The following example borrows heavily from two R-bloggers blogs (blog 1 and blog 2). Here, I simply mapped a polygon shapefile using Google Satellite Imagery as a basemap. ...


6

As I can't comment I'll prepend for Roy's answer: This is technically correct but setting the "read only" attribute at this level is very weakly enforced. If you do this with ArcGIS (just tested), when you hit save you'll get a box asking where to save it, but you can then select the original file and over-write it anyway. There are two better ways: ...


6

Right click the mxd in windows explorer, choose properties, check Read-Only. This should force 'Save-As' when the user goes to save the map leaving your original in-tact. If you need to make changes to your "template" you'll have to disable this checkmark.


6

Unfortunately, you cannot open .mxd files in ArcGIS Explorer You can open these item types in ArcGIS Explorer Desktop: ArcGIS Explorer document (.nmf) ArcGIS Explorer application configuration (.ncfg) ArcGIS layer (.lyr) ArcGIS layer package (.lpk) ArcGIS Explorer layer (.nmc) ArcGIS Explorer add-in (.eaz) ArcGIS Server service Web map Please see this ...


6

Check out X-Ray, a nice set of tools for looking at structures (and differences) of MXDs and geodatabases. See links below. The tools were developed by the ESRI Local Government Data model group for working with the large municipal basemap datasets and mxds they work with but have been released for general use, and looks like is very useful add-in when ...


6

There are Esri Technical Articles that explain this. "Map documents (.mxd files) are compound files. The information describing the map, layout, and any embedded objects saved in the map is organized into units called storages and streams. When you save a compound file, the streams can become fragmented in a process that is analogous to hard disk ...


6

You should write an ArcMap Addin Extension. In the extension, listen to DocumentOpened event and from there, show your form. Useful Link To create the extension, use Arcgis visual studio template. Then change SetupEvents method like this: private void SetupEvents() { m_docEvents = ArcMap.Document as IDocumentEvents_Event; ...


Only top voted, non community-wiki answers of a minimum length are eligible