Export Markup shapefile names
Hello,
Does anyone have any examples of using the Run External command "ExportMarkupLayer" and then changing the name of the Export.zip and the Point, Polygon and Polyline files within the export folder. Any examples are most appreciated.
0
-
Hi Andrew,
Just to clarify- would you like to change the file names from the position of an end user, or are you looking to change the defaults that are generated by the ExportMarkupLayer command?
An end user should be able to rename any of these files manually from their file explorer, or (more easily) by using Esri software to handle the shapefile after unzipping it. For changing the default names that ExportMarkupLayer creates, there unfortunately isn't an out of the box configuration to acheive this.
I'd be happy to clarify further once I know what we're looking to do.
Thanks,
Amanda0 -
Thanks Amanda. I know how to rename the shapefile in session now. I now have a query regarding how a user adds attributes to the featureset prior to exporting. In our viewer we add points using the markup tools or add graphics/features using a workflow. However, when we come to export the shapefile is blank, i.e FID and SHAPE coloum. My question is how do we add an extra column (buildings) with attributes, i.e. building A, building B to the points and polygons which are added then exported within the viewer - is there an example of doing this? 0 -
Hi Andrew,
I just want to make sure I understand your question correctly. You want to add markup to the viewer, add attribute information to the markup and then export them as a shapefile?
The "export to shapefile" built-in tool only works if you select features from a layer. Markup is not considered a feature, so you will not be able to export those at all. This is likely why the shapefile is blank.
If you are interested in creating shapefiles from the viewer, you can create a workflow that does this. You can:
1. Use the DisplayCaptureGeometry activity to allow the user to define a geometry
2, Then create a new feature set to hold that graphic
3. Once you have added all the graphics to the feature set, you need to convert this feature set into a data table using the "FeatureSet to DataTable" activity
4. By converting it to a data table, you can add columns to it by using the "Add DataTable Column <T>" activity. This will allow you to add attribute information to the graphics. You will have to loop through each geometry in the table to assign values to each row.
5. Once you do all that, you will need to find a way to export this into a shapefile. Unfortunately, we do not have an activity that will do this for you. So your only option would be to publish a geoprocessing service from ArcGIS that will take in a dataset and return a shapefile. You can always take advantange of the "Feature Class to Shapefile" conversion tool from ArcGIS for Desktop so you can publish this to your ArcGIS Server and then use the Geoprocessor activity to use this tool.
I hope this answers your question. Let me know if you have any further questions.
Carmen0
Du måste logga in om du vill lämna en kommentar.
Kommentarer
3 kommentarer