PLM Functions

PLM Functions

This page discusses:

PLMCoreReference.ListOccurrences()

Finds the occurrences of the reference on which this method is called in a reference context.

Signature

PLMCoreReference.ListOccurrences(context : PLMEntity) : List

Arguments

NameInput / OutputRequired?TypeComment
contextInYesPLMEntity-

ReturnType

List

PLMCoreReference.UpdateListOccurrences()

Updates occurrences for a given root object of a structure. Calls made to ListOccurrences provides accurate results.

Signature

PLMCoreReference.UpdateListOccurrences()

Example

The following script checks if the list of instances is updated.

let ref (VPMReference)
let inst, inst2 (VPMInstance)

inst = new("VPMReference", "MyNewRef", root)
if inst <> NULL
inst2 = new("VPMInstance", "Instance2", root, inst.Reference ) 

root.UpdateListOccurrences()

let l (List)
l = inst.Reference.ListOccurrences(root)
if (l.Size() <> 2)
	Report("Error", "UpdateListOccurrences function failed")"

PLMEntity.ImplementsOperation()

PLMEntity.ImplementsOperation()

Signature

PLMEntity.ImplementsOperation(OperationName : String) : Boolean

Arguments

NameInput / OutputRequired?TypeComment
OperationNameInYesString

ReturnType

Boolean

PLMEntity.ListInstances()

Finds the instances of the reference on which this method is called in a reference context.

Signature

PLMEntity.ListInstances(context : PLMCoreReference) : List

Arguments

NameInput / OutputRequired?TypeComment
contextInYesPLMCoreReference

ReturnType

List

RefreshEntities()

The RefreshEntities function performs a selective refresh following server-side changes.

Notes:
  • The RefreshEntities function is unavailable within the framework of Business Logic.
  • Before performing a selective refresh on an assembly, ensure the representations to be refreshed are not opened in other tabs. Representations (3D shapes, drawings, etc.) opened in other tabs are not refreshed.
  • For one object, if there are two conflicting versions in session and in database, the database version is kept. In this case, your local modification is lost.
  • This function refreshes all the PLM contents that have been modified and saved in the database such as references and instances, ports, and connections.
  • Only the objects that are loaded in your session are refreshed. If a second user has added a new instance or port to your model, it is not loaded.

Signature

RefreshEntities(iPLMEntityList : List, iIsRecursive : Boolean)

Arguments

Name Input/Output Required? Type Comment
iPLMEntityList In List -
iIsRecursive In Boolean -

Example

let lEntities(List)
let oRoot(VPMReference) 
set oRoot = GetEditorRoots("VPMReference")->GetItem(1)  
lEntities.Append(oRoot)
RefreshEntities(lEntities,True)