Skip to content

Commit

Permalink
Documentation
Browse files Browse the repository at this point in the history
See release_notes.md for V2024.3
  • Loading branch information
rmcanany committed Oct 2, 2024
1 parent 1ef5faa commit dfaecff
Show file tree
Hide file tree
Showing 5 changed files with 108 additions and 94 deletions.
2 changes: 1 addition & 1 deletion My Project/Form_Main.vb
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ Imports Newtonsoft.Json

Public Class Form_Main

Public Property Version As String = "2024.2.1" ' Two fields, both integers: Year.ReleaseNumber. Can include a bugfix number which is ignored
Public Property Version As String = "2024.3" ' Two fields, both integers: Year.ReleaseNumber. Can include a bugfix number which is ignored

Public Property UtilsLogFile As UtilsLogFile

Expand Down
16 changes: 0 additions & 16 deletions My Project/TaskCheckFlatPattern.vb
Original file line number Diff line number Diff line change
Expand Up @@ -100,22 +100,6 @@ Public Class TaskCheckFlatPattern

End Function

'Public Overrides Function GetTLPTask(TLPParent As ExTableLayoutPanel) As ExTableLayoutPanel
' ControlsDict = New Dictionary(Of String, Control)

' Dim IU As New InterfaceUtilities

' Me.TLPTask = IU.BuildTLPTask(Me, TLPParent)

' For Each Control As Control In Me.TLPTask.Controls
' If ControlsDict.Keys.Contains(Control.Name) Then
' MsgBox(String.Format("ControlsDict already has Key '{0}'", Control.Name))
' End If
' ControlsDict(Control.Name) = Control
' Next

' Return Me.TLPTask
'End Function

