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.

Syntax

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 _
) 
C# 
void AddSelection2( 
   EdmVault5 poVault,
   EdmVarVal[] poVariables,
   System.string bsItemName,
   System.int lDestFolderID,
   System.int lSrcFileID,
   System.int lSrcFileProjID,
   System.string bsSrcFileConfig,
   System.int lEdmRefFlags
)
C++/CLI 
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
) 

Parameters

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

Example

Remarks

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

Availability

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

 
*Email:  
Subject:   Feedback on Help Topics
Page:   AddSelection2 Method (IEdmBatchItemGeneration2)
*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) 2015 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.