0

Is it possible to start Python add-in as a service which keeps running while in ArcMap?

I am designing something using a add-in to receive socket messages from out of ArcMap and do some operations based on this message.

10
  • You can start an addin at startup, that's no problem, the trouble with this is that Esri ArcMap is a single thread process so you've got to watch what you do on a background worker or other thread.. if you are careless you will crash ArcMap. What do you need to do with your socket messages? What language are you working in? Commented Oct 5, 2018 at 0:38
  • It's actually a license terms violation to run Desktop as a server. ArcGIS Server exists to fulfill the server role (and it's pretty good at it).
    – Vince
    Commented Oct 5, 2018 at 1:32
  • I'm not sure that is what the OP means @Vince, I think it's more like a resident thread that responds to specific events raised by ArcMap and does something, for example sending an email when a specific feature is edited or opening a document when a feature is selected.. that sort of thing. Trying to create an addin for ArcGis to serve web pages would be so much work that the user may as well start with MapServer and modify/customize from there. Commented Oct 5, 2018 at 1:49
  • @MichaelStimson I am looking forward to send a geojson to ArcMap so that ArcMap can zoom the current workspace to the area. I am working with python Commented Oct 9, 2018 at 18:46
  • ArcMap doesn't do GeoJSON, you will need an intermediary process to convert to something Esri does like, a shapefile would be good. I would suggest OGR which is part of the GDAL package to convert the JSON file to a shapefile then load the shapefile into ArcMap. Caveat: OGR isn't the only package that will perform a conversion, GDAL/OGR is the only one that I know. Commented Oct 9, 2018 at 22:46

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Browse other questions tagged or ask your own question.