Solid Edge Design Manager Object Library
FindWhereUsedDocuments Method
DesignManager ActiveX DLL > Application Object : FindWhereUsedDocuments Method
Declare as FileInfo. Complete path of Solid Edge Document for which you need to look for Where Used results.
Complete path can be network location too.
Returns list of Where Used results(files) found via API. The list contains complete path of the file.
Note that the paths can be network/local locations. Multiple paths are returned if applicable.
Description
Method to search for where used results with the help of windows based indexing mechanism.
Syntax
Visual Basic
Public Function FindWhereUsedDocuments( _
   ByVal DocumentPathName As Variant, _
   ByRef DocumentsUsedByList As Variant _
) As Object
Parameters
DocumentPathName
Declare as FileInfo. Complete path of Solid Edge Document for which you need to look for Where Used results.
Complete path can be network location too.
DocumentsUsedByList
Returns list of Where Used results(files) found via API. The list contains complete path of the file.
Note that the paths can be network/local locations. Multiple paths are returned if applicable.
Example
Imports System.IO

Public Class Form1

    Private Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click
        Dim application As DesignManager.Application = Nothing
        Dim strPath As FileInfo = New FileInfo("D:\Large Assembly\Part1.par") 
        Dim arrDocUsed() As Object

        Try
            application = New DesignManager.Application()
            application.Visible = True
            application.WhereUsedCriteria(Nothing, True) = "D:\Large Assembly"
            application.FindWhereUsedDocuments(strPath, arrDocUsed)

        Catch ex As System.Exception
            MsgBox(ex.ToString)
        Finally
            application.Quit()
        End Try

    End Sub
End Class
using System;
using System.Windows.Forms;
using System.IO;

public class Form1
{

    private void Button1_Click(object sender, EventArgs e)
    {
        DesignManager.Application application = null;
        FileInfo strPath = new FileInfo("D:\\Large Assembly\\Part1.par");
        object[] arrDocUsed = null;

        try
        {
            application = new DesignManager.Application();
            application.Visible = true;
            application.WhereUsedCriteria(null, true) = "D:\\Large Assembly";
            application.FindWhereUsedDocuments(strPath, arrDocUsed);

        }
        catch (System.Exception ex)
        {
            MessageBox.Show(ex.ToString());
        }
        finally
        {
            application.Quit();
        }

    }
}
See Also

Application Object  | Application Members