Solid Edge Part Type Library
SetActivePlot Method
Description
Set a specifc plot as active.
Syntax
Visual Basic
Public Sub SetActivePlot( _
   ByVal pActivePlot As Object _
) 
Parameters
pActivePlot
Example
Imports System.IO
Imports System.Runtime.InteropServices

Module Example
    <STAThread()> _
    Sub Main()
        Dim objApplication As SolidEdgeFramework.Application = Nothing
        Dim objPartDocument As SolidEdgePart.PartDocument = Nothing
        Dim objStudyOwner As SolidEdgePart.StudyOwner = Nothing
        Dim objStudy As SolidEdgePart.Study = Nothing
        Dim objMode As SolidEdgePart.Mode = Nothing
        Dim objPlotsOwner As SolidEdgePart.PlotsOwner = Nothing
        Dim objPlot As SolidEdgePart.Plot = Nothing

        Try
            OleMessageFilter.Register()

            ' Connect to Solid Edge
            objApplication = Marshal.GetActiveObject("SolidEdge.Application")
            objPartDocument = objApplication.ActiveDocument

            objStudyOwner = objPartDocument.StudyOwner
            objStudy = objStudyOwner.Item(1)

            ' This will give us active plotsowner.
            objStudy.GetPlotsOwner(objPlotsOwner)

            ' Get third plot object
            objPlot = objPlotsOwner.Item(3)

            'Set it as the active plot.
            objPlotsOwner.SetActivePlot(objPlot)

        Catch ex As Exception
            Console.WriteLine(ex.Message)
        Finally
            OleMessageFilter.Revoke()
        End Try
    End Sub
End Module
See Also

PlotsOwner Object  | PlotsOwner Members  | Solid Edge ST3 - What's New