Repository.Pool.AddPool: Difference between revisions
Jump to navigation
Jump to search
Kate Racaza (talk | contribs) No edit summary |
Kate Racaza (talk | contribs) No edit summary |
||
Line 1: | Line 1: | ||
{{Template:API}}{{Template:APIBreadcrumb | {{Template:API}}{{Template:APIBreadcrumb|.[[Repository Class|Repository]]}} | ||
Revision as of 22:17, 13 November 2015
Member of: SynthesisAPI.Repository
Adds a new spare part pool to a Synthesis repository. Returns a Boolean value; when true, indicates indicates a successful save.
If a pool with the same name already exists in the destination project, the name will be incremented automatically. For example, if "Pool1" already exists, the new pool might be renamed to "Pool2," "Pool3," etc.
Syntax
.Pool.AddPool(pool)
Parameters
pool
- Required. The cPool object to be added.
Example
This example creates a new spare part pool resource, and then saves it in the first available project in a Synthesis repository.
VBA 'Add code to connect to a Synthesis repository. Dim MyRepository As New Repository ... 'Create a new pool. The following example creates a pool named "MyNewSpares." Dim NewSpares As New cPool NewSpares.Name = "MyNewSpares" 'Add the new spare part pool to project #1. MyRepository.Project.SetCurrentProject(1) Call MyRepository.Pool.AddPool(NewSpares)
VB.NET 'Add code to connect to a Synthesis repository. Dim MyRepository As New Repository ... 'Create a new pool. The following example creates a pool named "MyNewSpares." Dim NewSpares As New cPool ("MyNewSpares") 'Add the new spare part pool to project #1. MyRepository.Project.SetCurrentProject(1) MyRepository.Pool.AddPool(NewSpares)