How to change default LCM attributes to Custom Attributes - OpenUtilities Substation CONNECT


 Product(s):OpenUtilities Substation CONNECT Edition
 Version(s): 10.07.XX.XX to 10.10.XX.XX
 Environment: NA
 Area: Options
 Subarea:Systems Options 

Background:

The user can use the Life Cycle Management (LCM) function in Substation which is used for assigning different Custom Attributes Values to a Substation Equipment. These attributes can be controlled and defined from the Life Cycle Management option under the Systems Options which will control the attributes in the Properties Control Dialog.



In some cases, the user might want to use Custom Attributes instead of the default Attributes in the Life Cycle Management settings. Further in this article, we are going to see how to do the same by using the example of the Work Order attribute. This needs to be done by following below steps

Steps to Accomplish

For adding a custom Attribute in LCM, you need the attribute to be present in Symbol Text Attributes. If it is not present it needs to be added before moving ahead with actual steps. Refer the below Wiki Link for Adding Custom Symbol Text Attribute.

communities.bentley.com/.../how-to-add-custom-symbol-text-attribute-in-openutilities-substation

To implement the Custom Attributes there are two ways the user can choose to implement according to their requirement, in this article we will use the example Work Order attribute to be changed to a different Custom Attribute.

A. Updating the Database: This method is for the user who is planning to implement the custom attribute in their existing Projects or Environment.

B. Creating a new Database: This method is for the user who is planning to implement the custom attribute for New Projects or Environment.

 

Note: Since this article is regarding implementing custom attributes the user needs to modify or create a Project Database using SQL Management Studio. Hence users need to have to install SQL Management studio before moving ahead with the below steps.

Important Note: If the user’s requirement is to follow the Updating the Database method, then they need to make sure that you have taken Project Database Backup before updating the database. This is just in case if there are any issues following the steps you have a fresh backup to try again or revert to the original environment.


A. Updating the Database:

1. Browse to the location “C:\Program Files\Bentley\OpenUtilities Substation CONNECT Edition\Substation\Electrical\SqlScripts” on the machine where OpenUtilities Substation is installed and open the file “SQL_UpdateDB.sql” into SQL Management Studio. If the script is being executed from the Server machine, then the files need to be copied to the server machine if the OpenUtilities Substation is not installed. 



2. Follow the below Wiki links details for updating the details of the Project Database that needs to be updated by following the Update the Database Method 2: Executing a Script method. 

communities.bentley.com/.../creating-and-updating-the-project-database---substation-ce

3. After the script has been updated with details, use Find and Replace (Ctrl + F) and search for “UPDATE LCM_CustomAttribute


4. Now few lines below the searched line replace all the “WorkOrder” attribute with the required custom attribute name or according to the details followed while creating custom attribute at the beginning of this document. In the below images you will find highlighted text details for Custom Attributes that need to be updated. Also, another screenshot with the updated details is also provided. 




After changes for Custom Attribute in place of WorkOrder




5. After making all the above changes select Execute to run the script to update the database.



6. Now after the script has been executed successfully Launch the Substation and check the Life Cycle Management Attribute & Property Control if the details for Custom Attribute has been updated have been updated.


B. Creating new Database

1. Browse to the location “C:\Program Files\Bentley\OpenUtilities Substation CONNECT Edition\Substation\Electrical\SqlScripts” on the machine where OpenUtilities Substation is installed and open the file “SqlServerProject.sql” into SQL Management Studio. If the script is being executed from the Server machine then the files need to be copied to the server machine if the OpenUtilities Substation is not installed.


2. Follow the below Wiki links details for updating the details of the Project Database that needs to be created by following the Create the Database Method 2: Executing a Script.

communities.bentley.com/.../creating-and-updating-the-project-database---substation-ce

3.  After the script has been updated with details, Find and Replace (Ctrl + F) and search for “SET IDENTITY_INSERT LCM_CustomAttribute ON”.




4. Now for the insert statements below the search line replace the “WorkOrder” attribute with the required custom attribute name or according to the details followed while creating custom attribute at the beginning of this document. In the below images you will find highlighted text details for Custom Attributes that need to be updated. Also, another screenshot with the updated details is also provided.




After changes for Custom Attribute in place of WorkOrder




5. After making all the above changes select Execute to run Script to update the database.


6. Now after the script has been executed successfully Launch the Substation and check the Life Cycle Management Attribute & Property Control if the details for Custom Attribute has been updated have been updated.

 Original Author:Satish Saptasagar