From e3e95e9881a1ebf34e05ff30fc63f869960c170f Mon Sep 17 00:00:00 2001
From: ryanbeard82 <48767224+ryanbeard82@users.noreply.github.com>
Date: Tue, 27 Jan 2026 13:10:57 -0600
Subject: [PATCH 1/4] cptCritcalPath HotFix
Resolved issue with driving path vs driving paths buttons. Remove resource names from default view gantt bars.
---
Trace/cptCriticalPath_bas.bas | 49 +++++++++++++++++++++--------------
1 file changed, 29 insertions(+), 20 deletions(-)
diff --git a/Trace/cptCriticalPath_bas.bas b/Trace/cptCriticalPath_bas.bas
index d6b9c4e3..e5ee30c9 100644
--- a/Trace/cptCriticalPath_bas.bas
+++ b/Trace/cptCriticalPath_bas.bas
@@ -1,5 +1,5 @@
Attribute VB_Name = "cptCriticalPath_bas"
-'v3.4.1
+'v3.4.2
Option Explicit
Private CritField As String 'Stores comma seperated values for each task showing which paths they are a part of
Private GroupField As String 'Stores a single value - used to group/sort tasks in final CP view
@@ -27,7 +27,7 @@ Public export_to_PPT As Boolean 'cpt controlled var for controlling user notific
Private CustTextFields() As String 'v2.9.0 Array of custTextFields
Private CustNumFields() As String 'v2.9.0 Array of custNumFields
Private curProj As Project 'Stores active user project - not compatible with Master/Sub Architecture v2.9.0 - set as module var for cust field mapping
-Private masterProj As Boolean 'v3.0.0 stores master project status of active project based on subproject count
+Private masterproj As Boolean 'v3.0.0 stores master project status of active project based on subproject count
Private subP As SubProject 'v3.0.0 used to iterate through subprojects collection
Private subPID As Integer 'v3.0.0 used to temporarily store subproject ID
Private tempproj As Project 'v3.0.0 used to temporarily reference subprojects
@@ -57,9 +57,9 @@ Sub DrivingPaths()
'v3.0.0 - check for subprojects
If curProj.Subprojects.Count > 1 Then
- masterProj = True
+ masterproj = True
Else
- masterProj = False
+ masterproj = False
End If
'used to avoid code break during intial error checks
@@ -141,6 +141,14 @@ Sub DrivingPaths()
.Left = Application.Left + (0.5 * Application.Width) - (0.5 * .Width)
.Top = Application.Top + (0.5 * Application.Height) - (0.5 * .Height)
+ If singlePath Then 'v2.4.2 - hide path count when only running single path
+ .pathCnt_lbl.Visible = False
+ .pathCnt_txtBox.Visible = False
+ Else
+ .pathCnt_lbl.Visible = True
+ .pathCnt_txtBox.Visible = True
+ End If
+
.Show
If .Tag = "cancel" Then
@@ -163,7 +171,7 @@ Sub DrivingPaths()
curProj.Application.ScreenUpdating = False
'v3.0.0 Assign Custom Field names and create lookup table for each subproject
- If masterProj = True Then
+ If masterproj = True Then
For Each subP In curProj.Subprojects
FileOpenEx subP.Path, True
Set tempproj = ActiveProject
@@ -347,7 +355,7 @@ Private Sub evaluateTaskDependencies(ByVal tdp As TaskDependency, ByVal t As Tas
Dim subIndex As Integer
'v3.0.0 need to convert the
- If firstTask = True And masterProj = True Then
+ If firstTask = True And masterproj = True Then
firstTask = False
If tdp.To.ExternalTask = True Then
subIndex = get_subProj_index(curProj, tdp.To.Project)
@@ -363,7 +371,7 @@ Private Sub evaluateTaskDependencies(ByVal tdp As TaskDependency, ByVal t As Tas
'Only evaluate incomplete predecessors
If real_ToUID = t.UniqueID And tdp.From.PercentComplete <> 100 Then
'v3.0.0 account for master project condition
- If masterProj Then
+ If masterproj Then
If tdp.To.ExternalTask = True Then
subIndex = get_subProj_index(curProj, tdp.To.Project)
@@ -428,7 +436,7 @@ Private Sub SetupCPView(ByVal GroupField As String, ByVal curProj As Project, By
Dim t As Task 'used to store user selected anlaysis task
'Create CP Driving Path Table
- curProj.Application.TableEditEx Name:="*ClearPlan Driving Path Table", TaskTable:=True, Create:=True, ShowAddNewColumn:=True, OverwriteExisting:=True, fieldName:="ID", Width:=5, ShowInMenu:=False, DateFormat:=pjDate_mm_dd_yy, LockFirstColumn:=True, ColumnPosition:=0
+ curProj.Application.TableEditEx Name:="*ClearPlan Driving Path Table", TaskTable:=True, Create:=True, ShowAddNewColumn:=True, OverwriteExisting:=True, FieldName:="ID", Width:=5, ShowInMenu:=False, DateFormat:=pjDate_mm_dd_yy, LockFirstColumn:=True, ColumnPosition:=0
'Add fields to CP Driving Path Table
curProj.Application.TableEditEx Name:="*ClearPlan Driving Path Table", TaskTable:=True, NewFieldName:="Unique ID", Width:=10, ShowInMenu:=False, DateFormat:=pjDate_mm_dd_yy, ColumnPosition:=1, LockFirstColumn:=True
@@ -440,12 +448,12 @@ Private Sub SetupCPView(ByVal GroupField As String, ByVal curProj As Project, By
curProj.Application.TableEditEx Name:="*ClearPlan Driving Path Table", TaskTable:=True, NewFieldName:="Total Slack", Width:=10, ShowInMenu:=False, DateFormat:=pjDate_mm_dd_yy, ColumnPosition:=6
'Create CP Driving Path Filter
- curProj.Application.FilterEdit Name:="*ClearPlan Driving Path Filter", TaskFilter:=True, Create:=True, OverwriteExisting:=True, fieldName:=GroupField, test:="is greater than", Value:="0", ShowInMenu:=False, ShowSummaryTasks:=False
+ curProj.Application.FilterEdit Name:="*ClearPlan Driving Path Filter", TaskFilter:=True, Create:=True, OverwriteExisting:=True, FieldName:=GroupField, test:="is greater than", Value:="0", ShowInMenu:=False, ShowSummaryTasks:=False
'On Error Resume Next
'Create CP Driving Path Group
- curProj.TaskGroups.Add Name:="*ClearPlan Driving Path Group", fieldName:=GroupField
+ curProj.TaskGroups.Add Name:="*ClearPlan Driving Path Group", FieldName:=GroupField
'Create CP Driving Path view if necessary
curProj.Application.ViewEditSingle Name:="*ClearPlan Driving Path View", Create:=True, ShowInMenu:=True, Table:="*ClearPlan Driving Path Table", Filter:="*ClearPlan Driving Path Filter", Group:="*ClearPlan Driving Path Group"
@@ -457,9 +465,10 @@ Private Sub SetupCPView(ByVal GroupField As String, ByVal curProj As Project, By
'Apply the CP Driving Path view
curProj.Application.ViewApply Name:="*ClearPlan Driving Path View"
+ curProj.Application.GanttBarEditEx Item:="1", RightText:="" '2.4.2 - remove resource names from view
'Sort the View by Finish, then by Duration to produce Waterfall Gantt
- curProj.Application.Sort Key1:="Finish", Ascending1:=True, Key2:="Duration", ascending2:=False, Outline:=False
+ curProj.Application.Sort Key1:="Finish", Ascending1:=True, Key2:="Duration", Ascending2:=False, Outline:=False
'Select all tasks and zoom the Gantt to display all tasks in view
curProj.Application.SelectAll
@@ -479,8 +488,8 @@ Private Sub SetupCPView(ByVal GroupField As String, ByVal curProj As Project, By
GoTo NextTask
End If
- If masterProj Then
- t.Application.GanttBarFormatEx TaskID:=t.ID, GanttStyle:=1, StartColor:=StoplightColor(MaxPathsFound, pathValue), MiddleColor:=StoplightColor(MaxPathsFound, pathValue), EndColor:=StoplightColor(MaxPathsFound, pathValue), projectName:=curProj.Subprojects(t.Project).Path
+ If masterproj Then
+ t.Application.GanttBarFormatEx TaskID:=t.ID, GanttStyle:=1, StartColor:=StoplightColor(MaxPathsFound, pathValue), MiddleColor:=StoplightColor(MaxPathsFound, pathValue), EndColor:=StoplightColor(MaxPathsFound, pathValue), ProjectName:=curProj.Subprojects(t.Project).Path
Else
t.Application.GanttBarFormatEx TaskID:=t.ID, GanttStyle:=1, StartColor:=StoplightColor(MaxPathsFound, pathValue), MiddleColor:=StoplightColor(MaxPathsFound, pathValue), EndColor:=StoplightColor(MaxPathsFound, pathValue)
End If
@@ -706,7 +715,7 @@ Private Sub CheckCritTask(ByVal curProj As Project, ByVal tdp As TaskDependency)
'Assign the dependency predecessor task to predT var
'v3.0.0 consider mast project condition
- If masterProj Then
+ If masterproj Then
If tdp.From.ExternalTask = True Then
subpIndex = get_subProj_index(curProj, tdp.From.Project)
If subpIndex = 0 Then 'subproject is not present
@@ -732,7 +741,7 @@ Private Sub CheckCritTask(ByVal curProj As Project, ByVal tdp As TaskDependency)
'Assign the dependency successor task to the succT var
'v3.0.0 consider master project condition - succ T will never be an external task
- If masterProj Then
+ If masterproj Then
subpIndex = get_subProj_index(curProj, curProj.Subprojects(tdp.To.Project).Path)
realSuccUID = get_tdp_MasterUID(tdp.To.UniqueID, subpIndex)
Set succT = curProj.Tasks.UniqueID(realSuccUID)
@@ -876,7 +885,7 @@ Private Function TrueFloat(ByVal tPred As Task, ByVal tSucc As Task, ByVal dType
Set pCalObj = tPred.CalendarObject
Else 'If no task calendar, store project cal
'v3.0.0 consider master project condition
- If masterProj = True Then
+ If masterproj = True Then
If tPred.Project = curProj.Tasks.UniqueID(0).Project Then 'task is in master project
Set pCalObj = curProj.Calendar
Else
@@ -892,7 +901,7 @@ Private Function TrueFloat(ByVal tPred As Task, ByVal tSucc As Task, ByVal dType
Set sCalObj = tSucc.CalendarObject
Else 'If no task calendar, store project cal
'v3.0.0 consider master project condition
- If masterProj = True Then
+ If masterproj = True Then
If tSucc.Project = curProj.Tasks.UniqueID(0).Project Then 'task is in master project
Set sCalObj = curProj.Calendar
Else
@@ -1159,17 +1168,17 @@ Private Sub ReadCustomFields(ByVal curProj As Project)
End Sub
-Function get_subProj_index(ByVal masterProj As Project, ByVal subprojectFilename As String) As Integer
+Function get_subProj_index(ByVal masterproj As Project, ByVal subprojectFilename As String) As Integer
'v3.0.0 gets the subproject index
'used for calculating the Master Project UID
Dim subP As SubProject
- For Each subP In masterProj.Subprojects
+ For Each subP In masterproj.Subprojects
If subP.Path = subprojectFilename Then
- get_subProj_index = masterProj.Subprojects(subP.Index).InsertedProjectSummary.UniqueID
+ get_subProj_index = masterproj.Subprojects(subP.Index).InsertedProjectSummary.UniqueID
Exit Function
End If
From 0783e1251afd98483012f0025ed1417b180d624c Mon Sep 17 00:00:00 2001
From: ryanbeard82 <48767224+ryanbeard82@users.noreply.github.com>
Date: Tue, 27 Jan 2026 13:12:16 -0600
Subject: [PATCH 2/4] Update cptCriticalPath_bas version to v3.4.2
---
CurrentVersions.xml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/CurrentVersions.xml b/CurrentVersions.xml
index 84296542..32744e8f 100644
--- a/CurrentVersions.xml
+++ b/CurrentVersions.xml
@@ -129,7 +129,7 @@
cptCriticalPath_bas
cptCriticalPath_bas.bas
- v3.4.1
+ v3.4.2
1
Trace
From 50add6fff91ece1c0beac01b5df91c9b12f3528c Mon Sep 17 00:00:00 2001
From: ryanbeard82 <48767224+ryanbeard82@users.noreply.github.com>
Date: Sun, 1 Feb 2026 14:27:28 -0600
Subject: [PATCH 3/4] v 3.4.2
No changes - just increased version number
---
Trace/cptCritPathFields_frm.frm | 2 +-
Trace/cptCritPathFields_frm.frx | Bin 3608 -> 3608 bytes
2 files changed, 1 insertion(+), 1 deletion(-)
diff --git a/Trace/cptCritPathFields_frm.frm b/Trace/cptCritPathFields_frm.frm
index 003e3905..c31b1b5c 100644
--- a/Trace/cptCritPathFields_frm.frm
+++ b/Trace/cptCritPathFields_frm.frm
@@ -13,7 +13,7 @@ Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
-'v3.4.1
+'v3.4.2
Option Explicit
Private Const MODULE_NAME As String = "cptCritPathFields_frm"
diff --git a/Trace/cptCritPathFields_frm.frx b/Trace/cptCritPathFields_frm.frx
index c7633f2a207f04a01979e5052affad141ff06804..bf29c873a462275d77f067bbc154a61fe1c5f464 100644
GIT binary patch
delta 79
zcmbOsGec%W3kzGqyF21LCvWazdBMzBG`W~ViIHLQG!C1|+qn2PKj83UVsx3T&3%eV
jnRW7aZezxp$=Wg<9GD!igaihloqKvF4zr2`=mP-&lXD0n0cDex2s{Bqv(pGy0+Y514wE7$pDz
From f8594b85bd793f1e4cc5e702a487d9e28d5dfda3 Mon Sep 17 00:00:00 2001
From: ryanbeard82 <48767224+ryanbeard82@users.noreply.github.com>
Date: Sun, 1 Feb 2026 14:28:23 -0600
Subject: [PATCH 4/4] Update version of cptCritPathFields_frm to v3.4.2
---
CurrentVersions.xml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/CurrentVersions.xml b/CurrentVersions.xml
index 32744e8f..d9d1bb1a 100644
--- a/CurrentVersions.xml
+++ b/CurrentVersions.xml
@@ -143,7 +143,7 @@
cptCritPathFields_frm
cptCritPathFields_frm.frm
- v3.4.1
+ v3.4.2
3
Trace