Hide Table of Contents
OnSubmitSelection Method (IPropertyManagerPage2Handler6)

Obsoleted. Superseded by IPropertyManagerPage2Handler7::OnSubmitSelection.

.NET Syntax

Visual Basic (Declaration) 
Function OnSubmitSelection( _
   ByVal Id As System.Integer, _
   ByVal Selection As System.Object, _
   ByVal SelType As System.Integer, _
   ByRef ItemText As System.String _
) As System.Boolean
Visual Basic (Usage) 
Dim instance As IPropertyManagerPage2Handler6
Dim Id As System.Integer
Dim Selection As System.Object
Dim SelType As System.Integer
Dim ItemText As System.String
Dim value As System.Boolean
value = instance.OnSubmitSelection(Id, Selection, SelType, ItemText)
System.bool OnSubmitSelection( 
   System.int Id,
   System.object Selection,
   System.int SelType,
   out System.string ItemText
System.bool OnSubmitSelection( 
&   System.int Id,
&   System.Object^ Selection,
&   System.int SelType,
&   [Out] System.String^ ItemText


ID of the active selection box, where this selection is being made
Object being selected
Entity type of the selection as defined in swSelectType_e
Item for selection list box (see Remarks)

Return Value

True if the selection is accepted, false if the selection is rejected


If writing a VBA macro, then you must set this method to true for the user to select something. If this method is not set to true, then the user cannot select anything. This method is set to false by default.

This method is called by SolidWorks when an add-in has a PropertyManager page displayed and a selection is made that passes the selection filter criteria set up for a selection list box. The add-in can then:

  • Take the Dispatch pointer and the selection type.
  • QueryInterface the Dispatch pointer to get the specific interface.
  • Use APIs of that interface to determine if the selection should be allowed or not.  
    • If the selection is accepted, return True, and processing will continue normally.

      - or -

    • If the selection is rejected, return false, and SolidWorks will not accept the selection, just as if the selection did not pass the selection filter criteria of the selection list box.  

The add-in should not Release() the Dispatch pointer. SolidWorks will Release() the Dispatch pointer upon return from this method.


The method is called during the process of SolidWorks selection. It is neither a pre-notification nor post-notification. The add-in should not be taking any action that might affect the model or the selection list. The add-in should only be querying information and then returning True/VARIANT_TRUE or false/VARIANT_FALSE.


ItemText is returned to SolidWorks and stored on the selected object and can be used by your PropertyManager page selection list boxes for the life of that selection.


See Also


SolidWorks 2009 FCS, Revision Number 17.0

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

Subject:   Feedback on Help Topics
Page:   OnSubmitSelection Method (IPropertyManagerPage2Handler6)
*   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:


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

Web Help Content Version: API Help (English only) 2014 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.