ParamValues Class: Difference between revisions

From ReliaWiki
Jump to navigation Jump to search
No edit summary
 
(10 intermediate revisions by the same user not shown)
Line 1: Line 1:
{{Template:APIClass|cModel Class|cModel}}
{{Template:API}}{{Template:APIBreadcrumb}}
{{Template:ParamValues Class.Cmt}}
 
 
<onlyinclude>Represents the parameter name and value pair of a [[CModel_Class|cModel]] object.</onlyinclude>


== Properties  ==
== Properties  ==
*Value (as ''double'')    {{APIComment|Gets the value of the parameter.}}
{| {{APITable}}
*ParamName (as ''string'') {{APIComment|Gets the name of the parameter.}}
|-
| style="width: 150px;"|Value||Gets the value of the parameter. '''Double'''.
|-
|ParamName||Gets the name of the parameter.'''String'''.
|}
 
 
 
 


== Usage Example ==
==See Also==
In this example, a model is accessed from a repository, and the name/value of the model's first parameter are retrieved.
*[[cModel.Parameters|cModel.Parameters Method]]
{{APIComment|'Declare a new repository connection object.}}
  Dim MyRepository As New Repository
 
{{APIComment|'Connect to a Synthesis repository.}}
  Dim Success As Boolean = False
  Success = MyRepository.ConnectToRepository("C:\Users\Name\Documents\ReliaSoft\Files\repository.rsr9")
 
{{APIComment|'Get a list of the names/IDs of projects in the connected repository.}}
  Dim ListOfProjects() As NameIdPair
  ListOfProjects = MyRepository.GetAllProjects()
 
{{APIComment|'Open the first project in the list.}}
  MyRepository.SetCurrentProject(ListOfProjects(0).ID)
 
{{APIComment|'Get a list of the names/IDs of models in the current project.}}
  Dim ListOfModels() As NameIdPair
  ListOfModels = MyRepository.GetAllModelsInfo()
 
{{APIComment|'Retrieve the first model in the list.}}
  Dim AModel as cModel
  AModel = MyRepository.GetModel(ListOfModels(0).ID)
 
{{APIComment|'Get the list of model parameters.}}
  Dim ModelParameters() As ParamValues
  ModelParameters = AModel.Parameters
 
{{APIComment|Get the name of the model's first parameter.}}
  Dim ModelParamName as String
  ModelParamVame = ModelParameters(0).ParamName
 
{{APIComment|Get the value of the model's first parameter.}}
  Dim ModelParamValue as Double
  ModelParamValue = ModelParameters(0).Value
 
{{APIComment|Disconnect from the repository.}}
  MyRepository.DisconnectFromRepository()

Latest revision as of 17:51, 17 June 2016

APIWiki.png


Member of: SynthesisAPI


Represents the parameter name and value pair of a cModel object.

Properties

Name Description
Value Gets the value of the parameter. Double.
ParamName Gets the name of the parameter.String.



See Also