CMM: per-bay path is goCMM "Selected Part Group" UNC, not Shared Data Directory
A capture from a working CMM4 bay showed the goCMM registry holds two
distinct values under HKLM\SOFTWARE\WOW6432Node\General Electric\goCMM:
Shared Data Directory = C:\geaofi\ (constant on every bay)
Selected Part Group = \\tsgwp00525...\SHARED\... (the per-bay UNC path)
The prior commit (f6d970c) put the per-bay path into "Shared Data Directory",
which is wrong. Correct that:
- bay-config column shared_data_dir -> part_group
- resolve-cmm-bay-config emits partgroup.txt (was shareddatadir.txt)
- 09-Setup-CMM seeds "Shared Data Directory" to the constant C:\geaofi\ and
"Selected Part Group" to the per-bay path, converting the friendly S:\...
form to the \\tsgwp00525.wjs.geaerospace.net\SHARED UNC at apply time.
Users write grant on the key is unchanged.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -40,21 +40,23 @@ if (-not (Test-Path $OutDir)) {
|
||||
|
||||
$version = $match.pcdmis_version.Trim()
|
||||
$doda = $match.doda.Trim().ToLower()
|
||||
# shared_data_dir may legitimately contain spaces (e.g. CMM8 "Venture CMM8").
|
||||
# Trim() strips only leading/trailing whitespace, never internal spaces.
|
||||
$sharedDataDir = ''
|
||||
if ($match.PSObject.Properties['shared_data_dir'] -and $match.shared_data_dir) {
|
||||
$sharedDataDir = $match.shared_data_dir.Trim()
|
||||
# part_group is the goCMM "Selected Part Group" path. It may legitimately
|
||||
# contain spaces (e.g. CMM8 "Venture CMM8"); Trim() strips only leading/
|
||||
# trailing whitespace, never internal spaces. Stored in the friendly S:\
|
||||
# form; 09-Setup-CMM converts it to the tsgwp00525 UNC at apply time.
|
||||
$partGroup = ''
|
||||
if ($match.PSObject.Properties['part_group'] -and $match.part_group) {
|
||||
$partGroup = $match.part_group.Trim()
|
||||
}
|
||||
|
||||
[System.IO.File]::WriteAllText((Join-Path $OutDir 'version.txt'), $version)
|
||||
[System.IO.File]::WriteAllText((Join-Path $OutDir 'doda.txt'), $doda)
|
||||
if ($sharedDataDir) {
|
||||
[System.IO.File]::WriteAllText((Join-Path $OutDir 'shareddatadir.txt'), $sharedDataDir)
|
||||
if ($partGroup) {
|
||||
[System.IO.File]::WriteAllText((Join-Path $OutDir 'partgroup.txt'), $partGroup)
|
||||
}
|
||||
|
||||
Write-Host "Resolved $CmmId -> PC-DMIS $version, DODA=$doda, SharedDataDir=$(if ($sharedDataDir) { $sharedDataDir } else { '(none)' })"
|
||||
Write-Host " version.txt -> $OutDir\version.txt"
|
||||
Write-Host " doda.txt -> $OutDir\doda.txt"
|
||||
if ($sharedDataDir) { Write-Host " shareddatadir.txt -> $OutDir\shareddatadir.txt" }
|
||||
Write-Host "Resolved $CmmId -> PC-DMIS $version, DODA=$doda, PartGroup=$(if ($partGroup) { $partGroup } else { '(none)' })"
|
||||
Write-Host " version.txt -> $OutDir\version.txt"
|
||||
Write-Host " doda.txt -> $OutDir\doda.txt"
|
||||
if ($partGroup) { Write-Host " partgroup.txt -> $OutDir\partgroup.txt" }
|
||||
exit 0
|
||||
|
||||
Reference in New Issue
Block a user