Compare commits
6 Commits
e5b8df7ee8
...
7ebb532626
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
7ebb532626 | ||
|
|
47065c19a3 | ||
|
|
2cf837cc92 | ||
|
|
fdc994e25f | ||
|
|
643e62aca1 | ||
|
|
db4457fe3f |
@@ -55,6 +55,8 @@ Public Class File
|
||||
Dim oCleanName As String = FileName
|
||||
oCleanName = Regex.Replace(oCleanName, _invalidFilenameChars, String.Empty)
|
||||
oCleanName = Regex.Replace(oCleanName, REGEX_CLEAN_FILENAME, String.Empty, RegexOptions.Singleline)
|
||||
oCleanName = Regex.Replace(oCleanName, "\s{2,}", " ")
|
||||
oCleanName = Regex.Replace(oCleanName, "\.{2,}", ".")
|
||||
|
||||
_Logger.Debug("Filename after cleaning: [{0}]", oCleanName)
|
||||
|
||||
|
||||
@@ -31,5 +31,5 @@ Imports System.Runtime.InteropServices
|
||||
' übernehmen, indem Sie "*" eingeben:
|
||||
' <Assembly: AssemblyVersion("1.0.*")>
|
||||
|
||||
<Assembly: AssemblyVersion("1.0.6.0")>
|
||||
<Assembly: AssemblyFileVersion("1.0.6.0")>
|
||||
<Assembly: AssemblyVersion("1.0.7.0")>
|
||||
<Assembly: AssemblyFileVersion("1.0.7.0")>
|
||||
|
||||
@@ -31,5 +31,5 @@ Imports System.Runtime.InteropServices
|
||||
' übernehmen, indem Sie "*" eingeben:
|
||||
' <Assembly: AssemblyVersion("1.0.*")>
|
||||
|
||||
<Assembly: AssemblyVersion("1.3.0.0")>
|
||||
<Assembly: AssemblyFileVersion("1.3.0.0")>
|
||||
<Assembly: AssemblyVersion("1.3.1.0")>
|
||||
<Assembly: AssemblyFileVersion("1.3.1.0")>
|
||||
|
||||
@@ -136,6 +136,10 @@ Public Class Utils
|
||||
' Remove Invalid filename characters
|
||||
oResult = Regex.Replace(oResult, InvalidChars.Paths, String.Empty)
|
||||
|
||||
' Remove Uneccessary characters
|
||||
oResult = Regex.Replace(oResult, "\s{2,}", " ")
|
||||
oResult = Regex.Replace(oResult, "\.{2,}", ".")
|
||||
|
||||
' Remove excess space chars
|
||||
oResult = oResult.Trim()
|
||||
|
||||
|
||||
@@ -31,5 +31,5 @@ Imports System.Runtime.InteropServices
|
||||
' übernehmen, indem Sie "*" eingeben:
|
||||
' <Assembly: AssemblyVersion("1.0.*")>
|
||||
|
||||
<Assembly: AssemblyVersion("1.2.1.0")>
|
||||
<Assembly: AssemblyFileVersion("1.2.1.0")>
|
||||
<Assembly: AssemblyVersion("1.2.2.0")>
|
||||
<Assembly: AssemblyFileVersion("1.2.2.0")>
|
||||
|
||||
@@ -893,6 +893,23 @@ Public Class Windream
|
||||
End Try
|
||||
End Function
|
||||
|
||||
Public Function GetVectorData(FilePath As String, IndexName As String, NewValues As Object, CheckDuplicates As Boolean) As String()
|
||||
Try
|
||||
Dim oWMObject = GetFileByPath(FilePath)
|
||||
Dim oObjectArray As Object() = GetVektorData_Combined(oWMObject, IndexName, NewValues, CheckDuplicates)
|
||||
Dim oStringArray As New List(Of String)
|
||||
|
||||
For Each oObjectValue In oObjectArray
|
||||
oStringArray.Add(oObjectValue.ToString)
|
||||
Next
|
||||
|
||||
Return oStringArray.ToArray
|
||||
Catch ex As Exception
|
||||
_logger.Error(ex)
|
||||
Return Nothing
|
||||
End Try
|
||||
End Function
|
||||
|
||||
''' <summary>
|
||||
''' Gets an array of the actual vektorvalues of index, collated with the passed values
|
||||
''' </summary>
|
||||
@@ -901,7 +918,7 @@ Public Class Windream
|
||||
''' <param name="NewValues">The new values as Array</param>
|
||||
''' <param name="CheckDuplikat">True if duplicates shall be prevented</param>
|
||||
''' <exception cref="Exceptions.SessionException"></exception>
|
||||
Public Function GetVektorData_Combined(ByVal WindreamObject As WMObject, IndexName As String, NewValues As Object, CheckDuplikat As Boolean)
|
||||
Public Function GetVektorData_Combined(ByVal WindreamObject As WMObject, IndexName As String, NewValues As Object(), CheckDuplikat As Boolean)
|
||||
Try
|
||||
Dim oAnzahl As Integer = 0
|
||||
Dim oValueArray()
|
||||
@@ -1494,18 +1511,19 @@ Public Class Windream
|
||||
End Try
|
||||
End Function
|
||||
|
||||
Private Function GetObjectByPath(ObjectName As String, ObjectType As WMEntity) As WMObject
|
||||
Private Function GetObjectByPath(ObjectPath As String, ObjectType As WMEntity) As WMObject
|
||||
If TestSessionLoggedIn() = False Then
|
||||
Return Nothing
|
||||
End If
|
||||
|
||||
If TestObjectExists(ObjectName, ObjectType) = False Then
|
||||
_logger.Warn("GetObjectByPath: Object {0} does not exist!", ObjectName)
|
||||
If TestObjectExists(ObjectPath, ObjectType) = False Then
|
||||
_logger.Warn("GetObjectByPath: Object {0} does not exist!", ObjectPath)
|
||||
Return Nothing
|
||||
End If
|
||||
|
||||
Try
|
||||
Dim oWMObject As WMObject = Session.GetWMObjectByPath(ObjectType, ObjectName)
|
||||
Dim oNormalizedPath = GetNormalizedPath(ObjectPath)
|
||||
Dim oWMObject As WMObject = Session.GetWMObjectByPath(ObjectType, oNormalizedPath)
|
||||
Return oWMObject
|
||||
Catch ex As Exception
|
||||
_logger.Error(ex)
|
||||
|
||||
Reference in New Issue
Block a user