ArcFM Desktop Developer Guide
Edit CUs

Resource Center Home

This topic applies to Designer versions 10.0.3 and later.

To programmatically edit an existing CU in the library use the FindCu method on the CuLibrary class to identify the CU you wish to modify. You will need to pass in the following information to the FindCu method. Review the ICompatibleUnit topic for more available properties.

The FindCu method returns an ICompatibleUnit object. You can add property values or modify existing property values.

Once you've finished updating the ICompatibleUnit object, pass it to the GetValidatedCu method on the CuEditor class. This method verifies that the modified CU passes the following validations:

The GetValidatedCu method returns an IValidCompatibleUnit object that you can then pass to the Update method on the CuEditor class. The Update method replaces the corresponding IRow object that resides in the MM_CU_LIBRARY table in the geodatabase with your updated CU information. It also replaces the corresponding ICompatibleUnit object in the CU library with your updated ICompatibleUnit object.

The Update method will throw an exception when it receives an invalid IValidCompatibleUnit object.

The Update method may also throw an exception if:

  • You cannot create an edit workspace.
  • You cannot open an edit session.

 

 


Send Comment to ArcFMdocumentation@schneider-electric.com