EKM

EKM
This namespace holds top-level commands and queries related to Engineering Knowledge Manager.

GetChangesFromRepository

Get changes of the project from EKM repository.

Optional Arguments

BackupProject    Backup current project
    Type     bool
    Default Value    False
CheckOut    Checkout flag if under version controlled project
    Type     bool
    Default Value    False
Example

The following example illustrates the obtaining of project changes from an EKM repository.

    EKM.GetChangesFromRepository(BackupProject=False,
                                 Checkout=False)

InitWorkbenchServer

Starts Workbench server and writes connection string in working directory. This connection string is used to set up socket connection with Workbench and control it from EKM.

LaunchWebUi

Launches EKM Desktop.

Required Arguments

ConnectionUrl    Url to open in a web browser
    Type     string

OpenFromRepository

Open an archived project from EKM repository to Workbench. The opened project will also saved in your local disk with repository info saved in the local project. Once it's opened, user can modify and save the project locally, send local changes to repository, and also update local project from repository if the project is changed in repository.

Required Arguments

ProjectPath    Local project path for the repository project to be opened to
    Type     string
RepositoryPath    Remote repository path to be downloaded from EKM repository
    Type     string

Optional Arguments

CheckOut    Should the repository project should be checked out if applicable
    Type     bool
    Default Value    False
Example

The following example illustrates the opening of an archive from an EKM Repository to local disk.

    EKM.SaveToRepository(RepositoryPath=r"\\path_to_EKM_repository\archived_project.wbpz",    // Required
                         ProjectPath=r"\\local_project_path",                                 // Required
                         CheckOut=False                                                       // Optional, applicable only if the project is under version control
                        )

SaveToRepository

Save archived project to EKM repository. The project must be saved before calling this command. A warning will popup if not saved.

Required Arguments

RepositoryFolderPath    Remote repository directory path for the archived file to be uploaded in the repository
    Type     string

Optional Arguments

CheckOut    Check out if placing under version control
    Type     bool
    Default Value    False
Description    Whether to include files imported to the project from external locations.
    Type     string
DownloadAlert    Indicate if user should be alerted if file is downloaded
    Type     bool
    Default Value    False
GetExclusiveControl    Access Control
    Type     bool
    Default Value    False
IncludeExternalFiles    Include result files
    Type     bool
    Default Value    True
IncludeResultFiles    Include result files
    Type     bool
    Default Value    True
IncludeUserFiles    Include user files
    Type     bool
    Default Value    True
LifeCycleAlert    Indicate if user should be alerted if file changes life cycle
    Type     bool
    Default Value    False
ModifyAlert    Indicate if user should be alerted if file is modified
    Type     bool
    Default Value    False
PlaceUnderVersionControl    Access Control
    Type     bool
    Default Value    False
VersionControlAlert    Indicate if user should be alerted if file changes version control
    Type     bool
    Default Value    False
Example

The following example illustrates the saving of an archive to an EKM Repository. It will save the specified archived project to the specified EKM repository, placing it under source control, and checking it out to my local machine.

    EKM.SaveToRepository(RepositoryFolderPath=r"\\path_to_EKM_repository",
                         IncludeResultFiles=True,
                         IncludeExternalFiles=True,
                         GetExclusiveControle=False,
                         PlaceUnderVersionControl=False,
                         CheckOut=False,
                         Description="My Sample EKM Project Save")

SendChangesToRepository

Save archived project to EKM repository. The project must be saved before calling this command. A warning will popup if not saved.

Required Arguments

RepositoryPath    Remote repository directory path for the project to be sent into repository
    Type     string

Optional Arguments

Checkin    Checkin option if applicable
    Type     bool
    Default Value    False
CheckOut    CheckOut option if applicable
    Type     bool
    Default Value    False
Comments    Comments
    Type     string
IncludeExternalFiles    Include result files
    Type     bool
    Default Value    True
IncludeResultFiles    Include result files
    Type     bool
    Default Value    True
IncludeUserFiles    Include user files
    Type     bool
    Default Value    True
ReleaseExclusiveControl    Release exclusive control after update if applicable
    Type     bool
    Default Value    False
Example

The following example illustrates the sending of project changes to an EKM repository. The specified archived project will be sent to the specified EKM Repository. The additional arguments specify, in order: (1) Whether a new EKM project version will be assigned (InExiting). (2) Source control behavior (CheckinOption : a value greater than zero will issue a checkin. A value of 2 will check out the project after a successful checkin.). (3) Whether to release the exclusive control (lock) upon successful project submission (ReleaseExclusiveControl).

    EKM.SendChangesToRepository(RepositoryPath=r"\\path_to_my_EKM_repository",
                                InExiting=True,
                                CheckinOption=0,
                                ReleaseExclusiveControl=False,
                                Comments="These are my comments for my changes")


Release 18.2 - © ANSYS, Inc. All rights reserved.