Repository.Model.IsModelUsed

From ReliaWiki
Revision as of 17:27, 17 July 2015 by Kate Racaza (talk | contribs)
Jump to navigation Jump to search
APIWiki.png


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