-2

I would like to edit text file within an addin without going into visual studio etc and recompiling the addin.

I have tried using 7-Zip and WinZip - editing the file and then saving it back - and when I try and install the modified addin, its corrupted and ArcMap isn't having any of it!

Is this actually possible ? If so what are the steps?

Note - this is NOT a Python addin, it's a C# one

UPDATE

Just a bit more detail here - as I think some people are getting the wrong end of the stick here. I know full well it's not a great idea to go around messing with an addIn file generally. The problem I have, is that a client of mine wants to change an attribute within a configuration text file that is bundled up inside of the addIn - that way when they do a network install of the addin to all their users in the company - they will pick up that attribute automatically.

I was experimenting a methodology to do this and then pass on to my client. That was all...

6
  • 6
    7z is not a compiler. You need source code modify it and recompiling Commented Dec 2, 2015 at 12:10
  • 3
    What kind of file are you editing? A C# add-in would be compiled and in binary form. You can use whatever text editor you want to edit the source code, but you will still have to compile it somehow (visual studio or another tool chain). Commented Dec 2, 2015 at 12:34
  • Yes - but addins are essentially zip files - you can unzip them and edit the file and it back. It's just that it seems to zip back the addin incorrectly - or at least there is something I am missing in my knowledge here.
    – Vidar
    Commented Dec 2, 2015 at 14:45
  • 3
    No, Add-Ins are not zip files. They are binaries compiled from source, distributed in zip files. No source, no compiler, no modification.
    – Vince
    Commented Dec 2, 2015 at 17:32
  • Right, I've updated my question, and god knows why this question has been downvoted 3 times! Don't think its such an unreasonable question to ask.
    – Vidar
    Commented Dec 3, 2015 at 11:35

1 Answer 1

2

Not trying to be unhelpful, but if you believe that an AddIn is the same thing as a .zip file, you probably should not be editing the code. You may just damage things further.

To learn more about ESRI AddIns, please look here. When you edit a C# file, you will need a C# compiler to compile the code.

Stack Overflow Question about building C# outside of VS.NET here

As far as I know, there is no way to build C# ArcGIS Add-Ins outside of .NET, and I assume that if you were to use a different compiler, it would not have the proper interaction with ArcGIS to properly update and run the code. We actually switched from C# Add-Ins to Python based ArcObjects to get around many of the issues that come with the proprietary .NET add ins.

1
  • I'm not editing code - it's a text file that's bundled in the addin.
    – Vidar
    Commented Dec 4, 2015 at 10:27

Your Answer

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

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