Repository.Model.DeleteModel: Difference between revisions
Jump to navigation
Jump to search
John Leavitt (talk | contribs) |
Alex Ulanov (talk | contribs) m (moved Repository.DeleteModel to Repository.Model.DeleteModel) |
(No difference)
|
Revision as of 22:38, 21 May 2015
Checks if the model is not in use and deletes the model. Returns true if success, false otherwise. Throws an exception if the model is in use.
Syntax
DeleteModel(ByVal ID As Integer) As Boolean
Parameters
- ID: The ID to delete.
Usage Example
'Declare a new repository connection object. Dim MyRepository As New Repository 'Connect to the Synthesis repository. Dim Success As Boolean = False Success = MyRepository.ConnectToRepository("RepositoryFileNamePath") 'Get the list of models in the connected repository. Dim ListOfModels() As NameIdPair ListOfModels = MyRepository.GetAllModelsInfo() 'Retrieve the model with ID = 20. Dim AModel as cModel AModel = MyRepository.GetModel(20) 'Delete Model. Dim SucessDeleteModel As Boolean SucessDeleteModel = MyRepository.DeleteModel(20) 'Disconnect from the repository. MyRepository.DisconnectFromRepository