windream 1.9.6.2
This commit is contained in:
parent
66328bb243
commit
ceb618dc57
@ -31,5 +31,5 @@ Imports System.Runtime.InteropServices
|
|||||||
' übernehmen, indem Sie "*" eingeben:
|
' übernehmen, indem Sie "*" eingeben:
|
||||||
' <Assembly: AssemblyVersion("1.0.*")>
|
' <Assembly: AssemblyVersion("1.0.*")>
|
||||||
|
|
||||||
<Assembly: AssemblyVersion("1.9.6.1")>
|
<Assembly: AssemblyVersion("1.9.6.2")>
|
||||||
<Assembly: AssemblyFileVersion("1.9.6.1")>
|
<Assembly: AssemblyFileVersion("1.9.6.2")>
|
||||||
|
|||||||
@ -1,20 +1,17 @@
|
|||||||
Imports System.IO
|
Imports System.IO
|
||||||
Imports System.IO.Path
|
Imports System.IO.Path
|
||||||
Imports System.Text.RegularExpressions
|
Imports System.Text.RegularExpressions
|
||||||
|
Imports DigitalData.Modules.Base
|
||||||
|
Imports DigitalData.Modules.Logging
|
||||||
Imports WINDREAMLib
|
Imports WINDREAMLib
|
||||||
Imports WINDREAMLib.WMCOMEvent
|
Imports WINDREAMLib.WMCOMEvent
|
||||||
Imports WINDREAMLib.WMEntity
|
Imports WINDREAMLib.WMEntity
|
||||||
Imports WINDREAMLib.WMObjectEditMode
|
Imports WINDREAMLib.WMObjectEditMode
|
||||||
|
Imports WMCNNCTDLLLib
|
||||||
Imports WMOBRWSLib
|
Imports WMOBRWSLib
|
||||||
Imports WMOSRCHLib
|
Imports WMOSRCHLib
|
||||||
Imports WMCNNCTDLLLib
|
|
||||||
Imports WMOTOOLLib
|
Imports WMOTOOLLib
|
||||||
|
|
||||||
Imports DigitalData.Modules.Logging
|
|
||||||
Imports DigitalData.Modules.Language
|
|
||||||
Imports DigitalData.Modules.Base
|
|
||||||
|
|
||||||
''' <module>Windream</module>
|
''' <module>Windream</module>
|
||||||
''' <version>0.0.0.2</version>
|
''' <version>0.0.0.2</version>
|
||||||
''' <date>23.10.2018</date>
|
''' <date>23.10.2018</date>
|
||||||
@ -1268,52 +1265,53 @@ Public Class Windream
|
|||||||
End Try
|
End Try
|
||||||
End Function
|
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
|
If TestSessionLoggedIn() = False Then
|
||||||
Return False
|
Return False
|
||||||
End If
|
End If
|
||||||
|
|
||||||
If TestFileExists(Path) = False Then
|
If TestFileExists(pPath) = False Then
|
||||||
_logger.Warn("File '{0}' does not exist", Path)
|
_logger.Warn("File '{0}' does not exist", pPath)
|
||||||
Return False
|
Return False
|
||||||
End If
|
End If
|
||||||
Dim oWMObject As IWMObject6
|
Dim oWMObject As IWMObject6
|
||||||
|
|
||||||
Try
|
Try
|
||||||
oWMObject = GetFileByPath(Path)
|
'Create the windream-Object via path
|
||||||
|
oWMObject = GetFileByPath(pPath)
|
||||||
Catch ex As Exception
|
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)
|
_logger.Warn(ex.Message)
|
||||||
Return False
|
Return False
|
||||||
End Try
|
End Try
|
||||||
|
'Lock WMObject for changes
|
||||||
If LockObject(oWMObject, WMObjectEditModeIndexEdit) = False Then
|
If LockObject(oWMObject, WMObjectEditModeIndexEdit) = False Then
|
||||||
_logger.Warn("File {0} could not be locked")
|
_logger.Warn("File {0} could not be locked")
|
||||||
Return False
|
Return False
|
||||||
End If
|
End If
|
||||||
|
|
||||||
If oWMObject.aObjectType.aName = Constants.OBJECT_TYPE_DEFAULT Then
|
If oWMObject.aObjectType.aName = Constants.OBJECT_TYPE_DEFAULT Then
|
||||||
oWMObject.aObjectType = GetObjectByName(ObjectType, WMEntityObjectType)
|
oWMObject.aObjectType = GetObjectByName(pObjectType, WMEntityObjectType)
|
||||||
End If
|
End If
|
||||||
|
|
||||||
Try
|
Try
|
||||||
Dim oType As Integer = GetIndexType(IndexName)
|
Dim oType As Integer = GetIndexType(pIndexName)
|
||||||
Dim oConvertedValues As New List(Of String)
|
Dim oConvertedValues As New List(Of String)
|
||||||
Dim oArray As Object
|
Dim oArray As Object
|
||||||
_logger.Debug("SetFileIndexLoS '{0}' - Indextype: {1} - Values.Count: {2} ... ", IndexName, oType, Values.Count)
|
_logger.Debug("SetFileIndexLoS '{0}' - Indextype: {1} - Values.Count: {2} ... ", pIndexName, oType, pAttributeValues.Count)
|
||||||
ReDim oArray(Values.Count - 1)
|
ReDim oArray(pAttributeValues.Count - 1)
|
||||||
|
|
||||||
For oIndex = 0 To Values.Count - 1
|
For oIndex = 0 To pAttributeValues.Count - 1
|
||||||
Dim oValue As Object = Helpers.ConvertAttrValue(oType, Values.Item(oIndex))
|
Dim oValue As Object = Helpers.ConvertAttrValue(oType, pAttributeValues.Item(oIndex))
|
||||||
_logger.Debug("Converted Value: {0}", oValue.ToString)
|
_logger.Debug("Converted Value: {0}", oValue.ToString)
|
||||||
oArray(oIndex) = oValue
|
oArray(oIndex) = oValue
|
||||||
Next
|
Next
|
||||||
|
|
||||||
oWMObject.SetVariableValue(IndexName, oArray)
|
oWMObject.SetVariableValue(pIndexName, oArray)
|
||||||
oWMObject.Save()
|
oWMObject.Save()
|
||||||
|
|
||||||
If UnlockObject(oWMObject) = False Then
|
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
|
End If
|
||||||
|
|
||||||
Return True
|
Return True
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user