Repository.Model.DeleteModel: Difference between revisions

From ReliaWiki
Jump to navigation Jump to search
No edit summary
No edit summary
Line 1: Line 1:
{{Template:APIBreadcrumb|10|Repository}}
<noinclude>{{Template:API}}{{Template:APIBreadcrumb|10|Repository}}</noinclude>
{{Template:API}}
 
Deletes an unused model from the Synthesis repository. Throws an exception if the model is in use. Returns a '''Boolean''' value; when true, indicates that the model no longer exists.  
Deletes an unused model from the Synthesis repository. Throws an exception if the model is in use. Returns a '''Boolean''' value; when true, indicates that the model no longer exists.  
 
<noinclude>
== Syntax ==
== Syntax ==
''object''.'''Model.DeleteModel(''ID'')'''
''object''.'''Model.DeleteModel(''ID'')'''
Line 25: Line 25:
   MyRepository.Project.SetCurrentProject (1)
   MyRepository.Project.SetCurrentProject (1)
   MyRepository.Model.DeleteModel(71)
   MyRepository.Model.DeleteModel(71)
</noinclude>

Revision as of 15:00, 17 July 2015

APIWiki.png


Member of: SynthesisAPI10Repository

Deletes an unused model from the Synthesis repository. Throws an exception if the model is in use. Returns a Boolean value; when true, indicates that the model no longer exists.

Syntax

object.Model.DeleteModel(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 delete.


Example

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

VBA|VB.NET

 Dim MyRepository As New Repository
 ...'Add code to connect to a Synthesis 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)