AnsweredAssumed Answered

Best practice for inserting scripting code into metadata?

Question asked by Hornbydd on Jun 27, 2016
Latest reply on Jun 27, 2016 by Hornbydd

Metadata Gurus,


I always put some metadata to any dataset I create.


If a single field was populated with a Field Calculate using some complex python logic I often paste the code directly into the definition section of the field in it's metadata. This ensures that this important information (often done as a quick on the fly bit of processing) is not lost and stays with the dataset.


Often the entire dataset may have been created using a model in modelbuilder or a python script I have developed. In the general description I will often say something like "created using script c:\projectX\script\".


Now this works for me as I can then look back at how the dataset was created and I can obviously find the script on our network. If this dataset is to be delivered to a client then they won't be able to access the script I am mentioning in the description.


I was wondering if there is a suitable section within the metadata to embed a copy of a python script?


I've trawled up and down the menu section when on the Data Source Item Description window and can't identify a suitable place one would copy some code into? Does anyone have any advice, may be ESRI have called it something else not immediately obvious? How have others embedded the code that created the data or is what I am suggesting outrageous and no self respecting GIS pro would ever give away their source code?