Repository.Model.IsModelUsed: Difference between revisions
Jump to navigation
Jump to search
Kate Racaza (talk | contribs) No edit summary |
Kate Racaza (talk | contribs) No edit summary |
||
Line 1: | Line 1: | ||
<noinclude>{{Template:API}}{{Template:APIBreadcrumb|10|[[Repository Class|Repository]]}}</noinclude> | <noinclude>{{Template:API}}{{Template:APIBreadcrumb|10|.[[Repository Class|Repository]]}}</noinclude> | ||
Checks whether the model with the ID number that you specify is used by other items in the project. Returns a '''Boolean''' value; when true, indicates that the model is in use. | Checks whether the model with the ID number that you specify is used by other items in the project. Returns a '''Boolean''' value; when true, indicates that the model is in use. | ||
<noinclude> | <noinclude> | ||
== Syntax == | == Syntax == | ||
' | '''.Model.IsModelUsed'''(''ID'') | ||
=== Parameters === | === Parameters === | ||
''ID'' | |||
:Integer. The ID number of the model to be checked. | |||
== Example == | == Example == | ||
This example assumes that a model with ID# 42 exists in the repository. | This example assumes that a model with ID# 42 exists in the first available project in a repository. | ||
'''VBA|VB.NET''' | '''VBA|VB.NET''' | ||
{{APIComment|'Add code to connect to a Synthesis repository.}} | |||
{{APIPrefix|Dim}} MyRepository {{APIPrefix|As New}} Repository | {{APIPrefix|Dim}} MyRepository {{APIPrefix|As New}} Repository | ||
{{APIComment|.. | {{APIComment|...}} | ||
{{APIComment|'Check whether model #42 | {{APIComment|'Check whether model #42 from project #1 is in use.}} | ||
MyRepository.Project.SetCurrentProject(1) | MyRepository.Project.SetCurrentProject(1) | ||
Revision as of 20:53, 20 July 2015
Member of: SynthesisAPI10.Repository
Checks whether the model with the ID number that you specify is used by other items in the project. Returns a Boolean value; when true, indicates that the model is in use.
Syntax
.Model.IsModelUsed(ID)
Parameters
ID
- Integer. The ID number of the model to be checked.
Example
This example assumes that a model with ID# 42 exists in the first available project in a repository.
VBA|VB.NET 'Add code to connect to a Synthesis repository. Dim MyRepository As New Repository ... 'Check whether model #42 from project #1 is in use. MyRepository.Project.SetCurrentProject(1) Dim CheckModel As Boolean CheckModel = MyRepository.Model.IsModelUsed(42) 'Output sample: If CheckModel = True Then MsgBox ("The model is in use.") Else MsgBox ("The model is not in use.") End If