How to save layer file of previous version using ArcObjects Java API from ArcGIS 10.2? I was using the below code, but no option available to specify the layer file version.
ILayerFile layerFile = new LayerFile();
layerFile.esri_new(fileName);
layerFile.replaceContents(layer);
layerFile.save();
Solved! Go to Solution.
Here we go...
LayerFile layerFile = new LayerFile();
layerFile.esri_new(fileName);
layerFile.replaceContents(layer);
layerFile.setDocumentVersion(esriArcGISVersion.esriArcGISVersion93)
layerFile.save();
When saving a layer to a previous version, keep in mind that older versions of ArcGIS may be unable to access newer data sources in the current release. For example, a layer that points to an ArcGIS 10.2.2 geodatabase will not work in earlier versions of ArcGIS.
Here we go...
LayerFile layerFile = new LayerFile();
layerFile.esri_new(fileName);
layerFile.replaceContents(layer);
layerFile.setDocumentVersion(esriArcGISVersion.esriArcGISVersion93)
layerFile.save();
When saving a layer to a previous version, keep in mind that older versions of ArcGIS may be unable to access newer data sources in the current release. For example, a layer that points to an ArcGIS 10.2.2 geodatabase will not work in earlier versions of ArcGIS.