Hi There,
I am trying to resolve an issue with an ArcObjects extension. This particular portion of logic, gathers metadata for layers in the map. It works fine with regular data layers but with network data (pipeline network layer), it takes much longer than expected. The point layers participating (exp: wells, facilities, pipelines nodes) within network are fine, it's only the pipeline (line) that takes longer. This impacts user workflow when they are trying to switch data frames (one with network data and other with schematics data). Initially i thought that it was related to missing metadata but adding metadata didn't help resolve this issue. I am looking for some suggestions on what may be the workaround for this issue. Our environment is ArcGIS 10.2.2, VB.NET, .NET4 code base. Below is the code.
Appreciate any input.
Thanks
Jay
Dim pMD As IMetadata
Dim pPS As IPropertySet
pDLayer = CType(pLayer, IDataLayer)
pMD = CType(pDLayer.DataSourceName.Open, IMetadata)
If Not pMD Is Nothing Then
Dim vaValues As Object
Dim v As Object
Dim valuesArray As System.Array
pPS = New PropertySet
pPS = pMD.Metadata
Dim tnames As Object
Dim tvalues As Object
Dim vFormat As Object
'Return the metadata elements
pPS.GetAllProperties(tnames, tvalues) - code takes much longer for pipeline data
What gets returned in tnames and tvalues? Does it contain what you expected, despite it being slow?
Yes, the code returns what is expected. tnames & tvalues objects contain are all the values in the property set. Below is the code that shows how the code is being used. I looked up ESRI help, link here: ArcObjects Help for .NET developers.
If Not pPS Is Nothing Then
vaValues = pPS.GetProperty("idinfo/keywords/theme/themekey")
'Check for different xml tag for ArcGIS 10 metadata
If IsNothing(vaValues) Then vaValues = pPS.GetProperty("dataIdInfo/themeKeys/keyword")
If Not IsNothing(vaValues) Then
valuesArray = CType(vaValues, System.Array)
For Each v In valuesArray
If InStr(CType(v, String), "HUK") > 0 Then
returnArray.Add(CType(v, String))
End If
Next
End If
End If
Hi, I still don't have a solution for this issue, wondering if there are any other suggestions from fellow members. Thanks in advance.
Jay