CURD Class: Difference between revisions

From ReliaWiki
Jump to navigation Jump to search
No edit summary
Line 15: Line 15:


== Usage Example ==
== Usage Example ==
In this example, a new URD is created and a failure model is assigned to it. The URD is then added to a project.
In this usage example, a new URD is created and a failure model is assigned to it. The URD is then added to a project.
  {{APIComment|'Connect to repository and open the first project.}}
  {{APIComment|'Connect to repository and open the first project.}}
   Dim repo As New Repository
   Dim repo As New Repository
Line 25: Line 25:
   urd.Name = "Example URD"
   urd.Name = "Example URD"
    
    
  {{APIComment|'Assign an existing failure model to the new URD.}}
  {{APIComment|'Assign the failure model with ID = 10 to the new URD.}}
   urd.FailureModelID = 10
   urd.FailureModelID = 10
    
    

Revision as of 22:45, 2 May 2014


Universal reliability definitions (URDs) are used to represent a set of properties that can include failure behavior and maintenance tasks. URDs are resources that are available for use throughout the project.

Constructors

  • cURD Creates a new URD resource.

Properties

  • Name (as string) Gets or sets the URD Name.
  • ID (as integer) Gets the numerical ID of the URD.
  • ProjectID (as integer) Gets the numerical ID of the project the URD belongs to.
  • FailureModelID (as integer) Gets or sets the numerical ID of the the failure model assigned to the URD.
  • CorrectiveTaskID (as integer) Gets or sets the numerical ID of the the corrective task assigned to the URD.
  • ScheduledTaskIDs (as integer()) Gets or sets a list of the numerical IDs of the scheduled tasks assigned to the URD.

Usage Example

In this usage example, a new URD is created and a failure model is assigned to it. The URD is then added to a project.

 'Connect to repository and open the first project. 
 Dim repo As New Repository
 repo.ConnectToRepository("C:\Users\Name\Documents\ReliaSoft\Files\database.rsr9")
 repo.SetCurrentProject(1)
 
 'Create a new URD and give it a name. 
 Dim urd As New cURD
 urd.Name = "Example URD"
 
 'Assign the failure model with ID = 10 to the new URD. 
 urd.FailureModelID = 10
 
 'Add the URD to the current project.' 
 repo.AddURD urd
 
 'Disconnect from the repository. 
 repo.DisconnectFromRepository