PRT_BASIC_USE_EX

For

PRT

Project

Purpose

To change the way the CIMPLICITY behaves with regard to getting a list from a project.  If the user wants ALL PRT Basic scripts used the new EXtended PRT_APIs they can define a Project level Global Parameter.

Value

Enter one of the following.

 

0

Use old PRT API methods.

 

1

Use new Extended methods and allow across project lists properly.

 

2

Use new Extended methods.

Default Value

0

 

Comments

In addition to this global parameter you can specify these parameters on a script basis. This is done through the following methods:

' Use old PRT_API methods

PrtSetProjectSearch PRT_PROJECT_SEARCH_OLD

' Use new Extended methods with search restricted in local project

PrtSetProjectSearch PRT_PROJECT_SEARCH_CURRENT

' Use new Extended methods with search in all connected projects

PrtSetProjectSearch PRT_PROJECT_SEARCH_GLOBAL

This change will affect all of the following calls:

Affects:

PRT.GetItemList

PRT.GetRegionList

PRT.GetGroupList

PRT.GetServiceList

PRTService.GetItemList

PRTService.GetRegionList

PRTService.GetGroupList

PRTGroup.GetItemList

PRTGroup.GetRegionList

PRTRegion.GetItemList

Example

This example script assumes that GRP1 exists in both projects.

 

Sub Main()

Dim main As New Prtgroup

' Use new Extended methods with search restricted in local project

PrtSetProjectSearch PRT_PROJECT_SEARCH_CURRENT

' Associated with appropriate project

main.projectid = "TRACKER1"

main.Id = "GRP1"

' Get a list of items from group "MAIN"

'    and display them one by one in a message box.

main.GetItemList

for j = 0 to main.ItemCount - 1

      ' return all items from TRACKER1 in GRP1

      MsgBox main.Item(j).ItemId

next j

' Associate with different project

main.projectid = "TRACKER2"

main.Id = "GRP1"

' Get a list of items from group "MAIN"

'    and display them one by one in a message box.

main.GetItemList

for j = 0 to main.ItemCount - 1

      ' return all items from TRACKER 2 in GRP1

      MsgBox main.Item(j).ItemId

next j

End Sub

 

In this example:

If you change "PrtSetProjectSearch PRT_PROJECT_SEARCH_OLD" then the:

Second association of putting the main.projectid to "TRACKER2" will have no impact.

Subsequent GetItemlist would be against the original project "TRACKER1".

The same can be said for changing to
"PrtSetProjectSearch PRT_PROJECT_SEARCH_GLOBAL"
except it will use the new Extended API methods.

More information

Global parameters.