Repository.Model.GetModel: Difference between revisions
Jump to navigation
Jump to search
Alex Ulanov (talk | contribs) m (moved Repository.GetModel to Repository.Model.GetModel) |
Kate Racaza (talk | contribs) No edit summary |
||
Line 1: | Line 1: | ||
{{Template: | {{Template:APIBreadcrumb|10|Repository}} | ||
{{Template: | {{Template:API}} | ||
Gets the model with the designated ID number and returns it as a '''[[CModel Class|cModel]]''' object. Returns nothing if the model does not exist or is not in the current project. | |||
'' | == Syntax == | ||
''object''.'''Model.GetModel(''Integer'')''' | |||
where ''object'' is a variable that represents a Repository object. | |||
Parameters | === Parameters === | ||
{| {{APITable}} | |||
|- | |||
|ID{{APIParam|Required}}||'''Integer'''. The ID number of the model to retrieve. | |||
|} | |||
== | |||
{{ | == Example == | ||
These examples assume that a model with the ID#47 exists in the project. | |||
'''VBA'''<br> | |||
{{APIPrefix|Dim}} MyRepository {{APIPrefix|As New}} Repository | |||
{{APIComment|...'Add code to connect to a Synthesis repository.}} | |||
{{APIComment|...'Add code to set one of the projects in the repository as the current (active) project.}}<br> | |||
{{APIPrefix|Dim}} AModel {{APIPrefix|As}} cModel | |||
{{APIPrefix|Set}} AModel = MyRepository.Model.GetModel(47) | |||
'''VB.NET'''<br> | |||
{{APIPrefix|Dim}} MyRepository {{APIPrefix|As New}} Repository | |||
{{APIComment|...'Add code to connect to a Synthesis repository.}} | |||
{{APIComment|...'Add code to set one of the projects in the repository as the current (active) project.}}<br> | |||
{{APIPrefix|Dim}} AModel {{APIPrefix|As}} cModel | |||
AModel = MyRepository.Model.GetModel(47) |
Revision as of 22:33, 13 July 2015
Member of: SynthesisAPI10Repository
Gets the model with the designated ID number and returns it as a cModel object. Returns nothing if the model does not exist or is not in the current project.
Syntax
object.Model.GetModel(Integer)
where object is a variable that represents a Repository object.
Parameters
Name | Description | |
---|---|---|
IDborder="0" cellpadding="5" cellspacing="0" style="border-collapse: collapse; text-align: left; cellborder" | ||
Name | Status | Integer. The ID number of the model to retrieve. |
Example
These examples assume that a model with the ID#47 exists in the project.
VBA
Dim MyRepository As New Repository ...'Add code to connect to a Synthesis repository. ...'Add code to set one of the projects in the repository as the current (active) project.
Dim AModel As cModel Set AModel = MyRepository.Model.GetModel(47)
VB.NET
Dim MyRepository As New Repository ...'Add code to connect to a Synthesis repository. ...'Add code to set one of the projects in the repository as the current (active) project.
Dim AModel As cModel AModel = MyRepository.Model.GetModel(47)