|
|
Line 1: |
Line 1: |
| {{Template:APIClass|cModel Class|cModel}} | | {{Template:API}}{{Template:APIBreadcrumb|9}} |
| {{Template:ParamValues Class.Cmt}} | | |
| | |
| | <onlyinclude>An object array that stores a model's parameter names and values.</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||''Double''. Sets or gets the value of the parameter. |
| == Usage Example ==
| | |- |
| In this example, a model is accessed from a repository, and the name/value of the model's first parameter are retrieved.
| | |ParamName||''String''. Sets or gets the name of the parameter. |
| {{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()
| |
Member of: SynthesisAPI9
An object array that stores a model's parameter names and values.
Properties
Name
|
Description
|
Value |
Double. Sets or gets the value of the parameter.
|
ParamName |
String. Sets or gets the name of the parameter.
|