You can connect to the repository and check documents into and out of it by script and iterate on the latest versions of repository documents through the RepositoryConnection object. You can manage repository folders and branches and LDAP and SMTP servers and the repository password policy, but you cannot manipulate repository users and groups.
The following script opens a repository connection, creates a new PDM and checks it in, and then loops over the creation of tables, and further consolidations, before closing the connection:
Dim rc Set rc = RepositoryConnection rc.Open "REPOSITORYNAME", "USER", "PW", "DBUSER", "DBPW" Output "Before consolidation" ListChildren rc Dim NewModel Set NewModel = CreateModel(PdPDM.Cls_Model, "|Language=SYASIQ1540") NewModel.Name = "My PDM" NewModel.ConsolidateNew rc For i = 1 to 5 For j = 1 to 5 NewModel.Tables.CreateNew() Next NewModel.Consolidate Next Output "After consolidation" ListChildren rc rc.Close Sub ListChildren(rc) For each c in rc.ChildObjects Output c.Name & "(Modified: " & c.ModificationDateInRepository & ")" Next End Sub
To check out a model, use the CheckOut method.
For detailed information about the members, collections, and methods available for scripting the repository, select and navigate to Libraries/PdRMG.