Manually editing style code, PowerShell code to update unique identifier
All styles needs to have a unique identifier for them to appear in C1. This basically appears to be a UUID (or GUID in the Windows world), and this needs to be unique for all styles loaded in C1. This PowerShell code updates all the styles in the current folder with a new, unique identifier:
$files = Get-ChildItem -Filter "*.costyle"
[RegEx]$regex = "[0-9A-Fa-f]{8}[-]([0-9A-Fa-f]{4}[-]){3}[0-9A-Fa-f]{12}"
foreach ($file in $files) {
$regex.Replace((Get-Content $file -Raw), (New-Guid).Guid, 1) | Set-Content -Path $file
}
Usage is when manually editing the code of your own styles to create new variations of them.
"Universally unique identifier" on Wikipedia:
https://en.wikipedia.org/wiki/Universally_unique_identifier
1
La publicación no admite más comentarios.
Comentarios
0 comentarios