Repository.Model.DeleteModel: Difference between revisions
Jump to navigation
Jump to search
Kate Racaza (talk | contribs) No edit summary |
Kate Racaza (talk | contribs) No edit summary |
||
(2 intermediate revisions by the same user not shown) | |||
Line 1: | Line 1: | ||
{{Template:API}}{{Template:APIBreadcrumb| | {{Template:API}}{{Template:APIBreadcrumb|.[[Repository Class|Repository]]}} | ||
<onlyinclude>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.</onlyinclude> | <onlyinclude>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.</onlyinclude> | ||
== Syntax == | == Syntax == | ||
'''.Model.DeleteModel'''(''ID'') | '''.Model.DeleteModel'''(''ID'') | ||
=== Parameters === | === Parameters === | ||
''ID'' | ''ID'' | ||
:Integer. The ID number of the model to delete. | :Required. Integer. The ID number of the model to delete. | ||
== Example == | == Example == | ||
This example assumes that an unused model with ID#71 exists in a repository. | This example assumes that an unused model with ID #71 exists in the first project of a Synthesis repository. | ||
'''VBA|VB.NET''' | '''VBA|VB.NET''' | ||
{{APIComment|' | {{APIComment|'Declare a new Repository object and connect to a Synthesis repository.}} | ||
{{APIPrefix|Dim}} MyRepository {{APIPrefix|As New}} Repository | {{APIPrefix|Dim}} MyRepository {{APIPrefix|As New}} Repository | ||
MyRepository.ConnectToAccessRepository({{APIString|"C:\RSRepository1.rsr10"}}) | |||
{{APIComment|'Delete model #71 from project #1.}} | |||
{{APIComment|'Delete model #71 from project #1 | MyRepository.Project.SetCurrentProject(1) | ||
MyRepository.Model.DeleteModel(71) | |||
Latest revision as of 17:25, 8 April 2016
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)