3

I have created a custom tool for ArcMap with .NET and would like to know if there is any way to store user defined settings in a MXD. The tool simply draws a graphic circle of a certain radius with the center snapped to the closest vertex in a polyline pointed at by the mouse.

Right now, the user has to select the layer and set the radius (with a custom dialog form) every time they open the mxd and use the tool.

This layer and radius rarely changes for a project mxd, so it would be convenient to store the name of the layer and radius setting somewhere, so that it can be automatically used by the tool.

  • 1
    What sort of user-definable tool settings? How will you determine the user? Is it based on Active Directory? Could you provide a bit more information about your tools and what they do and how they were developed? I think you need to edit your question to include these details if you'd like a reasonable response. – Fezter Nov 28 '13 at 3:35
  • Consider trying to store this information in the Windows registry. There will be objects in. Net that will allow you to read and write to it. – Hornbydd Nov 28 '13 at 8:53
  • You need to implement an application extension. If the extension also implements relevant persistence interfaces, the saved settings get stored with the MXD document. – Petr Krebs Nov 28 '13 at 9:43
  • See How to persist data in a document for further details. – Petr Krebs Nov 28 '13 at 9:45
  • @Petr Krebs, that's exactly what I was looking for. – jger Nov 28 '13 at 10:20
2

You need to implement an application extension. If the extension also implements relevant persistence interfaces, the saved settings get stored with the MXD document.

See How to persist data in a document for further details.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.