Solid Edge Part Type Library
SetNumberOfProcessors Method
Set 'use multiple processors' option to True or False.
Set Number of processors.
Description
Set 'use multiple processors' option and number of processors on the system
Syntax
Visual Basic
Public Sub SetNumberOfProcessors( _
   ByVal bUseMultiProcessors As Long, _
   ByVal nNumOfProcessors As Integer _
) 
Parameters
bUseMultiProcessors
Set 'use multiple processors' option to True or False.
nNumOfProcessors
Set Number of processors.
Remarks
In SetNumberOfProcessors API, if user specified no. of processors are more than the total no. of processors present on the system then total no. of processors present on the system will be set.
Example
Imports System.Runtime.InteropServices

Public Class Form1

    Private Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click
        Dim objApplication As SolidEdgeFramework.Application = Nothing
        Dim objPart As SolidEdgePart.PartDocument = Nothing
        Dim objstudyOwner As SolidEdgePart.StudyOwner = Nothing
        Dim objStudy As SolidEdgePart.Study = Nothing
        Dim dwUseMultiProcessors As Boolean
        Dim dwNumOfProcessors As Integer

        Try
            objApplication = Marshal.GetActiveObject("SolidEdge.Application")
            objPart = objApplication.ActiveDocument
            objstudyOwner = objPart.StudyOwner
            ' Get study object
            objStudy = objstudyOwner.Item(1)

            objStudy.GetNumberOfProcessors(dwUseMultiProcessors, dwNumOfProcessors)
            objStudy.SetNumberOfProcessors(True, 3)

        Catch ex As Exception
            MessageBox.Show(ex.ToString)
        End Try

    End Sub
End Class
See Also

Study Object  | Study Members