Accessing .shp from Add Shapefile
I have a workflow that uses RunExternalCommand to prompt a user to add a shapefile (.shp, .dbf, .prj) to the map interface, same process as clicking the built in Add Shapefile button on the toolbar menu. It shows up as a Graphics layer both in the TOC and the screen, but I do not know what I can do with this. I want to be able to convert it to a FeatureSet and feed it into my GP task.
I have played with setting the externalID in the RunExternalCommand to a feature set var, but that has not helped any. Any insight? Seems like there should be a basic need to access what the user has added other than just drawing it.
Similar post unanswered: (https://support.geocortex.com/essentialsGSCForum?id=90660000000092LAAQ) Selection Set by Shapefile?
-
I might as well subscribe to this one too /customer/servlet/servlet.FileDownload?file=00P6000000e87wLEAQ
0 -
Hi Ryan,
I'm trying to create a workflow for user's to add their own shapefile into the HTML5 viewers. Would you be willing to share the workflow you mentioned?
Thank You!
Laura
0 -
Hi Laura,
I have since lost that sample workflow as my post was ~ 2.5 years ago. Sorry;)
0 -
Thanks for checking Ryan!
If anyone has any ideas how to go about this, I would really appreciate it.
I started a workflow, but i've ran into a wall after the FORM where it asks the user to select their shapefile.
The resulting uploaded shapefile is in iList format, and getting that into a Graphics format, and into the table of contents, is proving difficult.
This is a standard feature in the Silverlight viewer and we can't migrate our 20+ Silverlight sites without getting identical tools setup :(
Thank You,
Laura
0 -
I'm at the same point. I can slurp up the files, but I have no idea what to do with them.
0 -
Here is some code I put together this morning that will accept a shapefile and display in the HTML5 viewer. It's a little rough around the edges but should get you going.
I can't remember if Graphic layers are supported or not in the HTML5 viewer, but they don't seem to be working. It should be enough to get you going though.
https://dl.dropboxusercontent.com/u/695670/DisplayShapefile.xaml
0 -
Thank You for being awesome Tom! I tried to download it, but i'm getting an Error (5xx) with DropBox :/
0 -
This is super-helpful. Thanks!
Although I'm getting an "Activity Could Not Be Loaded because of Errors in the XAML" error on the "ShapefileToFeatureSet" activity. Where's that activity come from? Is that a custom function? Or possibly something from a version I'm not using yet?
0 -
Eric,
This is a new activity in Essentials 4.3.
0 -
The code is Workflow Designer 4.3 (latest version).
0 -
Thanks again Tom!
0 -
Ah. I'm still running 4.2. That'd be the problem.
Thanks again!
0 -
Thanks Tom for sharing this workflow. It is fantastic.
One question about building on it - is it possible to have the shapefile added to the layer list as a graphic, which could be turned on/off, and removed from the screen again if necessary?
Many thanks,
Mick
0 -
I should have added to my last post that I was talking about in a HTML5 viewer. In silverlight, it already does what I was asking.
0
Please sign in to leave a comment.
Comments
14 comments