Return Value
true if the metadata can be edited
Exception | Description |
---|---|
ArcGIS.Core.CalledOnWrongThreadException | This method or property must be called within the lambda passed to QueuedTask.Run. |
await QueuedTask.Run(() => { var xml = System.IO.File.ReadAllText(@"E:\Data\Metadata\MetadataForFeatClass.xml"); //Will throw InvalidOperationException if the metadata cannot be changed //so check "CanEdit" first if (featureClassMetadataItem.CanEdit()) featureClassMetadataItem.SetXml(xml); });
bool canEdit1; //Call CanEdit before calling SetXml await QueuedTask.Run(() => canEdit1 = metadataItemToCheck.CanEdit());
Target Platforms: Windows 11, Windows 10