Repository.Model.DeleteModel

From ReliaWiki
Revision as of 17:25, 8 April 2016 by Kate Racaza (talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search
APIWiki.png


Member of: SynthesisAPI.Repository


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

Required. Integer. The ID number of the model to delete.


Example

This example assumes that an unused model with ID #71 exists in the first project of a Synthesis repository.

VBA|VB.NET
 
 'Declare a new Repository object and connect to a Synthesis repository. 
  Dim MyRepository As New Repository
  MyRepository.ConnectToAccessRepository("C:\RSRepository1.rsr10")
 
 'Delete model #71 from project #1. 
  MyRepository.Project.SetCurrentProject(1)
  MyRepository.Model.DeleteModel(71)