Solid Edge Design Manager Object Library
FindWhereUsedOnServer Method
DesignManager ActiveX DLL > Application Object : FindWhereUsedOnServer Method
Specifies the number of properties to search for. When working with Solid Edge V17 and earlier, this argument is required to be 1. When working with Solid Edge V18 and later, this argument should be 0.
Specifies the properties to search for. When working with Solid Edge V17 and earlier, this argument is required to contain at least one property, with a value "DAV:href". When working with Solid Edge V18 and later, this argument should be an empty array.
Specifies the number of SharePoint URLs in which to search.
Specifies the SharePoint URLs in which to search.
Specifies the number of matching documents to return.
Specifies the documents to search.
Specifies the number of documents to search.
Specifies the files that match the search criteria.
Specifies whether the search is a deep search (1) or a shallow search (0). Shallow Search specifies to search in the specified directories only. Deep Search specifies to search in the specified folders and their children.
Description
This method searches the server for files that use the properties you specify.
Syntax
Visual Basic
Public Function FindWhereUsedOnServer( _
   ByVal NumberOfProperties As Long, _
   ByVal ListOfProperties As Variant, _
   ByVal NumberOfSharePointDirectories As Long, _
   ByVal ListOfSharePointDirectories As Variant, _
   ByVal NumberOfDocuments As Long, _
   ByVal ListOfDocumentsForWhereUsed As Variant, _
   ByRef NumberOfUserFiles As Long, _
   ByRef DocumentsUsedByList As Variant, _
   Optional ByVal TypeOfSearch As Variant _
) As Long
Parameters
NumberOfProperties
Specifies the number of properties to search for. When working with Solid Edge V17 and earlier, this argument is required to be 1. When working with Solid Edge V18 and later, this argument should be 0.
ListOfProperties
Specifies the properties to search for. When working with Solid Edge V17 and earlier, this argument is required to contain at least one property, with a value "DAV:href". When working with Solid Edge V18 and later, this argument should be an empty array.
NumberOfSharePointDirectories
Specifies the number of SharePoint URLs in which to search.
ListOfSharePointDirectories
Specifies the SharePoint URLs in which to search.
NumberOfDocuments
Specifies the number of matching documents to return.
ListOfDocumentsForWhereUsed
Specifies the documents to search.
NumberOfUserFiles
Specifies the number of documents to search.
DocumentsUsedByList
Specifies the files that match the search criteria.
TypeOfSearch
Specifies whether the search is a deep search (1) or a shallow search (0). Shallow Search specifies to search in the specified directories only. Deep Search specifies to search in the specified folders and their children.
Remarks
For ST5 and above:
We have started supporting the SharePoint search service application using the SharePoint search scopes instead of the SharePoint directories. Below is the sample code for the same.
Example
Option Infer On

Imports System
Imports System.Runtime.InteropServices

Namespace Examples
    Friend Class Program
        <STAThread>
        Shared Sub Main(ByVal args() As String)
            Dim application As DesignManager.Application = Nothing
            Dim insight As DesignManager.Insight = Nothing

            Dim numberOfProperties As Integer = 1
            Dim varListOfProperties(0) As String
            varListOfProperties(0) = "DAV:href"
            Dim numberOfSharePointDirectories As Integer = 1
            Dim varListOfSharePointDirectories(0) As String
            varListOfSharePointDirectories(0) = "All Sites"
            Dim numberOfDocuments As Integer = 1
            Dim varListOfFilesForWhereUsed(0) As String
            varListOfFilesForWhereUsed(0) = "http://abc1234/sites/insightserver/PreReleased/Trolley/Axle.par"
            Dim documentsUsedByListCount As Integer = 1
            Dim documentUsedByList As Object = Nothing

            Try
                application = New DesignManager.Application()
                application.Visible = 1
                application.DisplayAlerts = 1
                insight = CType(application.Insight, DesignManager.Insight)
                insight.FindWhereUsedOnServer(numberOfProperties, varListOfProperties, numberOfSharePointDirectories, varListOfSharePointDirectories, numberOfDocuments, varListOfFilesForWhereUsed, documentsUsedByListCount, documentUsedByList, 1)
            Catch ex As System.Exception
                Console.WriteLine(ex)
            End Try
        End Sub
    End Class
End Namespace
using System;
using System.Runtime.InteropServices;

namespace Examples
{
    class Program
    {
        [STAThread]
        static void Main(string[] args)
        {
            DesignManager.Application application = null;
            DesignManager.Insight insight = null;

            int numberOfProperties = 1;
            string[] varListOfProperties = new string[1];
            varListOfProperties[0] = "DAV:href";
            int numberOfSharePointDirectories = 1;
            string[] varListOfSharePointDirectories = new string[1];
            varListOfSharePointDirectories[0] = "All Sites";
            int numberOfDocuments = 1;
            string[] varListOfFilesForWhereUsed = new string[1];
            varListOfFilesForWhereUsed[0] = "http://abc1234/sites/insightserver/PreReleased/Trolley/Axle.par";
            int documentsUsedByListCount = 1;
            object documentUsedByList = null;

            try
            {
                application = new DesignManager.Application();
                application.Visible = 1;
                application.DisplayAlerts = 1;
                insight = (DesignManager.Insight)application.Insight;
                insight.FindWhereUsedOnServer(numberOfProperties, varListOfProperties, numberOfSharePointDirectories, varListOfSharePointDirectories, numberOfDocuments, varListOfFilesForWhereUsed, out documentsUsedByListCount, out documentUsedByList, 1);
            }
            catch (System.Exception ex)
            {
                Console.WriteLine(ex);
            }
        }
    }
}
See Also

Application Object  | Application Members