ISWiComponentSubFolders Collection

Project:This information applies to the following project types:

InstallScript
InstallScript Object

ISWiComponentSubFolders is a collection that contains every component subfolder (as an ISWiComponentSubFolder object) in the current component or component subfolder. For example, the following Visual Basic code illustrates how you would apply a method to a specific component subfolder:

Dim pProj As ISWiProject

Set pProj = CreateObject("IswiAutoAutomation Interface Version.ISWiProject")

pProj.OpenProject "C:\MySetups\Project1.ism"

Dim pFeature As ISWiFeature

Dim pComponent As ISWiComponent

 

Set pFeature = pProj.ISWiFeatures.Item("MyFeature")

Set pComponent = pFeature.ISWiComponents.Item("MyComp")

pComponent.ISWiComponentSubFolders.Item("MyCompSubFolder").AddFile("C:\My Files\MyFile.ext")

 

pProj.SaveProject

pProj.CloseProject

Members

ISWiComponentSubFolders Collection Members

Name

Type

Description

Count

Read-Only Property

Use this property to return the total number of component subfolders in the ISWiComponentSubFolders collection.

Item

Read-Only Property

Provide the index number or name of the component subfolder to retrieve the ISWiComponentSubFolder object. For example, the following statements create references to the first component subfolder in the collection and the component subfolder named MyCompSubFolder:

    Set pComponentSubFolder1 = pProj.ISWiComponentSubFolders.Item(1)

    Set pComponentSubFolder2 = pFeature.ISWiComponentSubFolders.Item("MyCompSubFolder")

Item is the default property for ISWiComponentSubFolders, which means that pFeature.ISWiComponentSubFolders.Item("MyCompSubFolder") is equivalent to pFeature.ISWiComponentSubFolders("MyCompSubFolder").

Applies To

ISWiComponent 
ISWiComponentSubFolder