PLMResourceFunctionPackage Functions

This page discusses:

GetListWhoResource

Returns the list of executing resources ("Who" resources) assigned to the input system occurrence.

Note: This function replaces the GetWhoResource function, which is now deprecated.

Signature

GetListWhoResource(Production System Occurrence : ProdSystemOccurrence) : List

Arguments

Name Input / Output Required? Type Comment
Production System Occurrence In ProdSystemOccurrence Operation as ProdSystemOccurrence.

ReturnType

List

List of implementing resources.

Example

Let MyProdSysOcc(ProdSystemOccurrence)
Set MyResourceOccList(List)
set MyProdSysOcc = Occ1//[Occ1 From Argument List,provided by user selection]
set MyResourceOccList = GetListWhoResource(MyProdSysOcc)

GetPostureNameList

Get the posture or home position names applicable to the resource.

Signature

MyResourceOcc. GetPostureNameList(PostureNameList): Integer

Arguments

Name Input / Output Required? Type Comment
MyResourceOcc In ResourceOccurrence Resource occurrence for which posture or home positions are needed.
PostureNameList
Out List Postures or home positions as list of strings.

ReturnType

Integer

Return values:

  • 0: the posture or home position list is successfully retrieved, even if empty.
  • 1: the resource does not support posture, or there is an unexpected failure.

Example

let MyResourceOcc(ResourceOccurrence)
let ListPostures(List)
let iResult(Integer)
// MyResourceOcc is needed to be valuated before using this API
iResult = MyResourceOcc.GetPostureNameList(ListPostures)

GetResourceOfEachScope

Returns the resource references having a scope link with the input system reference.

Signature

GetResourceOfEachScope(Production System Reference : PLMSystem) : List

Arguments

Name Input / Output Required? Type Comment
Production System Reference In PLMSystem -

ReturnType

List

Resources as list of VPMReference.

Example

Let MySystem(PLMSystem)
Let MyList(List)
set MySystem = System//[System From Argument List,provided by user selection]
MyList = GetResourceOfEachScope(MySystem)

GetWhereResource

Returns the localization resource assigned to the input system occurrence.

Signature

GetWhereResource(Production System Occurrence : ProdSystemOccurrence) : ResourceOccurrence

Arguments

Name Input / Output Required? Type Comment
Production System Occurrence In ProdSystemOccurrence Operation as ProdSystemOccurrence.

ReturnType

ResourceOccurrence

Localization resource as ResourceOccurrence.

Example

Let MyProdSysOcc(ProdSystemOccurrence)
Let MyResourceOcc(ResourceOccurrence)
set MyProdSysOcc = Occ1//[Occ1 From Argument List,provided by user selection]
set MyResourceOcc = GetWhereResource(MyProdSysOcc)

GetWithResource

Returns the used resources assigned to the input system occurrence.

Signature

GetWithResource(Production System Occurrence : ProdSystemOccurrence) : 

Arguments

Name Input / Output Required? Type Comment
Production System Occurrence In ProdSystemOccurrence Operation as ProdSystemOccurrence.

ReturnType

List

Used resources as list of ResourceOccurrence.

Example

Let MyProdSysOcc(ProdSystemOccurrence)
Let MyList(List)
set MyProdSysOcc = Occ1//[Occ1 From Argument List,provided by user selection]
set MyList = GetWithResource(MyProdSysOcc)

InsertExistingResource

Inserts an existing resource under a resource reference.

Signature

InsertExistingResource(a resource as argument : PLMResource, a resource as argument : PLMResource) : VPMInstance

Arguments

Name Input / Output Required? Type Comment
a resource as argument In PLMResource Resource to insert.
a resource as argument In PLMResource Resource's father.

ReturnType

VPMInstance

Inserted resource instance as VPMInstance.

Example

let MyInst(VPMInstance)
let MyResource1(PLMResource)
let MyResource2(PLMResource)
MyInst = InsertExistingResource(MyResource1,MyResource1)

InsertNewResource

Inserts a new resource under a resource reference.

Signature

InsertNewResource(a resource as argument : PLMResource, Resource_Type : String) : VPMInstance

Arguments

Name Input / Output Required? Type Comment
a resource as argument In PLMResource Resource.
Resource_Type In String Resource type as string.

ReturnType

VPMInstance

Inserted resource instance as VPMInstance.

Example

let MyInst(VPMInstance)
let MyResource1(PLMResource)
let MyResourceType(String)
MyInst = InsertNewResource(MyResource1,MyResourceType)