HyperWorks Desktop

DMDirector_AddFolderAndFiles

DMDirector_AddFolderAndFiles

Previous topic Next topic No expanding text in this topic  

DMDirector_AddFolderAndFiles

Previous topic Next topic JavaScript is required for expanding text JavaScript is required for the print function  

NAME  


DMDirector_AddFolderAndFiles

 

 

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


Add folders and files to specified library and folder paths in the library

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

}

Note:The above proc ::hwe::LMUtils::RefreshAfterIndexing is used to check if the indexing of the file/folders is complete.

 

ERRORS


 

SEE ALSO


LibraryList

new_DMDirector