Hide Table of Contents
DAssemblyDocEvents_LargeDesignReviewStateChangeNotifyEventHandler Delegate (SolidWorks.Interop.sldworks)

Fired when the Large Design Review state changes in this assembly.

.NET Syntax

Visual Basic (Declaration) 
Public Delegate Function DAssemblyDocEvents_LargeDesignReviewStateChangeNotifyEventHandler( _
   ByVal PreviousState As System.Short, _
   ByVal NewState As System.Short _
) As System.Integer
Visual Basic (Usage) 
Dim instance As New DAssemblyDocEvents_LargeDesignReviewStateChangeNotifyEventHandler(AddressOf HandlerMethod)
C# 
public delegate System.int DAssemblyDocEvents_LargeDesignReviewStateChangeNotifyEventHandler( 
   System.short PreviousState,
   System.short NewState
)
C++/CLI 
public delegate System.int DAssemblyDocEvents_LargeDesignReviewStateChangeNotifyEventHandler( 
&   System.short PreviousState,
&   System.short NewState
)

Parameters

PreviousState
Old LDR state as defined by swAssemblyMode_e
NewState
New LDR state as defined by swAssemblyMode_e

Example

'VBA

'=============================================================

'1. Create a VBA macro with the module code below.

'2. Copy the Class1 code below into a new Class1 module.

'3. Open an assembly

'4. Run the macro.

'5. In the user interface, change the LDR state of the assembly.

'6. A message box appears when the LDR state changes.

'==================================================

'module

Dim swApp As SldWorks.SldWorks

Dim swModel As SldWorks.ModelDoc2

Dim swDocSpecification As SldWorks.DocumentSpecification

Dim swAssemblyEvents As Class1

Dim swAssembly As SldWorks.AssemblyDoc

Option Explicit

Sub main()

    Set swApp = Application.SldWorks

    Set swModel = swApp.ActiveDoc

    Set swAssembly = swModel

   

    ' Set up event

    Set swAssemblyEvents = New Class1

    Set swAssemblyEvents.swAssembly = swAssembly

End Sub

‘Class1 module

Public WithEvents swAssembly As SldWorks.AssemblyDoc

Private Function swAssembly_LargeDesignReviewStateChangeNotify(ByVal PreviousState As Integer, ByVal NewState As Integer) As Long

   

    If (PreviousState = swAssemblyMode_LDR) Then

   

        If (NewState = swAssemblyMode_LDR_EditAssembly) Then

            MsgBox " Document state change from LDR to LDR Edit Assembly Mode", vbOKOnly, "LDR state change"

        ElseIf (NewState = swAssemblyMode_LightWeight) Then

            MsgBox " Document state change from LDR to LightWeight Assembly Mode", vbOKOnly, "LDR state change"

        ElseIf (NewState = swAssemblyMode_Resolved) Then

             MsgBox " Document state change from LDR to Resolve Assembly Mode", vbOKOnly, "LDR state change"

        Else

              MsgBox "Invalid Notification"

        End If

   

    ElseIf (PreviousState = swAssemblyMode_LDR_EditAssembly) Then

   

        If (NewState = swAssemblyMode_LightWeight) Then

             MsgBox " Document state change from LDR Edit assembly to LightWeight Assembly Mode", vbOKOnly, "LDR state change"

        ElseIf (NewState = swAssemblyMode_Resolved) Then

              MsgBox " Document state change from LDR Edit assembly to Resolve Assembly Mode", vbOKOnly, "LDR state change"

        Else

              MsgBox "Invalid notification"

        End If

   

    Else

         MsgBox "Invalid notification"

        

    End If

 

Remarks

If developing a C++ application, use swAssemblyLargeDesignReviewStateChangeNotify to register for this notification.

Availability

SOLIDWORKS 2024 SP02, Revision Number 32.2


Provide feedback on this topic

SOLIDWORKS welcomes your feedback concerning the presentation, accuracy, and thoroughness of the documentation. Use the form below to send your comments and suggestions about this topic directly to our documentation team. The documentation team cannot answer technical support questions. Click here for information about technical support.

* Required

 
*Email:  
Subject:   Feedback on Help Topics
Page:   DAssemblyDocEvents_LargeDesignReviewStateChangeNotifyEventHandler Delegate (SolidWorks.Interop.sldworks)
*Comment:  
*   I acknowledge I have read and I hereby accept the privacy policy under which my Personal Data will be used by Dassault Systèmes

Print Topic

Select the scope of content to print:

x

We have detected you are using a browser version older than Internet Explorer 7. For optimized display, we suggest upgrading your browser to Internet Explorer 7 or newer.

 Never show this message again
x

Web Help Content Version: API Help (English only) 2024 SP05

To disable Web help from within SOLIDWORKS and use local help instead, click Help > Use SOLIDWORKS Web Help.

To report problems encountered with the Web help interface and search, contact your local support representative. To provide feedback on individual help topics, use the “Feedback on this topic” link on the individual topic page.