cancel
Showing results for 
Search instead for 
Did you mean: 

Configuration and check out

former_member217396
Participant
0 Kudos

Hi,

is there a possibility, to setup the Configuration in such way, the Models are not opened automatically during a checkout of the Configuration?

We have the problem, there are 11 models, who are dependent in term of Target Models. It’s not possible to do it using the sequence in the Configuration as almost all models have links to other Models.

What I can do, is to uncheck the “Open document” option, but this I have to do for each Model in the Configuration each time I want to check it out.

Is there a way to set it permanently or a way to uncheck this option for all Models in the Configuration?

BR,

Rafal

Accepted Solutions (0)

Answers (3)

Answers (3)

Former Member
0 Kudos

Hi Phillip,

unfortunately the merge function is not solving our problem of being able to check out models in a configuration without openening them in order to not disturb the target models. This is why we wanted to use the function CheckOutToFile and use the Parameter "Open Model" to ensure the models are checked out and not opened in the workspace.

Ideally we would be able to open a merge dialogue in case one of the models has already been checked out to the same location. Unfortunately this is not possible and opening the models to merge them is not an option as this would result in an Target Model Error.

Nevertheless the function "CheckOutToFile" is a helpful hint - thanks!

former_member200945
Contributor
0 Kudos

If you want merge dialog to show up, you need check out the model first. then open the model you want to merge with.

Then call merge function. Note you need set InteractiveMode to I'm_Dialog ( see document for detail)

Example:

Assume you have already checked out a pdm model called AA.pdm. And you have a second model called BB.pdm in your local drive.

set AA = openModel("C:\AA.pdm")

set BB = openModel("C:\BB.pdm")

InteractiveMode=im_Dialog
AA.merge BB

former_member200945
Contributor
0 Kudos

You need write code to call function

CheckOutToFile

Note the third argument setting, by default, is true. You need change to false.

CheckOutToFile(ByVal Filename As String, ByVal MergeMode As Long = 2, ByVal OpenMode As Boolean = True, ByRef Actions As String = Nothing, ByRef Conflicts As String = Nothing) As BaseObject
Checks out a repository document into a local file. In case of existence of the file, the check out will fail if it is read only and in other case it will try to merge the two documents (for models or multi model reports only). If the filename is an empty string, the document will be checked out in memory only. The merge mode specified as second parameter can contains the following values:
0 will check out the document without merge, erasing the existing local document if any, and will set the file as read-only.
1 will check out the document without merge, erasing the existing local document if any.
2 is the default and will try to automatically select the default merge actions taking into account the modification dates of objects and will cancel the check out if a conflict has been found (objects modified both in local and the repository).
3 will also select default merge actions but it will always favor local changes in case of conflict instead of canceling the check out.
4 will select default merge actions and will favor the repository changes in case of conflict.
The merge action performed during the check out and the conflicts found can be retrieved in the strings specified in the last parameters.The third parameter specified if we need to keep opened the model.

Former Member
0 Kudos

Hello Phillip,

thank your for your answer. We tried to use this function and the third Parameter is working just fine.

When using the GUI Check out, you can also merge checked out models to local models using the merge dialogue. This dialogue can not be called from the function "CheckOutToFile" - is that correct? Is there any way to implement the merge dialogue?

Thanks, Natalie

former_member200945
Contributor
0 Kudos

There is function called merge. When you call the function, the dialogue will show up.

For function CheckOutToFile, the second argument is for merge. 0 or 1 will not show the dialogue.

Former Member
0 Kudos

Hi Philip,

thanks for your swift reply. Due to the Holidays I was only able to test this now.

Unfortunately the second argument of the CheckOutToFile function in our PD (16.6 SP01 PL01) is not "merge" but "merge mode". In the metamodel objects help it is described as followed, which were also the results I found when I tested this - None of it resulted in merge dialogue:

CheckOutToFile(ByVal Filename As String, ByVal MergeMode As Long = 2, ByVal OpenMode As Boolean = True, ByRef Actions As String = Nothing, ByRef Conflicts As String = Nothing) As BaseObject

(...) merge mode specified as second parameter can contains the following values:
0 will check out the document without merge, erasing the existing local document if any, and will set the file as read-only.
1 will check out the document without merge, erasing the existing local document if any.
2 is the default and will try to automatically select the default merge actions taking into account the modification dates of objects and will cancel the check out if a conflict has been found (objects modified both in local and the repository).
3 will also select default merge actions but it will always favor local changes in case of conflict instead of canceling the check out.
4 will select default merge actions and will favor the repository changes in case of conflict.