Can we make an attempt to share snippets here directly which we think can be used regularly?

For example, adding shapefile programmatically, or buffer etc.

  • Well, we could do things like that - do you have anything you'd like to add?
    – ist_lion
    Dec 14, 2010 at 14:49

4 Answers 4


Yes, if it is the best way to answer the question being asked.


As Regan said, the best place for snippets is in context of the problem they're built to solve, that is, in answer to a question.

If the snippet is too large to integrate cleanly into an answer there are couple of 3rd party places I know of, no doubt there are others:

  • http://gis.pastebin.com/ - currently empty. Pastebin.com has automatic namespaces based on sub-domain. Pro: stability, Pastebin has been around since 2002. Con: "you can store text for a certain period of time", said time is unspecified.
  • http://snipplr.com/ - allows starring favourites, comments, language specific searching, tags. A relatively new service (2006).

For people who do decide to use a snippet service, I would ask that the most relevant part of the code, the keystone idea, be replicated in the answer itself. This provides resilience in the face of broken links and, more importantly, educates. The what and why of a method are it's most important features. The how can be replicated if the principles are known.

  • both these sites are blocked where I work :(
    – dassouki
    Dec 20, 2010 at 21:03

Isn't http://resources.arcgis.com/content/all-galleries the best place for that?

August 2019 https://codesharing.arcgis.com/

  • 2
    ...for arcgis . Dec 14, 2010 at 21:36
  • 5
    Which is the program you would use snippets of ArcObjects code in.
    – jvangeld
    Dec 15, 2010 at 5:06
  • This link appears to be broken.
    – PolyGeo Mod
    Aug 26, 2019 at 18:15
  • it's not broken but in an archive state "This is an archive of older help systems." a newer link is codesharing.arcgis.com
    – Mapperz Mod
    Aug 26, 2019 at 18:29

I would think that would be a good use of the community wiki feature.

You must log in to answer this question.