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: | ||
{{Template:APIBreadcrumb|10|Repository}} | <noinclude>{{Template:API}}{{Template:APIBreadcrumb|10|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> | |||
== Syntax == | == Syntax == | ||
''object''.'''Model.IsModelUsed(''ID'')''' | ''object''.'''Model.IsModelUsed(''ID'')''' | ||
Line 33: | Line 33: | ||
MsgBox ({{APIString|"The model is not in use."}}) | MsgBox ({{APIString|"The model is not in use."}}) | ||
{{APIPrefix|End If}} | {{APIPrefix|End If}} | ||
</noinclude> |
Revision as of 15:00, 17 July 2015
Member of: SynthesisAPI10Repository
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
object.Model.IsModelUsed(ID)
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 be checked. |
Example
This example assumes that a model with ID# 42 exists in the repository.
VBA|VB.NET
Dim MyRepository As New Repository ...'Add code to connect to a Synthesis repository. 'Check whether model #42 in 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