Hide Table of Contents
AddSelection2 Method (IEdmBatchItemGeneration2)

Adds information to the batch to generate a new item either from a file or stand-alone without a source file.


Visual Basic (Declaration) 
Sub AddSelection2( _
   ByVal poVault As EdmVault5, _
   ByVal poVariables() As EdmVarVal, _
   Optional ByVal bsItemName As System.String, _
   Optional ByVal lDestFolderID As System.Integer, _
   Optional ByVal lSrcFileID As System.Integer, _
   Optional ByVal lSrcFileProjID As System.Integer, _
   Optional ByVal bsSrcFileConfig As System.String, _
   Optional ByVal lEdmRefFlags As System.Integer _
void AddSelection2( 
   EdmVault5 poVault,
   EdmVarVal[] poVariables,
   System.string bsItemName,
   System.int lDestFolderID,
   System.int lSrcFileID,
   System.int lSrcFileProjID,
   System.string bsSrcFileConfig,
   System.int lEdmRefFlags
void AddSelection2( 
&   EdmVault5^ poVault,
&   array<EdmVarVal>^ poVariables,
&   System.String^ bsItemName,
&   System.int lDestFolderID,
&   System.int lSrcFileID,
&   System.int lSrcFileProjID,
&   System.String^ bsSrcFileConfig,
&   System.int lEdmRefFlags


IEdmVault5; vault in which to create the new item
Optional array of EdmVarVal structures; variables to write to the item
Name of new item; if left blank, the serial number generator assigns the name
ID of the folder in which to place the new item; if left blank, the new item is placed in the item root folder
ID of the file from which to create the item; if 0 or blank, no link is created
ID of the parent folder of lSrcFileID; only valid if lSrcFileID is not 0 or blank
Name of the configuration in the source file to which to link the new item
Combination of EdmRefFlags bits



This method supersedes IEdmBatchItemGeneration::AddSelection by adding the ability to create stand-alone items without a source file.

To create a stand-alone item, you must call this method specifying poVault at a minimum. You can optionally specify poVariables and bsItemName to create a stand-alone item. The other parameters are only used to create new items from files.

After calling this method, call IEdmBatchItemGeneration::CreateTree.

Return codes:

  • S_OK: The method successfully executed.
  • S_FALSE: One of the arguments is invalid.

See Also


SolidWorks Enterprise PDM 2010

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:   AddSelection2 Method (IEdmBatchItemGeneration2)
*   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.