I have ran into a condition, where the work area was initially created and then the name was changed, however when I run the cmdlet Get-PWRichProjectTypes, it returns the original class name, and I want to change the ClassName to match the Name it was changed to,
Some screenshots would be helpful.
Why is it important to match the class name to match the label? I suspect that it makes creating the script easier if the class has been renamed! : - )
I suspect that "words are getting in the way". The properties for Work Areas are part of the APIs that deal with "ODS", which basically defines tables and columns for the various property types as "classes". The naming of the tables and columns which make up the classes, are done when you first create the Property and a Prefix is used with whatever you called that property (less spaces, etc.) and what you see in the user interface is basically a label, i.e. just text, which is what gets changed when you "rename" the property. Or said differently, when you rename a property, the class name doesn't change, just the label.
The PowerShell Cmdlets need to know the class names, not the labels, so you will still need to know what the original class name was. This is actually a good thing because your scripts will still work if someone renames a property.
Unfortunately, you can't see the class name using the ProjectWise Administrator client.
However, you can use the ProjectWise Class Editor to discover what the actual class names are and what the current label is, but be careful with the class editor as it has no un-do feature and if you change something and simply "move off" that item, the change is saved.
This is similar to how document attributes are accessed, i.e. you need to know the column name in the environment table, but at least you can see the column name in the ProjectWise Administrator client. However, with attributes, there can be more than one label since those are defined per "Interface".
Dan WilliamsSolution ConsultantBentley Systems, IncorporatedPortland, OR, USA (Pacific Time UTC-08:00)
Thanks for the detail explanation. It isn't that "big of deal" to have the class name and "name" match. It just took me awhile to figure out why my PS was erroring out on the "class not found" i did discover if you dont change the name, the name and class name of course matches.