diff --git a/Windream/My Project/AssemblyInfo.vb b/Windream/My Project/AssemblyInfo.vb index 916f9dd8..15623946 100644 --- a/Windream/My Project/AssemblyInfo.vb +++ b/Windream/My Project/AssemblyInfo.vb @@ -31,5 +31,5 @@ Imports System.Runtime.InteropServices ' übernehmen, indem Sie "*" eingeben: ' - - + + diff --git a/Windream/Windream.vb b/Windream/Windream.vb index 7cf603a0..e667d3ec 100644 --- a/Windream/Windream.vb +++ b/Windream/Windream.vb @@ -1,20 +1,17 @@ Imports System.IO Imports System.IO.Path Imports System.Text.RegularExpressions - +Imports DigitalData.Modules.Base +Imports DigitalData.Modules.Logging Imports WINDREAMLib Imports WINDREAMLib.WMCOMEvent Imports WINDREAMLib.WMEntity Imports WINDREAMLib.WMObjectEditMode +Imports WMCNNCTDLLLib Imports WMOBRWSLib Imports WMOSRCHLib -Imports WMCNNCTDLLLib Imports WMOTOOLLib -Imports DigitalData.Modules.Logging -Imports DigitalData.Modules.Language -Imports DigitalData.Modules.Base - ''' Windream ''' 0.0.0.2 ''' 23.10.2018 @@ -1268,52 +1265,53 @@ Public Class Windream End Try End Function - Public Function SetFileIndexLoS(Path As String, IndexName As String, Values As List(Of String), ObjectType As String) As Boolean + Public Function SetFileIndexLoS(pPath As String, pIndexName As String, pAttributeValues As List(Of String), pObjectType As String) As Boolean If TestSessionLoggedIn() = False Then Return False End If - If TestFileExists(Path) = False Then - _logger.Warn("File '{0}' does not exist", Path) + If TestFileExists(pPath) = False Then + _logger.Warn("File '{0}' does not exist", pPath) Return False End If Dim oWMObject As IWMObject6 Try - oWMObject = GetFileByPath(Path) + 'Create the windream-Object via path + oWMObject = GetFileByPath(pPath) Catch ex As Exception - _logger.Warn("Could not create a WMObject for path '{0}'!!", Path) + _logger.Warn("Could not create a WMObject for path '{0}'!!", pPath) _logger.Warn(ex.Message) Return False End Try - + 'Lock WMObject for changes If LockObject(oWMObject, WMObjectEditModeIndexEdit) = False Then _logger.Warn("File {0} could not be locked") Return False End If If oWMObject.aObjectType.aName = Constants.OBJECT_TYPE_DEFAULT Then - oWMObject.aObjectType = GetObjectByName(ObjectType, WMEntityObjectType) + oWMObject.aObjectType = GetObjectByName(pObjectType, WMEntityObjectType) End If Try - Dim oType As Integer = GetIndexType(IndexName) + Dim oType As Integer = GetIndexType(pIndexName) Dim oConvertedValues As New List(Of String) Dim oArray As Object - _logger.Debug("SetFileIndexLoS '{0}' - Indextype: {1} - Values.Count: {2} ... ", IndexName, oType, Values.Count) - ReDim oArray(Values.Count - 1) + _logger.Debug("SetFileIndexLoS '{0}' - Indextype: {1} - Values.Count: {2} ... ", pIndexName, oType, pAttributeValues.Count) + ReDim oArray(pAttributeValues.Count - 1) - For oIndex = 0 To Values.Count - 1 - Dim oValue As Object = Helpers.ConvertAttrValue(oType, Values.Item(oIndex)) + For oIndex = 0 To pAttributeValues.Count - 1 + Dim oValue As Object = Helpers.ConvertAttrValue(oType, pAttributeValues.Item(oIndex)) _logger.Debug("Converted Value: {0}", oValue.ToString) oArray(oIndex) = oValue Next - oWMObject.SetVariableValue(IndexName, oArray) + oWMObject.SetVariableValue(pIndexName, oArray) oWMObject.Save() If UnlockObject(oWMObject) = False Then - _logger.Warn("File {0} could not be unlocked", Path) + _logger.Warn("File {0} could not be unlocked", pPath) End If Return True