Public Overrides Function CheckStartConditions(
PriorErrorMessage As Dictionary(Of Integer, List(Of String))
Expand Down
155 changes: 90 additions & 65 deletions My Project/UtilsExecute.vb
Original file line number Diff line number Diff line change
Expand Up @@ -30,21 +30,12 @@ Public Class UtilsExecute
Dim ElapsedTime As Double
Dim ElapsedTimeText As String

'FMain.ReconcileFormChanges()
'Dim UD As New UtilsDefaults(FMain)
'UD.SaveDefaults()

Dim UP As New UtilsPreferences
UP.SaveFormMainSettings(FMain)

UP.SaveTaskList(FMain.TaskList)
'UP.SaveTemplatePropertyDict(FMain.TemplatePropertyDict)
'UP.SaveTemplatePropertyList(FMain.TemplatePropertyList)


ErrorMessage = CheckStartConditions()

'Dim LVF = Me.ListViewFiles
If ErrorMessage <> "" Then
FMain.Cursor = Cursors.Default
Dim result As MsgBoxResult = MsgBox(ErrorMessage, vbOKOnly, "Check start conditions")
Expand Down Expand Up @@ -149,13 +140,6 @@ Public Class UtilsExecute
Dim USEA = New UtilsSEApp
USEA.TextBoxStatus = Me.TextBoxStatus

'FMain.ReconcileFormChanges()

'If Not CheckBoxUseCurrentSession.Checked Then
' If USEA.SEIsRunning() Then
' msg += " Close Solid Edge" + Chr(13)
' End If
'End If
If Not FMain.UseCurrentSession Then
If USEA.SEIsRunning() Then
msg += " Close Solid Edge" + Chr(13)
Expand Down Expand Up @@ -403,6 +387,8 @@ Public Class UtilsExecute

Dim tf As Boolean

Dim Proceed As Boolean = True

' Account for infrequent malfunctions on a large number of files.
TotalAborts -= 0.1
If TotalAborts < 0 Then
Expand Down Expand Up @@ -430,75 +416,114 @@ Public Class UtilsExecute
SEApp.DoIdle()
End If

'############### Here its assumed that a task always need the file opened in Solid Edge
'############### This prevent the ability to process file with tasks that don't need Solid Edge
'############### A new option should be inserted to prevent this situation

Try
If FMain.SolidEdgeRequired > 0 Then
If (FMain.CheckBoxRunInBackground.Checked) And (Not Filetype = "Assembly") Then
SEDoc = SolidEdgeCommunity.Extensions.DocumentsExtensions.OpenInBackground(Of SolidEdgeFramework.SolidEdgeDocument)(SEApp.Documents, Path)

' Here is the same functionality without using the SolidEdgeCommunity dependency
' https://blogs.sw.siemens.com/solidedge/how-to-open-documents-silently/
' Dim JDOCUMENTPROP_NOWINDOW As UInt16 = 8
' SEDoc = DirectCast(SEApp.Documents.Open(Path, JDOCUMENTPROP_NOWINDOW), SolidEdgeFramework.SolidEdgeDocument)

Else
SEDoc = DirectCast(SEApp.Documents.Open(Path), SolidEdgeFramework.SolidEdgeDocument)
SEDoc.Activate()

' Maximize the window in the application
If Filetype = "Draft" Then
ActiveSheetWindow = CType(SEApp.ActiveWindow, SolidEdgeDraft.SheetWindow)
ActiveSheetWindow.WindowState = 2

' ############ This actually works, but needs testing -- not including in v2024.3 #############
'' Check versions
'Dim Version = SEApp.Version
'Dim InstalledVersion As Integer = CInt(Version.Split(CChar("."))(0))
'Dim DType As SolidEdgeFramework.DocumentTypeConstants = Nothing
'Dim CreatedVersion As String = ""
'Dim LSV As String = ""
'Dim GeometricVersion As UInteger = 0
'Try
' SEApp.SEGetFileVersionInfo(Path, DType, CreatedVersion, LSV, GeometricVersion)
'Catch ex As Exception
' Proceed = False
' ErrorMessagesCombined("Error opening file") = New List(Of String) From {""}
'End Try

'If Proceed Then
' Dim LastSavedVersion As Integer = CInt(LSV.Split(CChar("."))(0))
' If LastSavedVersion > InstalledVersion Then
' Proceed = False
' Dim s = String.Format("Can not open file. Version '{0}' is newer than installed version '{1}'", LastSavedVersion, InstalledVersion)
' ErrorMessagesCombined(s) = New List(Of String) From {""}
' End If
'End If

'If Proceed Then
' ' Check for corrupted file
' Dim PropertySets = New SolidEdgeFileProperties.PropertySets
' Try
' PropertySets.Open(Path, True)
' PropertySets.Close()
' PropertySets = Nothing
' Catch ex As Exception
' Proceed = False
' ErrorMessagesCombined("Error opening file") = New List(Of String) From {""}
' End Try
'End If

If Proceed Then
If (FMain.CheckBoxRunInBackground.Checked) And (Not Filetype = "Assembly") Then
SEDoc = SolidEdgeCommunity.Extensions.DocumentsExtensions.OpenInBackground(Of SolidEdgeFramework.SolidEdgeDocument)(SEApp.Documents, Path)

' Here is the same functionality without using the SolidEdgeCommunity dependency
' https://blogs.sw.siemens.com/solidedge/how-to-open-documents-silently/
' Dim JDOCUMENTPROP_NOWINDOW As UInt16 = 8
' SEDoc = DirectCast(SEApp.Documents.Open(Path, JDOCUMENTPROP_NOWINDOW), SolidEdgeFramework.SolidEdgeDocument)

Else
ActiveWindow = CType(SEApp.ActiveWindow, SolidEdgeFramework.Window)
ActiveWindow.WindowState = 2 '0 normal, 1 minimized, 2 maximized
SEDoc = DirectCast(SEApp.Documents.Open(Path), SolidEdgeFramework.SolidEdgeDocument)
SEDoc.Activate()

' Maximize the window in the application
If Filetype = "Draft" Then
ActiveSheetWindow = CType(SEApp.ActiveWindow, SolidEdgeDraft.SheetWindow)
ActiveSheetWindow.WindowState = 2
Else
ActiveWindow = CType(SEApp.ActiveWindow, SolidEdgeFramework.Window)
ActiveWindow.WindowState = 2 '0 normal, 1 minimized, 2 maximized
End If
End If
End If

SEApp.DoIdle()
End If
SEApp.DoIdle()

'Dim PropDict = TC.tmpGetSEProperties(SEDoc)
End If
End If

If Proceed Then
For Each Task As Task In FMain.TaskList
If Task.IsSelectedTask Then
tf = (Filetype = "Assembly") And (Task.IsSelectedAssembly)
tf = tf Or ((Filetype = "Part") And (Task.IsSelectedPart))
tf = tf Or ((Filetype = "Sheetmetal") And (Task.IsSelectedSheetmetal))
tf = tf Or ((Filetype = "Draft") And (Task.IsSelectedDraft))

For Each Task As Task In FMain.TaskList
If Task.IsSelectedTask Then
tf = (Filetype = "Assembly") And (Task.IsSelectedAssembly)
tf = tf Or ((Filetype = "Part") And (Task.IsSelectedPart))
tf = tf Or ((Filetype = "Sheetmetal") And (Task.IsSelectedSheetmetal))
tf = tf Or ((Filetype = "Draft") And (Task.IsSelectedDraft))
If tf Then

If tf Then
If FMain.SolidEdgeRequired > 0 Then
ErrorMessage = Task.Process(SEDoc, FMain.Configuration, SEApp)
Else
ErrorMessage = Task.Process(Path)
End If

If FMain.SolidEdgeRequired > 0 Then
ErrorMessage = Task.Process(SEDoc, FMain.Configuration, SEApp)
Else
ErrorMessage = Task.Process(Path)
End If
ExitStatus = ErrorMessage.Keys(0)

ExitStatus = ErrorMessage.Keys(0)
If ExitStatus <> 0 Then
ErrorMessagesCombined(Task.Description) = ErrorMessage(ErrorMessage.Keys(0))

If ExitStatus <> 0 Then
ErrorMessagesCombined(Task.Description) = ErrorMessage(ErrorMessage.Keys(0))
If ExitStatus = 99 Then
FMain.StopProcess = True
End If

If ExitStatus = 99 Then
FMain.StopProcess = True
End If

End If
End If
End If
Next
Next

End If

If FMain.SolidEdgeRequired > 0 Then
SEDoc.Close(False)
SEApp.DoIdle()
If Proceed Then
SEDoc.Close(False)
SEApp.DoIdle()
End If

' Deal with Document Status
If FMain.CheckBoxProcessAsAvailable.Checked Then
If FMain.CheckBoxProcessAsAvailable.Checked And FMain.SolidEdgeRequired > 0 Then
If FMain.RadioButtonProcessAsAvailableRevert.Checked Then
If Not OldStatus = SolidEdgeConstants.DocumentStatus.igStatusAvailable Then
StatusChangeSuccessful = UC.SetStatus(DMApp, Path, OldStatus)
Expand Down
22 changes: 11 additions & 11 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -146,17 +146,17 @@ An alternative method is to select files with errors from a previous run.

### Select by Folder

Choose this option to select files within a single folder, or a folder and its subfolders. Referring to the toolbar diagram, label 1, click ![Folder](Resources/icons8_Folder_16.png) to select a single folder, click ![Folders](Resources/icons8_folder_tree_16.png) for a folder and sub folders.
Choose this option to select files within a single folder, or a folder and its subfolders. Referring to the toolbar diagram, tool group 1, click ![Folder](Resources/icons8_Folder_16.png) to select a single folder, click ![Folders](Resources/icons8_folder_tree_16.png) for a folder and sub folders.

### Select by Top-Level Assembly

Choose this option to select files linked to an assembly. Referring to the toolbar diagram, label 2, click ![Assembly](Resources/ST9%20-%20asm.png) to choose the assembly, click ![Assembly Folders](Resources/icons8_Folders_16.png) to choose the search path for *where used* files.
Choose this option to select files linked to an assembly. Referring to the toolbar diagram, tool group 2, click ![Assembly](Resources/ST9%20-%20asm.png) to choose the assembly, click ![Assembly Folders](Resources/icons8_Folders_16.png) to choose the search path for *where used* files.

You would be asking for trouble specifying more than one top-level assembly. However, you can have any number of folders. Note the program always includes subfolders for *where used* files.

![Top level assembly options](My%20Project/media/configuration_tab_top_level_assembly_page.png)

A top level assembly search can optionally report files with no links to the assembly. Set this and other options on the dialog shown above.
A top level assembly search can optionally report files with no links to the assembly. Set this and other options on the **Configuration Tab -- Top Level Assembly Page** as shown above.

When selecting a top-level assembly, you can automatically include the folder in which it resides. This `auto include` option in on by default.

Expand All @@ -182,15 +182,15 @@ This option may be confusing. Referring to the diagram, note that `C.par` is a

### Select by list

Referring to the diagram, label 3, click ![Import List](Resources/icons8_Import_16.png) to import a list, click ![Export List](Resources/icons8_Export_16.png) to export one.
Referring to the toolbar diagram, tool group 3, click ![Import List](Resources/icons8_Import_16.png) to import a list, click ![Export List](Resources/icons8_Export_16.png) to export one.

If you are importing a list from another source, be aware that the file names must contain the full path. E.g., `D:\Projects\Project123\Partxyz.par`, not just `Partxyz.par`.

### Tools

#### Select files with errors from the previous run

Referring to the toolbar diagram, label 4, click ![Errors](Resources/icons8_Error_16.png) to select only files that encountered an error. All other files will be removed from the list. To reproduce the TODO list functionality from previous versions, you can export the resultant list if desired.
Referring to the toolbar diagram, tool group 4, click ![Errors](Resources/icons8_Error_16.png) to select only files that encountered an error. All other files will be removed from the list. To reproduce the TODO list functionality from previous versions, you can export the resultant list if desired.

#### Remove all

Expand All @@ -210,19 +210,19 @@ If you select one or more files on the list, you can click the right mouse butto

### Update

Referring to the toolbar diagram, label 5, the update button ![Update](Resources/Synch_16.png) populates the file list from the File Sources and Filters. If any Sources are added or removed, or a change is made to a Filter (see [<ins>**Filtering**</ins>](#filtering) below), an update is required. In those cases the button will turn orange to let you know.
Referring to the toolbar diagram, tool group 5, the update button ![Update](Resources/Synch_16.png) populates the file list from the File Sources and Filters. If any Sources are added or removed, or a change is made to a Filter (see [<ins>**Filtering**</ins>](#filtering) below), an update is required. In those cases the button will turn orange to let you know.

### File Type

Referring to the toolbar diagram, label 6, you can limit the search to return only selected types of Solid Edge files. To do so, check/uncheck the appropriate File Type ![Assembly](Resources/ST9%20-%20asm.png) ![Part](Resources/ST9%20-%20par.png) ![Sheet Metal](Resources/ST9%20-%20psm.png) ![Draft](Resources/ST9%20-%20dft.png)
Referring to the toolbar diagram, tool group 6, you can limit the search to return only selected types of Solid Edge files. To do so, check/uncheck the appropriate File Type ![Assembly](Resources/ST9%20-%20asm.png) ![Part](Resources/ST9%20-%20par.png) ![Sheet Metal](Resources/ST9%20-%20psm.png) ![Draft](Resources/ST9%20-%20dft.png)

## Sorting

You can sort the file list in a variety of ways.

![File list sorting options](My%20Project/media/configuration_tab_sorting_page.png)

The options are `Unsorted`, `Alphabetical`, `Dependency`, or `Random sample`. Set it on the dialog shown above.
The options are `Unsorted`, `Alphabetical`, `Dependency`, or `Random sample`. Set it on the **Configuration Tab -- Sorting Page** as shown above.

The `Unsorted` option is primarily intended to preserve the order of imported lists.

Expand All @@ -236,7 +236,7 @@ The `Random sample` option randomly selects and shuffles a fraction of the tota

If you use the document Status functionality, you know that some settings place the file in read-only mode. These cannot normally be processed by Housekeeper.

You can get around this by checking `Process files as Available regardless of document Status`. Set the option on the dialog shown below.
You can get around this by checking `Process files as Available regardless of document Status`. Set the option on the **Configuration Tab -- Status Page** as shown below.

![Document Status](My%20Project/media/configuration_tab_status_page.png)

Expand Down Expand Up @@ -301,7 +301,7 @@ Template properties will know their `PropertySet`. Unless you added it manually

Select the Comparison from its dropdown box. The choices are `contains`, `is_exactly`, `is_not`, `wildcard_match`, `regex_match`, `>`, or `<`. The options `is_exactly`, `is_not`, `>`, and `<` are hopefully self-explanatory.

`Contains` means the Value can appear anywhere in the property. For example, if you specify `Aluminum` and a part file has `Aluminum 6061-T6`, you will get a match. Note, at this time, all Values (except see below for dates and numbers) are converted to lower case text before comparison. So `ALUMINUM`, `Aluminum`, and `aluminum` would all match.
`Contains` means the **Value** can appear anywhere in the property. For example, if you specify `Aluminum` and a part file has `Aluminum 6061-T6`, you will get a match. Note, at this time, all Values (except see below for dates and numbers) are converted to lower case text before comparison. So `ALUMINUM`, `Aluminum`, and `aluminum` would all match.

`Wildcard_match` searches for a match with a wildcard pattern. For example `[bfj]ake` would match `bake`, `fake`, and `jake`. A more familiar example might be `Aluminum*`, which would match `Aluminum 6061-T6`, `Aluminum 2023`, etc. Unlike `contains`, in this example, `Cast Aluminum Jigplate` would *not* match because it doesn't start with `Aluminum`. (`*Aluminum*` *would* match, by the way.)

Expand Down Expand Up @@ -482,7 +482,7 @@ Description of tab controls:
- `Use current Solid Edge session (if any)`
Normally Housekeeper will not start if Solid Edge is open. This is to protect you in case opening a file causes an exception in Solid Edge. This can happen with a corrupted file and other situations. If it does, the program closes and reopens Solid Edge, causing any unsaved changes to be lost. Enabling this option bypasses that check.
- `Warn me if file save is required`
This is a way for me to wag my finger one last time, reminding you to back up files before using the program. It's enabled by default. I always turn it off.
This is a way for me to wag my finger one last time, reminding you to back up files before using the program. It is enabled by default. It's very annoying and you'll want to turn it off. Just don't forget, I told you to make backups!
- `Do not show processed files in Most Recently Used List`
This keeps from clogging up Solid Edge's file list with those processed in batch mode.
- `File list font size`
Expand Down
Loading

0 comments on commit dfaecff

Please sign in to comment.