DMDirector_AddFolderAndFiles
Add folders and files to a specified library and folder paths in the library.
Syntax
DMDirector_AddFolderAndFiles <director handle> <library handle> <workspace handle> <hw string list of files/folders to add> <hw string list of files/folders to exclude> <folder path>
Type/Class
DMDirector
Description
- director handle
- Director handle
- workspace handle
- Workspace handle
- library handle
- Library Handle
- hw string list of files/folders to add
- hw string list of folders/files to be added
- hw string list of files/folders to exclude
- hw string list of files/folders to be excluded
- folder path
- Virtual folder in the library. For example, if you want to add files to a folder "Folder_Name" in the library the path would be / Folder_Name. If you want to add the files/folders under root it would be “/” as shown in the example below. Returns a process ID of the indexing process.
Examples
set altairHome [file dirname $::env(ALTAIR_LIB_MGR_PATH)]
set fileDefaultSettings [file join "$altairHome" hw tcl hweDataMgr librarymanager.xml]
set settings [CreateDefaultSettings "$fileDefaultSettings"]
set director [new_DMDirector $settings {C:\Documents and Settings\username\.Altair\11.2\hwe\organize\master\master.db}
set liblist [LibraryList]
set wslist [WorkSpaceList]
DMDirector_GetLibraries $director $liblist username ""
DMDirector_GetWorkspaces $director $wslist username
set lib [LibraryList_at $liblist $idx]
set registeredlib [Library_GetName $lib]
set ws [WorkSpaceList_at $wslist 0]
set lsExcluded [hwStringList]
$lsExcluded push_back ""
set strFolderPath "/"
set lsSelectedDirs [hwStringList]
foreach fil $repfilepath {
$lsSelectedDirs push_back "$fil"
}
set pid [DMDirector_AddFolderAndFiles $director $lib $ws $lsSelectedDirs $lsExcluded $strFolderPath]
set refreshProc ::hwe::tkLM::RefreshAfterIndexing
while {[::hwe::LMUtils::RefreshAfterIndexing $pid $repfilepath $registeredlib "Default" $refreshProc] > 0} {
continue
}