ArcGIS Pro 3.7 API Reference Guide
ArcGIS.Desktop.Mapping Namespace / KnowledgeGraphLayer Class / GetPathOrServiceUri Method
Example

In This Topic
    GetPathOrServiceUri Method
    In This Topic
    Gets the file path or service uri for the datastore associated with the layer. This method must be called on the MCT. Use QueuedTask.Run.
    Syntax
    Public Function GetPathOrServiceUri() As String
    public string GetPathOrServiceUri()

    Return Value

    The file path or service uri. Returns an empty string if no path or service uri can be found.
    Exceptions
    ExceptionDescription
    This method or property must be called within the lambda passed to QueuedTask.Run.
    Example
    Get KG Service uri
    {
      //will be a path for a file-based kg otherwise it will be a service uri
      kgLayer.GetPathOrServiceUri();
    
    }
    Requirements

    Target Platforms: Windows 11 Home, Pro, Enterprise (64 bit)

    ArcGIS Pro version: 3.7 or higher.
    See Also