Repository.Model.DeleteModel

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


Member of: SynthesisAPI10Repository


Deletes an unused model from the current project. Throws an exception if the model is in use. Returns a Boolean value; when true, indicates a successful deletion.


Syntax

.Model.DeleteModel(ID)

Parameters

ID

Integer. The ID number of the model to delete.


Example

This example assumes that an unused model with ID#71 exists in a repository.

VBA|VB.NET

 'Add code to connect to a Synthesis repository. 
  Dim MyRepository As New Repository
  ...  


 'Delete model #71 from project #1. The model will no longer be visible in the Synthesis repository upon refresh. 
 MyRepository.Project.SetCurrentProject (1)
 MyRepository.Model.DeleteModel(71)