PrtRegion.GetItemList (Method)




Retrieves a list of items for the current region.


If you call PrtRegion.GetItemList before setting PrtRegion.Loc you get the item list for all locations.

To get the item list for a current region location, set PrtRegion.Loc to that location number before calling PrtRegion.GetItemList.

If you want to get the item list for all locations and PrtRegion.Loc currently contains a location number, set PrtRegion.Loc to PRT_ALL_LOCATIONS before calling PrtRegion.GetItemList.

To get the item list for a particular item class, set PrtRegion.ItemClassId to the desired item class id before calling PrtRegion.GetItemList.


 Dim Region As New PRTRegion

   Region.Id = "PRODUCTION"


'Get all items in a region and delete those items with a

'    specific ItemTypeId.

   For i = Region.ItemCount - 1 To 0 Step -1

       If Region.Item(i).ItemTypeId = "MARKVII" then

           Region.Item(i).Delete PRT_DELETE, "Obsolete Type"  ' Correct - Region.Item(i).Delete will work.

       End If


See Also


More information

PRT Object Model member list.