DELLmiPPRSystemReference.UpdateViewsForListOfOperations
Updates the views for specified operations: either by rerouting or
duplicating.
SignatureDELLmiPPRSystemReference->UpdateViewsForListOfOperations
(iOperationList: List, iUpdateMode: Integer, oListProductTypes: List,
iRestrictProductFlowConstraints: Boolean): Boolean
Arguments
| Name |
Input / Output |
Required? |
Type |
Comment |
iOperationList |
Input |
Yes |
List |
List of operations. |
iUpdateMode |
Input |
Yes |
Integer |
Reroute Links =0 1: Duplicate Links = 1 |
oListProductTypes |
Input |
Yes |
List |
Available BuildUp types in a list: Current = 0, Parallel
= 1, MfgContext = 2, Additional_Product = 3, Previous_In_System = 4, Previous = 5,
Disassembled = 6 |
iRestrictProductFlowConstraints |
Input |
Yes |
Boolean |
Specifies if product build has Product Flow
constraints. |
ReturnTypeBoolean: status of this function
execution - if succeeded(True) or not(False)
Example
// Inputs - iSystemRef(DELLmiPPRSystemReference), iOperationRef(PLMOperation)
if( iSystemRef<> NULL and iOperationRef <> NULL )
{
Let OperationList(List)
OperationList.Append(iOperationRef)
Let UpdateMode(Integer)
UpdateMode = 0
Let ProductTypeList(List)
Let ProductType(Integer)
ProductType =0
ProductTypeList.Append(ProductType)
ProductType =1
ProductTypeList.Append(ProductType)
ProductType =2
ProductTypeList.Append(ProductType)
ProductType =4
ProductTypeList.Append(ProductType)
Let RestrictedToProductFlowConstraints(Boolean)
RestrictedToProductFlowConstraints=TRUE
iSystemRef.UpdateViewsForListOfOperations(OperationList,UpdateMode,ProductTypeList,RestrictedToProductFlowConstraints)
}
DELWKiDataCollectChecklistReference.CreateDCChecklistRow
Creates a Data Collect Checklist row under a given Data Collect
Checklist.
SignatureDELWKiDataCollectChecklistReference->CreateDCChecklistRow
(): PLMSpecifyHowToCollectDataCnx
ReturnTypePLMSpecifyHowToCollectDataCnx:
Created Data Collect Checklist Row
Example
// Inputs - i_objDCC (DELWKiDataCollectChecklistReference)
if (i_objDCC <> NULL )
{
Let dccRow (PLMSpecifyHowToCollectDataCnx)
DCChecklistRowBoolean=i_objDCC.CreateDCChecklistRow()
}
DELWKiDataCollectChecklistReference.DeleteDCChecklistRows
Deletes the specified Data Collect Checklist rows under a given Data Collect
Checklist.
SignatureDELWKiDataCollectChecklistReference->DeleteDCChecklistRows
(iListOfDCChecklistRows: List): Boolean
Arguments
| Name |
Input / Output |
Required? |
Type |
Comment |
iListOfDCChecklistRows |
Input |
Yes |
List |
List of Data Collect Checklist rows. |
ReturnTypeInteger: status of this function
execution - if succeeded(1) or not(non-zero)
Example
// Input - i_objDCC (DELWKiDataCollectChecklistReference)
if(i_objDCC <> NULL )
{
let ListOfDCChecklistRow(List)
let DCChecklistRowsToDelete(List)
let firstDCChecklistRow(PLMSpecifyHowToCollectDataCnx)
let thirdDCChecklistRow(PLMSpecifyHowToCollectDataCnx)
ListOfDCChecklistRow=i_objDCC.GetDCChecklistRows()
firstDCChecklistRow= ListOfDCChecklistRow.GetItem(1)
thirdDCChecklistRow= ListOfDCChecklistRow.GetItem(3)
DCChecklistRowsToDelete.Append(firstDCChecklistRow)
DCChecklistRowsToDelete.Append(thirdDCChecklistRow)
i_objDCC.DeleteDCChecklistRows(DCChecklistRowsToDelete)
}
DELWKiDataCollectChecklistReference.GetDCChecklistRows
Retrieves the Data Collect Checklist rows under a given Data Collect
Checklist.
SignatureDELWKiDataCollectChecklistReference->GetDCChecklistRows
(): List
ReturnTypeList: Data Collect Checklist Rows
of Data Collect Checklist
Example
// Input - i_objDCC (DELWKiDataCollectChecklistReference)
if(i_objDCC <> NULL )
{
Let ListOfDCChecklistRow(List)
ListOfDCChecklistRow=i_objDCC.GetDCChecklistRows()
}
DELWKiDataCollectPlanReference.CreateDCPRow
Create Data Collect Plan Row under given Data Collect Plan.
SignatureDELWKiDataCollectPlanReference->CreateDCPRow
(strDCPRowType: String): PLMSpecifyHowToCollectDataCnx
Arguments
| Name |
Input / Output |
Required? |
Type |
Comment |
strDCPRowType |
Input |
Yes |
String |
Type of Data Collect Rows as follows:
- "INTEGER"
- "TEXT"
- "BOOLEAN"
- "TIMESTAMP"
-
For Real-Type data, user can specify the magnitude name, such as
- "LENGTH"
- "MASS"
- "AREA"
- “ANGLE"
- "PRESSURE"
- "TEMPERATURE"
- "TIME"
- "VOLUME"
- “ArbitraryUnit” etc.
-
For Creating DCP Row with Parameter defined in CSCC, user must prefix the
input string with "PARAMETER:" followed by the parameter name like this:
- "PARAMETER:Parameter_1_Length"
- "PARAMETER:Parameter_2_MS/Flight"
|
ReturnTypePLMSpecifyHowToCollectDataCnx:
Created Data Collect Plan Row
Example
// Inputs - i_objDCP (DELWKiDataCollectPlanReference)
if (i_objDCP <> NULL )
{
Let dcpRowBoolean (PLMSpecifyHowToCollectDataCnx)
dcpRowBoolean= i_objDCP.CreateDCPRow("BOOLEAN")
Let dcpRowReal (PLMSpecifyHowToCollectDataCnx)
dcpRowReal= i_objDCP.CreateDCPRow("MASS")
//Create DCP Row with Parameter having REAL Arbitrary Unit
Let dcpRowParamRealArb (PLMSpecifyHowToCollectDataCnx)
dcpRowParamRealArb = i_objDCP.CreateDCPRow("PARAMETER:Parameter_2_M$/Flight")
if (dcpRowParamRealArb <> NULL )
dcpRowParamRealArb.SetAttributeStringOnDCPRow("Unit", "AJA")
else
Notify("WARNING: DCP Row is not Created")
// Create DCP Row with REAL Arbitrary Unit
Let dcpRowRealArb (PLMSpecifyHowToCollectDataCnx)
dcpRowRealArb = i_objDCP.CreateDCPRow("ArbitraryUnit")
if (dcpRowRealArb <> NULL )
dcpRowRealArb.SetAttributeStringOnDCPRow("Unit", "AJA")
else
Notify("WARNING: DCP Row is not Created")
}
DELWKiDataCollectPlanReference.GetDCPRows
Get the Data Collect Plan Rows under given Data Collect Plan.
SignatureDELWKiDataCollectPlanReference->GetDCPRows ():
List
Arguments
| Name |
Input / Output |
Required? |
Type |
Comment |
| (none) |
|
|
|
|
ReturnTypeList: Data Collect Plan Rows of
Data Collect Plan
Example
// Input - i_objDCP (DELWKiDataCollectPlanReference)
if(i_objDCP <> NULL )
{
Let ListOfDCPRow(List)
ListOfDCPRow=i_objDCP.GetDCPRows()
}
DELWKiDataCollectPlanReference.DeleteDCPRows
Deletes the specified Data Collect Plan Rows under given Data Collect
Plan.
SignatureDELWKiDataCollectPlanReference->DeleteDCPRows
(iListOfDcpRows: List): Boolean
Arguments
| Name |
Input / Output |
Required? |
Type |
Comment |
iListOfDcpRows |
Input |
Yes |
List |
List of Data Collect Plan Rows. |
ReturnTypeBoolean: status of this function
execution - if succeeded(True) or not(False)
Example
// Input - i_objDCP (DELWKiDataCollectPlanReference)
if(i_objDCP <> NULL )
{
let ListOfDCPRow(List)
let dcpRowsToDelete(List)
let firstdcpRow(PLMSpecifyHowToCollectDataCnx)
let thirddcpRow(PLMSpecifyHowToCollectDataCnx)
ListOfDCPRow=i_objDCP.GetDCPRows()
firstdcpRow= ListOfDCPRow.GetItem(1)
thirddcpRow= ListOfDCPRow.GetItem(3)
dcpRowsToDelete.Append(firstdcpRow)
dcpRowsToDelete.Append(thirddcpRow)
i_objDCP.DeleteDCPRows(dcpRowsToDelete)
}
DELWkiInstructionReference. SetWorkInstructionText
Sets the text on Textual Instructions.
This API is supported on following work instruction types:
- Textual Instruction
- Alert
- Alert Caution
- Alert Note
- Alert Warning
- Signoff
SignatureDELWkiInstructionReference.
SetWorkInstructionText (i_StrText): Integer
Arguments
| Name |
Input / Output |
Required? |
Type |
Comment |
i_StrText |
Input |
Yes |
String |
The string which needs to be set |
ReturnTypeInteger: Integer return type 0 =
Setting the text was successful; -1 = Not able to set the text
Example
*** Sample Use case of the SET API
//Sample Use case of the SET API
//----------
// Input to the script
//----------
// Let i_Wiocc_1 (DELWkiInstructionReference)
// Let i_Wiocc_2 (DELWkiInstructionReference)
// Let i_Wiocc_3 (DELWkiInstructionReference)
Let iReturnCodeSet (Integer)
//----------
// Variable declarations
//----------
Let strRichText_1_plaintext (String)
Let strRichText_2_html(String)
Let strRichText_3_fromfile (String)
Let strRichText_1_plaintext_ThruGet (String)
Let strRichText_2_html_ThruGet (String)
Let strRichText_3_fromfile_ThruGet (String)
Let i (Integer)
Let buffer (String)
Let iRc_1_SetWI(Integer)
Let iRc_2_SetWI (Integer)
Let iRc_3_SetWI (Integer)
Let iRc_1_GetWI(Integer)
Let iRc_2_GetWI (Integer)
Let iRc_3_GetWI (Integer)
Let strInputFile (String)
Let objFile (TextFile)
Let lstfilecontent(List)
Let strFileContent(String)
//----------
// Read file for input string
//----------
strInputFile = "D:\tmp\Op10_WorkInstruction.html"
set objFile = OpenTextFile(strInputFile,"r")
if(objFile<> NULL)
{
for i while objFile->IsEndOfFile() <> TRUE
{
//Read the file until end is reached, read function reads one line at a time
set buffer = objFile->Read()
lstfilecontent.Append(buffer)
}
lstfilecontent.Compute("+","String","x+\";\"+Chr(10)",strFileContent)
}
//----------
// Execution - Main Body
//----------
if( i_WIocc_1 <> NULL )
{
strRichText_1_plaintext = "Hello World"
iRc_1_SetWI= i_WIocc_1. SetWorkInstructionText (strRichText_1_plaintext)
strRichText_2_html = "<head><title>Html export</title></head><body><p>Hello World</p></body></html>"
iRc_2_SetWI = i_WIocc_2. SetWorkInstructionText (strRichText_2_html)
strRichText_3_fromfile = strFileContent
iRc_3_SetWI = i_WIocc_3. SetWorkInstructionText (strRichText_3_fromfile)
Notify("Return code from SetWorkInstructionText = iRc_1_SetWI= [#],iRc_2_SetWI = [#]iRc_3_SetWI = [#]",iRc_1_SetWI, iRc_2_SetWI, iRc_3_SetWI)
//Notify("File Content = [#]", strFileContent)
iRc_1_GetWI= i_WIocc_1. GetWorkInstructionText (strRichText_1_plaintext_ThruGet )
iRc_2_GetWI = i_WIocc_2. GetWorkInstructionText (strRichText_2_html_ThruGet )
iRc_3_GetWI = i_WIocc_3. GetWorkInstructionText (strRichText_3_fromfile_ThruGet )
Notify("Return code from GetWorkInstructionText = iRc_1_GetWI= [#],iRc_2_GetWI = [#]iRc_3_GetWI = [#]",iRc_1_GetWI, iRc_2_GetWI, iRc_3_GetWI)
Notify("strRichText_1_plaintext_ThruGet = [#]",strRichText_1_plaintext_ThruGet)
Notify("strRichText_2_html_ThruGet = [#]",strRichText_2_html_ThruGet)
Notify("strRichText_3_fromfile_ThruGet = [#]",strRichText_3_fromfile_ThruGet)
}
DELWkiInstructionReference. GetWorkInstructionText
Gets the text (String) which is set on Textual Instructions.
This API is supported on following work instruction types:
- Textual Instruction
- Alert
- Alert Caution
- Alert Note
- Alert Warning
- Signoff
SignatureDELWkiInstructionReference.
GetWorkInstructionText (o_strText): Integer
Arguments
| Name |
Input / Output |
Required? |
Type |
Comment |
o_StrText |
Output |
Yes |
String |
Gets the string which is set on the work instructions. |
ReturnTypeInterger: Interger return type 0
= Setting the text was successful; -1 = Not able to set the text
Example
*** Sample Use case of the SET API
//Sample Use case of the SET API
//----------
// Input to the script
//----------
// Let i_Wiocc_1 (DELWkiInstructionReference)
// Let i_Wiocc_2 (DELWkiInstructionReference)
// Let i_Wiocc_3 (DELWkiInstructionReference)
Let iReturnCodeSet (Integer)
//----------
// Variable declarations
//----------
Let strRichText_1_plaintext (String)
Let strRichText_2_html(String)
Let strRichText_3_fromfile (String)
Let strRichText_1_plaintext_ThruGet (String)
Let strRichText_2_html_ThruGet (String)
Let strRichText_3_fromfile_ThruGet (String)
Let i (Integer)
Let buffer (String)
Let iRc_1_SetWI(Integer)
Let iRc_2_SetWI (Integer)
Let iRc_3_SetWI (Integer)
Let iRc_1_GetWI(Integer)
Let iRc_2_GetWI (Integer)
Let iRc_3_GetWI (Integer)
Let strInputFile (String)
Let objFile (TextFile)
Let lstfilecontent(List)
Let strFileContent(String)
//----------
// Read file for input string
//----------
strInputFile = "D:\tmp\Op10_WorkInstruction.html"
set objFile = OpenTextFile(strInputFile,"r")
if(objFile<> NULL)
{
for i while objFile->IsEndOfFile() <> TRUE
{
//Read the file until end is reached, read function reads one line at a time
set buffer = objFile->Read()
lstfilecontent.Append(buffer)
}
lstfilecontent.Compute("+","String","x+\";\"+Chr(10)",strFileContent)
}
//----------
// Execution - Main Body
//----------
if( i_WIocc_1 <> NULL )
{
strRichText_1_plaintext = "Hello World"
iRc_1_SetWI= i_WIocc_1. SetWorkInstructionText (strRichText_1_plaintext)
strRichText_2_html = "<head><title>Html export</title></head><body><p>Hello World</p></body></html>"
iRc_2_SetWI = i_WIocc_2. SetWorkInstructionText (strRichText_2_html)
strRichText_3_fromfile = strFileContent
iRc_3_SetWI = i_WIocc_3. SetWorkInstructionText (strRichText_3_fromfile)
Notify("Return code from SetWorkInstructionText = iRc_1_SetWI= [#],iRc_2_SetWI = [#]iRc_3_SetWI = [#]",iRc_1_SetWI, iRc_2_SetWI, iRc_3_SetWI)
//Notify("File Content = [#]", strFileContent)
iRc_1_GetWI= i_WIocc_1. GetWorkInstructionText (strRichText_1_plaintext_ThruGet )
iRc_2_GetWI = i_WIocc_2. GetWorkInstructionText (strRichText_2_html_ThruGet )
iRc_3_GetWI = i_WIocc_3. GetWorkInstructionText (strRichText_3_fromfile_ThruGet )
Notify("Return code from GetWorkInstructionText = iRc_1_GetWI= [#],iRc_2_GetWI = [#]iRc_3_GetWI = [#]",iRc_1_GetWI, iRc_2_GetWI, iRc_3_GetWI)
Notify("strRichText_1_plaintext_ThruGet = [#]",strRichText_1_plaintext_ThruGet)
Notify("strRichText_2_html_ThruGet = [#]",strRichText_2_html_ThruGet)
Notify("strRichText_3_fromfile_ThruGet = [#]",strRichText_3_fromfile_ThruGet)
}
ObjectType.GetDCPRowsLinkedWithViewOrDressup
Retrieves the list of Data Collect Plan rows linked with view or
dressup.
SignatureObjectType->GetDCPRowsLinkedWithViewOrDressup ():
Lists
ReturnTypeList: List of Data Collect Plan
Rows linked
Example
//input i_objOperation(PLMOperation)
if(i_objOperation <> NULL)
{
Let listOfDcpRows(List)
Let listOfViews(List)
Let objView(DMUFilterType)
Let iNum_Views(Integer)
Let iCount_Views(Integer)
listOfViews = i_objOperation.GetAllViews()
iNum_Views =listOfViews.Size()
Notify("iNum_Views ="+iNum_Views)
iCount_Views=1
for iCount_Views while iCount_Views <= iNum_Views
{
Notify("~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~")
objView = listOfViews[iCount_Views]
if(objView<>NULL)
{
listOfDcpRows=objView.GetDCPRowsLinkedWithViewOrDressup()
Notify(" View-Name = [#], Number of Linked DCPRows = [#]",objView.Name, listOfDcpRows.Size())
Let iCount_DcpRows(Integer)
iCount_DcpRows=1
for iCount_DcpRows while iCount_DcpRows<= listOfDcpRows.Size()
{
Notify("======================")
Let objDCPRow(PLMSpecifyHowToCollectDataCnx)
objDCPRow=listOfDcpRows[iCount_DcpRows]
Notify("Name of DCPRow[#] = [#] ", iCount_DcpRows,objDCPRow.Name())
}// end=of=for iCount_DcpRows while iCount_DcpRows<= listOfDcpRows.Size()
} // end=of=if(objView<>NULL)
}//end=of=for iCount_Views while iCount_Views <= iNum_Views
}// end=of=if(i_objOperation <> NULL)
ObjectType.GetInstructionsLinkedWithViewOrDressup
Retrieves the list of work instructions linked with view or dressup.
SignatureObjectType->GetInstructionsLinkedWithViewOrDressup():
List
ReturnTypeList: List of Work Instructions
linked
Example
//input i_objOperation(PLMOperation)
if(i_objOperation <> NULL)
{
Let listOfWIs(List)
Let listOfViews(List)
Let objView(DMUFilterType)
Let iNum_Views(Integer)
Let iCount_Views(Integer)
listOfViews = i_objOperation.GetAllViews()
iNum_Views =listOfViews.Size()
Notify("iNum_Views ="+iNum_Views)
iCount_Views=1
for iCount_Views while iCount_Views <= iNum_Views
{
Notify("~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~")
objView = listOfViews[iCount_Views]
if(objView<>NULL)
{
listOfWIs=objView.GetInstructionsLinkedWithViewOrDressup()
Notify(" View-Name = [#], Number of Linked WIs = [#]",objView.Name,listOfWIs.Size())
Let iCount_WIs(Integer)
iCount_WIs=1
for iCount_WIs while iCount_WIs<= listOfWIs.Size()
{
Notify("======================")
Let objWI(ProdSystemOccurrence)
objWI=listOfWIs[iCount_WIs]
if(objWI <>NULL)
{
Notify("Name of WKI[#] = [#] ", iCount_WIs,objWI.Name())
}
} // end=of=for iCount_WIs while iCount_WIs<= listOfWIs.Size()
} // end=of=if(objView<>NULL)
} //end=of=for iCount_Views while iCount_Views <= iNum_Views
} // end=of=if(i_objOperation <> NULL)
PLMOperation.ActivateViews
Activates the view panel for the active Operation.
SignaturePLMOperation->ActivateViews ():
Boolean
ReturnTypeBoolean: status of this function
execution - if succeeded(True) or not(False)
Example
Let iActivatedOp(PLMOperation)
....
rc = iActivatedOp.ActivateView()
PLMOperation.ApplyView
Apply the specified view. Make sure views are activated before calling this
function.
SignaturePLMOperation->ApplyView (iView:
DMUFilterType): VoidType
Arguments
| Name |
Input / Output |
Required? |
Type |
Comment |
iView |
Input |
Yes |
DMUFilterType |
The view to apply. |
ReturnTypeVoidType
Example
Let viewList(List)
Let specifiedView(DMUFilterType)
...
viewList = parentOp.GetAllViews()
...
specifiedView = ...
...
parentOp.ApplyView( specifiedView )
PLMOperation.Create3DTextMarkerWithEmoticon
Create a marker with emoticon. Make sure views are activated before calling this
function.
SignaturePLMOperation->Create3DTextMarkerWithEmoticon
(iListMfgRsc: List, iListText: List, iEmoticonName: String): VoidType
Arguments
| Name |
Input / Output |
Required? |
Type |
Comment |
iListMfgRsc |
Input |
Yes |
List |
List of manufactured items and resources. |
iListText |
Input |
Yes |
List |
List of strings - Text content of the marker. |
iEmoticonName |
Input |
Yes |
List |
Emoticon name. |
ReturnTypeVoidType
Example
Let listMfgRsc(List) /* List of Items and resources */
Let iListText(List)
Let iEmoName(String)
...
parentOp.Create3DTextMarkerWithEmoticon(listMfgRsc, iListText, iEmoName)
PLMOperation.CreateView
You can create a new view with the current viewpoint and the current 3D state. If
no view already exists, activate views first.
SignaturePLMOperation->CreateView ():
VoidType
ReturnTypeVoidType
Example
//input-parentOp(PLMoperation)-operation provided by user selection
/*
Short Description: Provides the capability to create a new View with current viewpoint and the current state of the 3D.
*/
if(parentOp<>NULL)
{
parentOp.CreateView()
}
PLMOperation.DeActivateViews
Deactivates the view panel for the active Operation.
SignaturePLMOperation->DeActivateViews ():
Boolean
ReturnTypeBoolean: status of this function
execution - if succeeded(True) or not(False)
Example
Let iActivatedOp(PLMOperation)
....
rc = iActivatedOp.DeActivateView()
PLMOperation.DeleteDressup
Deletes the specified dressup (marker).
SignaturePLMOperation->DeleteDressup
(iDressup: Feature): Boolean
Arguments
| Name |
Input / Output |
Required? |
Type |
Comment |
iDressup |
Input |
Yes |
Feature |
Marker of interest. |
ReturnTypeBoolean: status of this function
execution - if succeeded(True) or not(False)
Example
Let dressupList(List)
Let iDressup(Feature)
Let listMfgRsc(List) /* List of items and resources */
Let ii(Integer)
...
dressupList = parentOp.GetAllDressup()
...
iDressup = dressupList[ii] /* simple assignment (without “set”) to pass to WKI-EKL APIs handling dressups */
listMfgRsc = parentOp.DeleteDressup ( iDressup )
PLMOperation.Get3DMarkerLeaderPositions
Gets marker leaders
positions (returns list of points). Make sure views are activated before calling this
function.
SignaturePLMOperation->Get3DMarkerLeaderPositions (iMarker:
Feature, iListPoint: out List): Boolean
Arguments
| Name |
Input / Output |
Required? |
Type |
Comment |
iMarker |
Input |
Yes |
Feature |
Marker of interest. |
iListPoint |
Output |
Yes |
List |
List of “Real” values x,y,z – group of 3 for each leader end
point |
ReturnTypeBoolean: status of this function
execution - if succeeded(True) or not(False)
Example
Let dressupList(List)
Let iDressup(Feature)
Let ii(Integer)
Let oMarkerLPositions(List)
Let rc(Boolean)
...
dressupList = parentOp.GetAllDressup()
...
iDressup = dressupList[ii] /* convert to Feature type for passing below */
...
...
rc = parentOp.Get3DMarkerLeaderPositions( iDressup, oMarkerLPositions )
PLMOperation.Get3DMarkerPosition
Gets a marker
position. Make sure views are activated before calling this function.
SignaturePLMOperation->Get3DMarkerPosition
(iMarker: Feature, oPosition: out List): Boolean
Arguments
| Name |
Input / Output |
Required? |
Type |
Comment |
iMarker |
Input |
Yes |
Feature |
Marker of interest. |
oPosition |
Output |
Yes |
Feature |
List of Real values: x, y, and z. |
ReturnTypeBoolean: status of this function
execution - if succeeded(True) or not(False)
Example
Let dressupList(List)
Let iDressup(Feature)
Let ii(Integer)
Let oMarkerPosition(List)
...
dressupList = parentOp.GetAllDressup()
...
iDressup = dressupList[ii] /* simple assignment (without “set”) to pass to WKI-EKL APIs handling dressups */
...
...
rc = parentOp.Get3DMarkerPosition( iMarker, oMarkerPositiion )
PLMOperation.Get3DTextMarkerProperties
Get marker
properties, 'fontName', 'fontSize', 'fontColor', 'borderLineType', 'borderWidth',
'borderColor', 'backgroundColor’, ‘zoomMode’. Make sure views are activated before calling
this function.
SignaturePLMOperation->Get3DTextMarkerProperties (iMarker:
Feature, oProperties: out List): Boolean
Arguments
| Name |
Input / Output |
Required? |
Type |
Comment |
iMarker |
Input |
Yes |
Feature |
Marker of interest. |
oProperties |
Output |
Yes |
List |
Nested list: List of 2 strings, with attribute name and value.
Valid attribute names are: 'fontName', 'fontSize', 'fontColor', 'borderLineType',
'borderWidth', 'borderColor', 'backgroundColor’ , ‘zoomMode’ |
ReturnTypeBoolean: status of this function
execution - if succeeded(True) or not(False)
Example
Let dressupList(List)
Let propertyList(List)
Let propertyItem(List)
Let propertyName(String)
Let propertyIntValue(Integer)
Let propertyStrValue(String)
Let index(Integer)
dressupList = currentOP.GetAllDressup()
Notify("Dressup Size: #", dressupList.Size() )
if ( dressupList.Size() >= 2 )
{
currentOP.Get3DTextMarkerProperties( dressupList[1], propertyList )
index=1
for index while index<=propertyList.Size()
{
propertyItem = propertyList.GetItem(index)
propertyName = propertyItem.GetItem(1)
if (propertyName=="fontName" or propertyName=="fontColor" or propertyName=="borderColor" or propertyName=="backgroundColor")
{
propertyStrValue = propertyItem.GetItem(2)
Notify("Property #: #, #", index, propertyName, propertyStrValue)
}
else if (propertyName=="zoomMode")
{
propertyBooleanValue = propertyItem.GetItem(2)
//Notify("Property #: #, #", index, propertyName, propertyStrValue
}
else
{
propertyIntValue = propertyItem.GetItem(2)
//Notify("Property #: #, #", index, propertyName, propertyStrValue
}
index = index + 1
}
// currentOP.Set3DTextMarkerProperties( dressupList[2], propertyList )
}
PLMOperation.GetAllDressup
Gets all dressup (marker,
measure, or section) of an active operation.
SignaturePLMOperation->GetAllDressup ():
List
ReturnTypeList: List of Markers, Measures
and Sections
Example
// input: i_objPlmOp(PLMOperation)
let listDressups_GetAllDressup(list)
Let listTextContent_ExistingText(List)
Let listTextContent_ToSet(List)
Let objDressup(Feature)
Let iNumOfDressUps(Integer)
Let iIndexOfDressup(Integer)
Let strDressupName(String)
listTextContent_ToSet[1] = "Line-111"
listTextContent_ToSet[2] = "Line-222"
if( i_objPlmOp <> NULL)
{
listDressups_GetAllDressup = i_objPlmOp.GetAllDressup()
iNumOfDressUps=listDressups_GetAllDressup.Size()
Notify("L_17 Number of Dressups ="+iNumOfDressUps)
if( iNumOfDressUps <> 0)
{
// work only on the first dressup
iIndexOfDressup = 1
objDressup = listDressups_GetAllDressup[iIndexOfDressup] /* simple assignment (without “set”) to pass to WKI-EKL APIs handling dressups */
if( objDressup <> NULL )
{
strDressupName = i_objPlmOp.GetDressupName( objDressup )
listTextContent_ExistingText = i_objPlmOp.GetDressupText( objDressup )
Notify("L_27 Dressup Content =[#], [#] ", listTextContent_ExistingText[1], listTextContent_ExistingText[2])
i_objPlmOp.SetDressupText( objDressup, listTextContent_ToSet )
} // if( objDressup <> NULL )
}// end=of=for ii while ii <= iNumOfDressUpOrView
} // end=of=if (i_oWki <> NULL AND i_objPlmOp <> NULL)
PLMOperation.GetAllViews
You can retrieve all views of active operations in sequence.
SignaturePLMOperation->GetAllViews ():
VoidType
ReturnTypeList: List of View
(DMUFilterType)
Example
Let viewList(List)
...
viewList = parentOp.GetAllViews()
PLMOperation.GetCurrentView
Gets the current active View. Make sure views are activated before calling this
function.
SignaturePLMOperation->GetCurrentView
(oView: out Slide): Boolean
Arguments
| Name |
Input / Output |
Required? |
Type |
Comment |
oView |
Output |
Yes |
Feature |
Slide of interest. |
ReturnTypeBoolean: status of this function
execution - if succeeded(True) or not(False)
Example
Let currentView(Feature)
Let rc(Boolean)
...
rc = parentOp.GetCurrentView( currentView )
PLMOperation.GetDressupName
Gets the name of a specified dressup (marker). Make
sure views are activated before calling this function.
SignaturePLMOperation->GetDressupName
(iDressup: Feature): String
Arguments
| Name |
Input / Output |
Required? |
Type |
Comment |
iDressup |
Input |
Yes |
Feature |
Marker of interest. |
ReturnTypeString: Name of
Dressup
Example
Let dressupList(List)
Let iDressup(Feature)
Let sDressupName(String)
Let ii(Integer)
...
dressupList = parentOp.GetAllDressup()
...
iDressup = dressupList[ii] /* simple assignment (without “set”) to pass to WKI-EKL APIs handling dressups */
sDressupName = parentOp.GetDressupName ( iDressup )
PLMOperation.GetDressupText
Get text content of specified dressup (marker) . Make sure views are activated before
calling this function.
SignaturePLMOperation->GetDressupText
(iDressup: Feature): List
Arguments
| Name |
Input / Output |
Required? |
Type |
Comment |
iDressup |
Input |
Yes |
Feature |
Marker of interest. |
ReturnTypeList: List of
Strings
Example
Let dressupList(List)
Let iDressup(Feature)
Let sTextContents(List)
Let ii(Integer)
...
dressupList = parentOp.GetAllDressup()
...
iDressup = dressupList[ii] /* simple assignment (without “set”) to pass to WKI-EKL APIs handling dressups */
sTextContents = parentOp.GetDressupText( iDressup )
PLMOperation.GetDressupVisibility
Get visibility of specified dressup (marker, measure, section) . Make sure views
are activated before calling this function.
SignaturePLMOperation->GetDressupVisibility
(iDressup: Feature): Boolean
Arguments
| Name |
Input / Output |
Required? |
Type |
Comment |
iDressup |
Input |
Yes |
Feature |
Marker of interest. |
ReturnTypeBoolean: Visibility status of
Dressup
Example
Let dressupList(List)
Let iDressup(Feature)
Let bVisible(Boolean)
Let ii(Integer)
...
dressupList = parentOp.GetAllDressup()
...
iDressup = dressupList[ii] /* simple assignment (without “set”) to pass to WKI-EKL APIs handling dressups */
bVisible = parentOp.GetDressupVisibility( iDressup )
PLMOperation.GetItemsResourcesPointedByDressup
Get Items and resources the specified dressup (marker) pointed to. Make sure views are
activated before calling this function.
SignaturePLMOperation->GetItemsResourcesPointedByDressup
(iDressup: Feature): List
Arguments
| Name |
Input / Output |
Required? |
Type |
Comment |
iDressup |
Input |
Yes |
Feature |
Marker of interest. |
ReturnTypeList: List of Manufactured-Items
and Resources
Example
Let dressupList(List)
Let iDressup(Feature)
Let listMfgRsc(List) /* List of items and resources */
Let ii(Integer)
...
dressupList = parentOp.GetAllDressup()
...
iDressup = dressupList[ii] /* simple assignment (without “set”) to pass to WKI-EKL APIs handling dressups */
listMfgRsc = parentOp.GetItemsResourcesPointedByDressup( iDressup )
PLMOperation.GetMfgItemColor
Retrieves the color of a specified item. (MfgProcessOccurrence). Make sure views
are activated before calling this function.
SignaturePLMOperation->GetMfgItemColor
(iMfgItem: MfgProcessOccurrence): List
Arguments
| Name |
Input / Output |
Required? |
Type |
Comment |
iMfgItem |
Input |
Yes |
MfgProcessOccurrence |
Manufactured item of interest. |
ReturnTypeList: List of Integer Values of –
R, G, B and Transparency
Example
Let iMfgItem(MfgProcessOccurrence)
Let colorList(List) /* List of integer: value of red, green, blue, transparency, between 0-255 */
Let iListMfgRsc(List) /* List of Items and resources */
...
colorList = parentOp.GetMfgItemColor( iMfgItem )
iListMfgRsc = ...
parentOp.SetMfgItemsResourcesColor(iListMfgRsc, colorList[1], colorList[2], colorList[3], colorList[4] )
PLMOperation.GetMfgItemPosition
Get current position of an Item (MfgProcessOccurrence) . Make sure views are
activated before calling this function.
SignaturePLMOperation->GetMfgItemPosition
(iMfgProcessOccurrence: MfgProcessOccurrence): List
Arguments
| Name |
Input / Output |
Required? |
Type |
Comment |
iMfgProcessOccurrence |
Input |
Yes |
MfgProcessOccurrence |
Manufactured item of interest. |
ReturnTypeList: List of “Real” values for
Transformation matrix
Example
/* Matrix: [r11, r12, r13, tx] */
/* [r21, r22, r23, ty]*/
/* [r31, r32, r33, tz]*/
/*List order: [r11, r21, r31, r12, r22, r32, r13, r23, r33, tx, ty, tz] */
Let iMfgItem(MfgProcessOccurrence)
Let matrixList(List) /*List of real*/
set iMfgItem=...
matrixList = parentOp.GetMfgItemPosition( iMfgItem )
PLMOperation.GetMfgItemVisibility
Retrieves visibility of a specified Item (MfgProcessOccurrence). Make sure views
are activated before calling this function.
SignaturePLMOperation->GetMfgItemVisibility
(iMfgItem: MfgProcessOccurrence): Boolean
Arguments
| Name |
Input / Output |
Required? |
Type |
Comment |
iMfgItem |
Input |
Yes |
MfgProcessOccurrence |
Manufactured item of interest. |
ReturnTypeBoolean : Visibility
Status.Possible values: Valid WI instance or NULL.
Example
Let iResource(ProductOccurrence)
Let bVisible(Boolean)
...
bVisible = parentOp.GetResourceVisibility( iResource )
PLMOperation.GetOperationSlidesImages
You can generate slide images for the given operation in the given
path.
SignaturePLMOperation->GetOperationSlidesImages (iTargetPath:
String): List
Arguments
| Name |
Input / Output |
Required? |
Type |
Comment |
iTargetPath |
Input |
Yes |
String |
Specifies the target directory. |
ReturnTypeList: List of Strings - status of
this function execution - if succeeded(True) or not(False)
Example
Let iTarget(String)
Let iImageList(List)
...
iImageList = iSelectedOp.GetOperationSlidesImages( iTarget )
PLMOperation.GetResourceColor
Retrieves the color of a specified resource (ProductOccurrence). Make sure views
are activated before calling this function.
SignaturePLMOperation->GetResourceColor
(iResource: ProductOccurrence): List
Arguments
| Name |
Input / Output |
Required? |
Type |
Comment |
iResource |
Input |
Yes |
ProductOccurrence |
Resource of interest. |
ReturnTypeList: List of Integer Values of –
R, G, B and Transparency
Example
//---------
// i_objPlmop(PLMOperation) //[Operation,Provided by user selection]
// i_occResource1(ProductOccurrence) //[Resource,Provided by user selection]
//---
// Short Description: Gets Color of User specified Resource.
//---------
//Note: Activate views for operation before running the script and make sure resource has some colour, or else it will return NULL or 0.
Let listMfgItemAndRes(List)
Let listRGBA(List) /* List of integer: value of red, green, blue, transparency, between 0-255 */
Let iBUType (Integer)
Set iBUType=1 /*1:current; 2:previous; 3:parallel*/
if(i_objPlmOp<>NULL AND i_occResource1<>NULL)
{
Notify("~~~~~~~~~~~~~~~~~~~~~~")
listRGBA = i_objPlmOp.GetResourceColor( i_occResource1 )
Notify(" Color of Resource = R[#], G[#], B[#], Transparency[#]", listRGBA[1],listRGBA[2],listRGBA[3],listRGBA[4])
Notify("~~~~~~~~~~~~~~~~~~~~~~")
}
PLMOperation.GetResourcePosition
Get current position of a Resource (ProductOccurrence) . Make sure views are
activated before calling this function.
SignaturePLMOperation->GetResourcePosition
(iResourceOccurrence: ProductOccurrence): List
Arguments
| Name |
Input / Output |
Required? |
Type |
Comment |
iResourceOccurrence |
Input |
Yes |
ProductOccurrence |
Resource of interest. |
ReturnTypeList: List of “Real” values for
Transformation matrix
Example
/* Matrix: [r11, r12, r13, tx] */
/* [r21, r22, r23, ty]*/
/* [r31, r32, r33, tz]*/
/*List order: [r11, r21, r31, r12, r22, r32, r13, r23, r33, tx, ty, tz] */
Let iResource(ProductOccurrence)
Let matrixList(List) /*List of real*/
set iResource=...
matrixList = parentOp.GetResourcePosition( iResource )
PLMOperation.GetResourceVisibility
Get visibility of specified Item (MfgProcessOccurrence). Make sure views are
activated before calling this function.
SignaturePLMOperation->GetMfgItemVisibility
(iResource: ProductOccurrence): Boolean
Arguments
| Name |
Input / Output |
Required? |
Type |
Comment |
iResource |
Input |
Yes |
ProductOccurrence |
Resource of interest. |
ReturnTypeBoolean : Visibility
Status.Possible values: Valid WI instance or NULL.
Example
Let iResource(ProductOccurrence)
Let bVisible(Boolean)
...
bVisible = parentOp.GetResourceVisibility( iResource )
PLMOperation.GetTextMarkerEmoticon
Gets Items and resources as pointed objects. Make sure views are activated before
calling this function.
SignaturePLMOperation->GetTextMarkerEmoticon
(iMarker: Feature): String
Arguments
| Name |
Input / Output |
Required? |
Type |
Comment |
iMarker |
Input |
Yes |
Feature |
Marker of interest. |
ReturnTypeString: Emoticon
name
Example
Let dressupList(List)
Let iDressup(Feature)
Let iEmoticonName(String)
Let ii(Integer)
...
dressupList = parentOp.GetAllDressup()
...
iDressup = dressupList[ii] /* simple assignment (without “set”) to pass to WKI-EKL APIs handling dressups */
...
iEmoticonName = parentOp.GetTextMarkerEmoticon( iDressup, iEmoticonName )
PLMOperation.GetViewpoint
Get Current Viewpoint. Viewpoint contains the following eyePosition (x,y,z)
sightDirection (x,y,z) upDirection (x,y,z), focus zoom angle parallel. Make sure views are
activated before calling this function.
SignaturePLMOperation->GetViewpoint
(oEyePosition: out List, oSightDirection: out List, oUpDirection: out List, oFocus: out
Real, oZoom: out Real, oAngle: out Real, oParallel: out Boolean):
Boolean
Arguments
| Name |
Input / Output |
Required? |
Type |
Comment |
oEyePosition |
Output |
Yes |
List |
List of Reals providing ViewPoint Eye Position. |
oSightDirection |
Output |
Yes |
List |
List of Reals providing ViewPoint Sight Direction. |
oUpDirection |
Output |
Yes |
List |
List of Reals providing ViewPoint Up Direction. |
oFocus |
Output |
Yes |
Real |
Focal distance. |
oZoom |
Output |
Yes |
Real |
Zoom ratio. |
oAngle |
Output |
Yes |
Real |
Angle. |
oParallel |
Output |
Yes |
Boolean |
Projection type: Parallel or Perspective. |
ReturnTypeBoolean: status of this function
execution - if succeeded(True) or not(False)
Example
Let currentView(Feature)
Let eyePos(List)
Let sightDir(List)
Let upDir(List)
Let focus(Real)
Let zoom(Real)
Let vAngle(Real)
Let parallel(Boolean)
Let rc(Boolean)
...
rc = parentOp.GetViewpoint( eyePos, sightDir, upDir, focus, zoom, vAngle, parallel )
PLMOperation.GetFTAVisibilityForItems
You can get the visibility of the FTA for list of items if the view is active.
The APIs will support only for items of buildup-type ‘current’, ‘parallel’, ‘previous’ and
‘previous in system’.
To use this API, you must configure the environment variable. Please reach out to the
R&D team for more information
SignaturePLMOperation.GetFTAVisibilityForItems (i_listOfItems,
o_ListOfDisplayFTAItemStatus): Integer
Arguments
| Name |
Input / Output |
Required? |
Type |
Comment |
i_listOfItems |
Input |
Yes |
List (of Items) |
The list of items for which FTA Visibility Status needs to be
obtained. |
o_ListOfDisplayFTAItemStatus |
Output |
Yes |
List (Integer) |
List of FTA visibility status for input items. The status returned would
be:
- 0 if FTA was hidden
- 1 if FTA was visible
- 2 if FTA was unavailable
|
ReturnTypeInteger: Integer return code: 0 =
Getting all visibility status was successful; -1 = Not able to get the visibility of at
least one item with FTA defined or one at least one item is without FTA; -2 = More than
one input item does not have FTA defined; -3 = On failure (e.g., when
DEL_WKI_ENABLE_DEPRECATED_COMMAND_DISPLAY_FTA_FOR_ITEMS ENV was not defined, when View was
not active)
Example
//----------
// Variable declarations
//----------
Let i_listOfItems (List)
Let o_ListOfDisplayFTAItemStatus (List)
Let iReturnCode (Integer)
Let iNum_Items (Integer)
Let iCount_Items (Integer)
//----------
// Execution - Main Body
//----------
if( i_objOperation<> NULL AND i_objItem_1<> NULL AND i_objItem_2<> NULL)
{
i_listOfItems.Append(i_objItem_1)
i_listOfItems.Append(i_objItem_2)
i_bDisplayFTA = TRUE
iReturnCode = i_objOperation. GetFTAVisibilityForItems (i_listOfItems, o_ListOfDisplayFTAItemStatus)
Notify("Return code from GetFTAVisibilityForItems = iReturnCode = [#]", iReturnCode)
iNum_Items = i_listOfItems.Size()
//--- listing the status
Notify("Number of Items ="+iNum_Items)
iCount_Items = 1
for iCount_Items while iCount_Items <= iNum_Items
{
Notify(" [#] Status of FTA Visibility = [#]", iCount_Items, o_ListOfDisplayFTAItemStatus [iCount_Items])
}
}
PLMOperation.GetFTARequirementVisibility
You can get visibility (hide/show) of specified FTA Requirement. Make sure views are
activated before calling this function.
To use this API, you must configure the environment variable. Please reach out to the
R&D team for more information
SignatureOperation->GetFTARequirementVisibility (i_objFTAReq) :
Boolean
Arguments
| Name |
Input / Output |
Required? |
Type |
Comment |
i_objFTAReq |
Input |
Yes |
FTARequirementModel |
The FTA Requirement whose visibility status is to be
obtained. |
ReturnTypeBoolean : Visibility Status ;
True if Visible, False if hidden.
Example
// Get the active Operation
Let ActiveOPOcc(ProdSystemOccurrence)
SelectedOP.GetActiveOperation(ActiveOPOcc)
if (ActiveOPOcc <> NULL)
{
Let ActiveOPRef(PLMOperation)
set ActiveOPRef = ActiveOPOcc.Reference
if (ActiveOPRef <> NULL)
{
// Activate Views (If not already activated)
ActiveOPRef.ActivateViews()
// Create a new View with all FTA Req visible
ActiveOPRef.CreateView()
Let ListAssignedReq(List)
set ListAssignedReq = ActiveOPRef.Requirements
if (ListAssignedReq <> NULL)
{
let nbAssignedReq(Integer)
nbAssignedReq = ListAssignedReq.Size()
Notify("Nb Assigned FTA Req: ", nbAssignedReq)
if (nbAssignedReq > 2)
{
Let ListReqsToHide(List)
let startIndex(Integer)
startIndex = nbAssignedReq / 2
Notify("Nb FTA Req to hide: ", startIndex)
let currentIndex(Integer)
currentIndex = startIndex + 1
for currentIndex while currentIndex <nbAssignedReq
{
let CurrentFTAReq(FTARequirementModel)
set CurrentFTAReq = ListAssignedReq.GetItem(currentIndex)
if (CurrentFTAReq <> NULL)
{
let FTAReqTitle(String)
FTAReqTitle = CurrentFTAReq.Title
// Notify("Current FTA Req: ", FTAReqTitle)
ListReqsToHide.Append(CurrentFTAReq)
} // if (CurrentFTAReq <> NULL)
} // for currentIndex ...
// Hide half the displayed FTA Requirements
if (ListReqsToHide <> NULL)
{
Notify("Hiding FTA Reqs ... ")
let bVisibility(Boolean)
bVisibility = false
ActiveOPRef.SetFTARequirementVisibility(ListReqsToHide, bVisibility)
Notify("Hiding FTA Reqs ... Done!")
// Create a new View with half the FTA Reqs visible
ActiveOPRef.CreateView()
} // if (ListReqsToHide <> NULL)
// Display hide/show status of all assigned FTA Requirements
Notify("Getting FTA Req visibility ... ")
currentIndex = 1
for currentIndex while currentIndex <=nbAssignedReq
{
let CurrentFTAReq(FTARequirementModel)
set CurrentFTAReq = ListAssignedReq.GetItem(currentIndex)
if (CurrentFTAReq <> NULL)
{
let FTAReqTitle(String)
FTAReqTitle = CurrentFTAReq.Title
// Notify("Current FTA Req: ", FTAReqTitle)
let bVisibility(Boolean)
bVisibility = ActiveOPRef.GetFTARequirementVisibility(CurrentFTAReq)
let displayMsg(String)
displayMsg = FTAReqTitle + ": "
Notify(displayMsg, bVisibility)
} // if (CurrentFTAReq <> NULL)
} // for currentIndex ...
Notify("Getting FTA Req visibility ... Done!")
} // if (nbAssignedReq > 2)
} // if (ListAssignedReq <> NULL)
} // if (ActiveOPRef <> NULL)
} // if (ActiveOPOcc <> NULL)
PLMOperation.RestoreAllProperties
Restores all the properties on selected items and resources. Make sure views are
activated before calling this function.
SignaturePLMOperation->RestoreAllProperties
(iListMfgItems: List): Boolean
Arguments
| Name |
Input / Output |
Required? |
Type |
Comment |
iListItems |
Input |
Yes |
List |
List of manufactured items and resources. |
ReturnTypeBoolean: status of this function
execution - if succeeded(True) or not(False)
Example
Let iActivatedOp(PLMOperation)
Let iListMfgItemResources(List)
...
rc = iActivatedOp.RestoreAllProperties(iListMfgItemResources)
PLMOperation.RestoreSpecificProperties
Restores specific properties on selected items and resources. Make sure views are
activated before calling this function.
SignaturePLMOperation->RestoreSpecificProperties (iListMfgItems:
List): Boolean
Arguments
| Name |
Input / Output |
Required? |
Type |
Comment |
iListItems |
Input |
Yes |
List |
List of manufactured items and resources. |
iProperties |
Input |
Yes |
List |
List of strings (property names). Valid values are:
- wkiPropColor
- wkiPropTransparency
- wkiPropPosition
- wkiPropVisibility
|
ReturnTypeBoolean: status of this function
execution - if succeeded(True) or not(False)
Example
Let iActivatedOp(PLMOperation)
Let iListMfgItemResources(List)
Let iRestorePropertyList(List)
…
iRestorePropertyList.Append("wkiPropColor")
iRestorePropertyList.Append("wkiPropVisibility")
…
rc = iActivatedOp.RestoreSpecificProperties(iListMfgItemResources, iRestorePropertyList )
PLMOperation.Set3DMarkerLeaderPositions
Set marker leaders
positions. Make sure views are activated before calling this function.
SignaturePLMOperation->Set3DMarkerLeaderPositions (iMarker:
Feature, iListPoint: List): Boolean
Arguments
| Name |
Input / Output |
Required? |
Type |
Comment |
iMarker |
Input |
Yes |
Feature |
Marker of interest. |
iListPoint |
Input |
Yes |
List |
List of “Real” values x,y,z – group of 3 for each leader end
point |
ReturnTypeBoolean: status of this function
execution - if succeeded(True) or not(False)
Example
Let dressupList(List)
Let iDressup(Feature)
Let ii(Integer)
Let iMarkerLPositions(List)
Let rc(Boolean)
...
dressupList = parentOp.GetAllDressup()
...
iDressup = dressupList[ii] /* convert to Feature type for passing below */
...
...
rc = parentOp.Set3DMarkerLeaderPositions( iDressup, iMarkerLPositions )
PLMOperation.Set3DMarkerPosition
Sets a marker
position. Make sure views are activated before calling this function.
SignaturePLMOperation->Set3DMarkerPosition
(iMarker: Feature, iPosition: List): Boolean
Arguments
| Name |
Input / Output |
Required? |
Type |
Comment |
iMarker |
Input |
Yes |
Feature |
Marker of interest. |
iPosition |
Input |
Yes |
Feature |
List of Real values: x, y, and z. |
ReturnTypeBoolean: status of this function
execution - if succeeded(True) or not(False)
Example
Let dressupList(List)
Let iDressup(Feature)
Let ii(Integer)
Let iMarkerPosition(List)
...
dressupList = parentOp.GetAllDressup()
...
iDressup = dressupList[ii] /* simple assignment (without “set”) to pass to WKI-EKL APIs handling dressups */
...
...
rc = parentOp.Set3DMarkerPosition( iMarker, iMarkerPositiion )
PLMOperation.Set3DTextMarkerProperties
Set marker
properties, 'fontName', 'fontSize', 'fontColor', 'borderLineType', 'borderWidth',
'borderColor', 'backgroundColor’ , ’zoomMode’. Make sure views are activated before calling
this function.
SignaturePLMOperation->Set3DTextMarkerProperties (iMarker:
Feature, oProperties: out List): Boolean
Arguments
| Name |
Input / Output |
Required? |
Type |
Comment |
iMarker |
Input |
Yes |
Feature |
Marker of interest. |
oProperties |
Output |
Yes |
List |
Nested list: List of 2 strings, with attribute name and value.
Valid attribute names are: 'fontName', 'fontSize', 'fontColor',
'borderLineType', 'borderWidth', 'borderColor', 'backgroundColor’ ,
‘zoomMode’
|
ReturnTypeBoolean: status of this function
execution - if succeeded(True) or not(False)
Example
Let dressupList(List)
Let propertyList(List)
Let propertyItem(List)
Let propertyName(String)
Let propertyIntValue(Integer)
Let propertyStrValue(String)
Let index(Integer)
dressupList = currentOP.GetAllDressup()
Notify("Dressup Size: #", dressupList.Size() )
if ( dressupList.Size() >= 2 )
{
currentOP.Get3DTextMarkerProperties( dressupList[1], propertyList )
index=1
for index while index<=propertyList.Size()
{
propertyItem = propertyList.GetItem(index)
propertyName = propertyItem.GetItem(1)
if (propertyName=="fontName" or propertyName=="fontColor" or propertyName=="borderColor" or propertyName=="backgroundColor")
{
propertyStrValue = propertyItem.GetItem(2)
Notify("Property #: #, #", index, propertyName, propertyStrValue)
}
else if (propertyName=="zoomMode")
{
propertyBooleanValue = propertyItem.GetItem(2)
//Notify("Property #: #, #", index, propertyName, propertyStrValue
}
else
{
propertyIntValue = propertyItem.GetItem(2)
//Notify("Property #: #, #", index, propertyName, propertyStrValue
}
index = index + 1
}
currentOP.Set3DTextMarkerProperties( dressupList[2], propertyList )
}
PLMOperation.SetActiveOperation
Activates the selected operation.
SignaturePLMOperation->SetActiveOperation
(): Boolean
ReturnTypeBoolean: status of this function
execution - if succeeded(True) or not(False)
Example
Let iSelectedOp(PLMOperation) ...
rc = iSelectedOp.SetActiveOperation( )
PLMOperation.SetDressupName
Sets the name of a specified dressup (marker). Make
sure views are activated before calling this function.
SignaturePLMOperation->SetDressupName
(iMarker: Feature, iDresssupName: String): Integer
Arguments
| Name |
Input / Output |
Required? |
Type |
Comment |
iDressup |
Input |
Yes |
Feature |
Marker of interest. |
iDressupName |
Input |
Yes |
String |
Name of the marker. |
ReturnTypeInteger: status of this function
execution - if succeeded(1) or not(non-zero)
Example
Let dressupList(List)
Let iDressup(Feature)
Let sDressupName(String)
Let ii(Integer)
...
dressupList = parentOp.GetAllDressup()
...
iDressup = dressupList[ii] /* simple assignment (without “set”) to pass to WKI-EKL APIs handling dressups */
sDressupName = “LabelNewName”
iRc = parentOp.SetDressupName ( iDressup, sDressupName )
PLMOperation.SetDressupVisibility
Set the visibility of specified dressup (marker, measure, section) . Make sure
views are activated before calling this function.
SignaturePLMOperation->SetDressupVisibility
(iDressup: Feature, iDressupVisibility: Boolean): Boolean
Arguments
| Name |
Input / Output |
Required? |
Type |
Comment |
iDressup |
Input |
Yes |
Feature |
Marker of interest. |
iDressupVisibility |
Input |
Yes |
Boolean |
Visibility status of dressup. |
ReturnTypeBoolean: dummy
value
Example
Let dressupList(List)
Let iDressup(Feature)
Let bVisible(Boolean)
Let ii(Integer)
...
dressupList = parentOp.GetAllDressup()
...
iDressup = dressupList[ii] /* simple assignment (without “set”) to pass to WKI-EKL APIs handling dressups */
parentOp.SetDressupVisibility( iDressup, FALSE) /* Hide the dressup */
PLMOperation.SetDressupText
Sets Items and resources as pointed objects. Make sure views are activated before
calling this function.
SignaturePLMOperation->SetDressupText
(iMarker: Feature, iListText: List): Boolean
Arguments
| Name |
Input / Output |
Required? |
Type |
Comment |
iMarker |
Input |
Yes |
Feature |
Marker of interest. |
iListItems |
Input |
Yes |
List |
List of strings. |
ReturnTypeBoolean: status of this function
execution - if succeeded(True) or not(False)
Example
Let dressupList(List)
Let iDressup(Feature)
Let iTextList (List) /* List of Text */
Let ii(Integer)
...
dressupList = parentOp.GetAllDressup()
...
iDressup = dressupList[ii] /* simple assignment (without “set”) to pass to WKI-EKL APIs handling dressups */
iTextList.Append (“Line 1”)
iTextList.Append (“Line 2”)
rc = parentOp.SetDressupText( iDressup, iTextList )
PLMOperation.SetItemsResourcesPointedByDressup
Sets Items and resources as pointed objects. Make sure views are activated before
calling this function.
SignaturePLMOperation->SetItemsResourcesPointedByDressup (iMarker:
Feature, iListItems: List): Boolean
Arguments
| Name |
Input / Output |
Required? |
Type |
Comment |
iDressup |
Input |
Yes |
Feature |
Marker of interest. |
iListItems |
Input |
Yes |
List |
List of manufactured items and resources as pointed
objects. |
ReturnTypeBoolean: status of this function
execution - if succeeded(True) or not(False)
Example
Let dressupList(List)
Let iDressup(Feature)
Let iItemsList (List) /* List of items and resources */
Let ii(Integer)
...
dressupList = parentOp.GetAllDressup()
...
iDressup = dressupList[ii] /* simple assignment (without “set”) to pass to WKI-EKL APIs handling dressups */
rc = parentOp.SetItemsResourcesPointedByDressup( iDressup, iItemsList )
PLMOperation.SetMfgItemPosition
Set absolute position on an Item (MfgProcessOccurrence) . Make sure views are
activated before calling this function.
SignaturePLMOperation->SetMfgItemPosition
(iMfgItem: MfgProcessOccurrence, iMatrix: List): VoidType
Arguments
| Name |
Input / Output |
Required? |
Type |
Comment |
iMfgItem |
Input |
Yes |
MfgProductOccurrence |
Manufactured item of interest. |
iMatrix |
Input |
Yes |
List |
List of real values for transformation matrix. |
ReturnTypeVoidType
Example
/* Matrix: [r11, r12, r13, tx] */
/* [r21, r22, r23, ty]*/
/* [r31, r32, r33, tz]*/
/*List order: [r11, r21, r31, r12, r22, r32, r13, r23, r33, tx, ty, tz] */
Let iMfgItem(MfgProcessOccurrence)
Let matrixList(List) /*List of real*/
/* rotate 90 degree on z-axis, move to position [10.0, 15.0, 0.0] */
set matrixList=List[ 0.0, 1.0, 0.0, 1.0, 0.0, 0.0, 0.0, 0.0, 1.0, 10.0, 15.0, 0.0]
set iMfgItem=...
parentOp.SetMfgItemPosition( iMfgItem, matrixList )
PLMOperation.SetResourcePosition
Set absolute position on a Resource (ProductOccurrence) . Make sure views are
activated before calling this function.
SignaturePLMOperation->SetResourcePosition
(iResource: ProductOccurrence, iMatrix: List): VoidType
Arguments
| Name |
Input / Output |
Required? |
Type |
Comment |
iResource |
Input |
Yes |
ProductOccurrence |
Resource of interest. |
iMatrix |
Input |
Yes |
List |
List of real values for transformation matrix. |
ReturnTypeVoidType
Example
/* Matrix: [r11, r12, r13, tx] */
/* [r21, r22, r23, ty]*/
/* [r31, r32, r33, tz]*/
/*List order: [r11, r21, r31, r12, r22, r32, r13, r23, r33, tx, ty, tz] */
Let iResource(ProductOccurrence)
Let matrixList(List) /*List of real*/
/* rotate 90 degree on z-axis, move to position [10.0, 15.0, 0.0] */
set matrixList=List[ 0.0, 1.0, 0.0, 1.0, 0.0, 0.0, 0.0, 0.0, 1.0, 10.0, 15.0, 0.0]
set iResource=...
parentOp.SetResourcePosition( iResource, matrixList )
PLMOperation.SetTextMarkerEmoticon
Sets Items and resources as pointed objects. Make sure views are activated before
calling this function.
SignaturePLMOperation->SetTextMarkerEmoticon
(iMarker: Feature, iEmoticonName: String): Boolean
Arguments
| Name |
Input / Output |
Required? |
Type |
Comment |
iMarker |
Input |
Yes |
Feature |
Marker of interest. |
iEmoticonName |
Input |
Yes |
String |
Emoticon name. |
ReturnTypeBoolean: status of this function
execution - if succeeded(True) or not(False)
Example
Let dressupList(List)
Let iDressup(Feature)
Let iEmoticonName(String)
Let ii(Integer)
...
dressupList = parentOp.GetAllDressup()
...
iDressup = dressupList[ii] /* simple assignment (without “set”) to pass to WKI-EKL APIs handling dressups */
...
rc = parentOp.SetTextMarkerEmoticon( iDressup, iEmoticonName )
PLMOperation.SetViewpoint
Set Current Viewpoint. Viewpoint contains the following eyePosition (x,y,z)
sightDirection (x,y,z) upDirection (x,y,z), focus zoom angle parallel. Make sure views are
activated before calling this function.
SignaturePLMOperation->SetViewpoint
(iEyePosition: List, iSightDirection: List, iUpDirection: List, iFocus: Real, iZoom: Real,
iAngle: Real, iParallel: Boolean): Boolean
Arguments
| Name |
Input / Output |
Required? |
Type |
Comment |
iEyePosition |
Input |
Yes |
List |
List of Reals providing ViewPoint Eye Position. |
iSightDirection |
Input |
Yes |
List |
List of Reals providing ViewPoint Sight Direction. |
iUpDirection |
Input |
Yes |
List |
List of Reals providing ViewPoint Up Direction. |
iFocus |
Input |
Yes |
Real |
Focal distance. |
iZoom |
Input |
Yes |
Real |
Zoom ratio. |
iAngle |
Input |
Yes |
Real |
Angle. |
iParallel |
Input |
Yes |
Boolean |
Projection type: Parallel or Perspective. |
ReturnTypeBoolean: status of this function
execution - if succeeded(True) or not(False)
Example
Let currentView(Feature)
Let eyePos(List)
Let sightDir(List)
Let upDir(List)
Let focus(Real)
Let zoom(Real)
Let vAngle(Real)
Let parallel(Boolean)
Let rc(Boolean)
...
rc = parentOp.SetViewpoint( eyePos, sightDir, upDir, focus, zoom, vAngle, parallel)
PLMOperation.SetFTAVisibilityForItems
You can set the visibility of the FTA for list of items if the view is active.
The APIs will support only for items of buildup-type ‘current’, ‘parallel’, ‘previous’ and
‘previous in system’.
To use this API, you must configure the environment variable. Please reach out to the
R&D team for more information.
SignaturePLMOperation->SetFTAVisibilityForItems(i_listOfItems,
i_bDisplayFTA, o_listOfReturnStatus): Integer
Arguments
| Name |
Input / Output |
Required? |
Type |
Comment |
i_listOfItems |
Input |
Yes |
List (of Items) |
The list of items for which FTA visibility should be
managed. |
i_bDisplayFTA |
Input |
Yes |
Boolean |
It must be TRUE to display the FTA, or FALSE to hide
it. |
o_listOfReturnStatus |
Output |
Yes |
List (Integer) |
List of status for input items. The status returned would be:
- 0 if FTA status SET was successful
- 1 if FTA status SET was unsuccessful
- 2 if FTA was unavailable
|
ReturnTypeInteger : Integer return code. 0
= All visibility status setting was successful; -1 = Not able to get the visibility of at
least one item with FTA defined or one at least one item is without FTA; -2 = More than
one input item does not have FTA defined ; -3 = On failure (e.g., when
DEL_WKI_ENABLE_DEPRECATED_COMMAND_DISPLAY_FTA_FOR_ITEMS ENV was not defined, when View was
not active.
Example
*** Sample Use case of the SET API
//----------
// Variable declarations
//----------
Let i_listOfItems (List)
Let i_bDisplayFTA (Boolean)
Let o_listOfReturnStatus (List)
Let iReturnCode (Integer)
//----------
// Execution - Main Body
//----------
if( i_objOperation<> NULL AND i_objItem_1<> NULL AND i_objItem_2<> NULL)
{
i_listOfItems.Append(i_objItem_1)
i_listOfItems.Append(i_objItem_2)
i_bDisplayFTA = TRUE
iReturnCode = i_objOperation. SetFTAVisibilityForItems (i_listOfItems, i_bDisplayFTA, o_listOfReturnStatus)
Notify("Return code from SetFTAVisibilityForItems = iReturnCode = [#]", iReturnCode)
}
PLMOperation.SetFTARequirementVisibility
You can set the visibility (hide/show) on selected list of FTA Requirements. Make sure
views are activated before calling this function.
To use this API, you must configure the environment variable. Please reach out to the
R&D team for more information.
SignatureOperation->
SetFTARequirementVisibility (i_listOfFTARequirements, i_bVisibility) :
void
Arguments
| Name |
Input / Output |
Required? |
Type |
Comment |
i_listOfFTARequirements |
Input |
Yes |
List |
The list of iFTARequirements to hide/show |
i_bVisibility |
Input |
Yes |
Boolean |
Flag of visibility to set –True to make visible; False to
hide. |
ReturnTypeNone
Example
// Get the active Operation
Let ActiveOPOcc(ProdSystemOccurrence)
SelectedOP.GetActiveOperation(ActiveOPOcc)
if (ActiveOPOcc <> NULL)
{
Let ActiveOPRef(PLMOperation)
set ActiveOPRef = ActiveOPOcc.Reference
if (ActiveOPRef <> NULL)
{
// Activate Views (If not already activated)
ActiveOPRef.ActivateViews()
// Create a new View with all FTA Req visible
ActiveOPRef.CreateView()
Let ListAssignedReq(List)
set ListAssignedReq = ActiveOPRef.Requirements
if (ListAssignedReq <> NULL)
{
let nbAssignedReq(Integer)
nbAssignedReq = ListAssignedReq.Size()
Notify("Nb Assigned FTA Req: ", nbAssignedReq)
if (nbAssignedReq > 2)
{
Let ListReqsToHide(List)
let startIndex(Integer)
startIndex = nbAssignedReq / 2
Notify("Nb FTA Req to hide: ", startIndex)
let currentIndex(Integer)
currentIndex = startIndex + 1
for currentIndex while currentIndex <nbAssignedReq
{
let CurrentFTAReq(FTARequirementModel)
set CurrentFTAReq = ListAssignedReq.GetItem(currentIndex)
if (CurrentFTAReq <> NULL)
{
let FTAReqTitle(String)
FTAReqTitle = CurrentFTAReq.Title
// Notify("Current FTA Req: ", FTAReqTitle)
ListReqsToHide.Append(CurrentFTAReq)
} // if (CurrentFTAReq <> NULL)
} // for currentIndex ...
// Hide half the displayed FTA Requirements
if (ListReqsToHide <> NULL)
{
Notify("Hiding FTA Reqs ... ")
let bVisibility(Boolean)
bVisibility = false
ActiveOPRef.SetFTARequirementVisibility(ListReqsToHide, bVisibility)
Notify("Hiding FTA Reqs ... Done!")
// Create a new View with half the FTA Reqs visible
ActiveOPRef.CreateView()
} // if (ListReqsToHide <> NULL)
// Display hide/show status of all assigned FTA Requirements
Notify("Getting FTA Req visibility ... ")
currentIndex = 1
for currentIndex while currentIndex <=nbAssignedReq
{
let CurrentFTAReq(FTARequirementModel)
set CurrentFTAReq = ListAssignedReq.GetItem(currentIndex)
if (CurrentFTAReq <> NULL)
{
let FTAReqTitle(String)
FTAReqTitle = CurrentFTAReq.Title
// Notify("Current FTA Req: ", FTAReqTitle)
let bVisibility(Boolean)
bVisibility = ActiveOPRef.GetFTARequirementVisibility(CurrentFTAReq)
let displayMsg(String)
displayMsg = FTAReqTitle + ": "
Notify(displayMsg, bVisibility)
} // if (CurrentFTAReq <> NULL)
} // for currentIndex ...
Notify("Getting FTA Req visibility ... Done!")
} // if (nbAssignedReq > 2)
} // if (ListAssignedReq <> NULL)
} // if (ActiveOPRef <> NULL)
} // if (ActiveOPOcc <> NULL)
PLMOperation.UpdateView
Provides the capability to update the currently active/applied View with the
current viewpoint and the current state of the 3D. Make sure views are activated before
calling this function.
SignaturePLMOperation->UpdateView ():
VoidType
ReturnTypeVoidType
Example
parentOp.UpdateView ()
PLMSpecifyHowToCollectDataCnx.GetAttributeIntegerFromDCPRow
Gets attribute of integer-type for specified attribute-name in Data Collect Plan
Row.
SignaturePLMSpecifyHowToCollectDataCnx->GetAttributeIntegerFromDCPRow
(i_strDCPAttributeName: String): Integer
Arguments
| Name |
Input / Output |
Required? |
Type |
Comment |
i_strDCPAttributeName |
Input |
Yes |
String |
Valid attribute names are -
-
MinBoundValue, MaxBoundValue, ControlMinBoundValue,
ControlMaxBoundValue,FailureMinBoundValue, FailureMaxBoundValue
Note:
valid values for above attributes are : 0 - Not Set, 1 - Included, 2 -
Exclude
- IntMinValue, IntMaxValue, IntControlMinValue, IntControlMaxValue
-
Criticality,.
Note:
valid values for above attributes are: 0 - undefined, 1 - NotApplicable,
2 - ProcessParameter, 3 - KeyProcessParameter, 4-
CriticalProcessParameter
|
ReturnTypeInteger: Attribute Value of given
name
Example
//~~~~~~~~~~~
// Input: i_objDCP (DELWKiDataCollectPlanReference) : Data Collect Plan Provided by User Input.
//Short Description: Gets attribute of integer-type for specified attribute-name in Data Collect Plan Row.
//~~~~~~~~~~~
//Note: Before running the script, make sure to have data collect plan row of integer type and activate the views for operation.
//~~~~~~~~~~~~
if(i_objDCP <> NULL )
{
let ListOfDCPRow(List)
let iNumOfDCPRow(Integer)
let objDcpRow1_(PLMSpecifyHowToCollectDataCnx)
let objDcpRow3__TextType (PLMSpecifyHowToCollectDataCnx)
let objDcpRow1__IntegerType (PLMSpecifyHowToCollectDataCnx)
let strDcpRowLabel(String)
let numOfMesurement(Integer)
let iMinValueStatus (Integer)
let strText(String)
let rMinimumValue(Real)
let listOfPossibleValue_TextType(List)
let listOfPossibleValue_IntType(List)
ListOfDCPRow=i_objDCP.GetDCPRows()
iNumOfDCPRow= ListOfDCPRow.Size()
objDcpRow1_= ListOfDCPRow.GetItem(2)
objDcpRow1__IntegerType= ListOfDCPRow.GetItem(1)
objDcpRow3__TextType= ListOfDCPRow.GetItem(3)
strDcpRowLabel=objDcpRow1_.GetAttributeString( "V_DCLabel" ) //PLMEntity API
numOfMesurement = objDcpRow1_.GetAttributeInteger( "V_DCNbSameMeasurement" ) //PLMEntity API
iMinValueStatus=objDcpRow1_.GetAttributeIntegerFromDCPRow("MinBoundValue")
strText = objDcpRow1_.GetAttributeStringFromDCPRow("InstructionText")
rMinimumValue = objDcpRow1_.GetAttributeRealFromDCPRow("RealMinValue")
Notify(" strDcpRowLabel = [#],numOfMesurement = [#],iMinValueStatus = [#]", strDcpRowLabel, numOfMesurement, iMinValueStatus)
Notify(" rMinimumValue = [#]", rMinimumValue)
Notify(" strText = [#]", strText)
listOfPossibleValue_TextType = objDcpRow3__TextType.GetAttributeListFromDCPRow("TextPossibleValues" )
Notify(" Text values 1=[#], 2=[#]", listOfPossibleValue_TextType[1], listOfPossibleValue_TextType[2])
listOfPossibleValue_IntType = objDcpRow1__IntegerType.GetAttributeListFromDCPRow("IntPossibleValues" )
Notify("Integer values 1=[#], 2=[#]", listOfPossibleValue_IntType[1], listOfPossibleValue_IntType[2])
PLMSpecifyHowToCollectDataCnx.GetAttributeRealFromDCPRow
Gets attribute of real-type for specified attribute-name in Data Collect Plan
Row.
SignaturePLMSpecifyHowToCollectDataCnx
->GetAttributeRealFromDCPRow (i_strDCPAttributeName: String): Real
Arguments
| Name |
Input / Output |
Required? |
Type |
Comment |
i_strDCPAttributeName |
Input |
Yes |
String |
Valid attribute names are - RealMinValue, RealMaxValue,
RealControlMinValue, RealControlMaxValue, NominalValue, FailureMinValue,
FailureMaxValue |
ReturnTypeReal: value of the
attribute
Example
//~~~~~~~~~~~
// Input: i_objDCP (DELWKiDataCollectPlanReference) : Data Collect Plan Provided by User Input.
//Short Description: Gets attribute of real type for specified attribute-name in Data Collect Plan Row.
//~~~~~~~~~~~
//Note: Before running the script, make sure to have data collect plan row of real type and activate the views for operation.
//~~~~~~~~~~~~
if(i_objDCP <> NULL )
{
let ListOfDCPRow(List)
let iNumOfDCPRow(Integer)
let objDcpRow1_(PLMSpecifyHowToCollectDataCnx)
let objDcpRow3__TextType (PLMSpecifyHowToCollectDataCnx)
let objDcpRow1__IntegerType (PLMSpecifyHowToCollectDataCnx)
let strDcpRowLabel(String)
let numOfMesurement(Integer)
let iMinValueStatus (Integer)
let strText(String)
let rMinimumValue(Real)
let listOfPossibleValue_TextType(List)
let listOfPossibleValue_IntType(List)
ListOfDCPRow=i_objDCP.GetDCPRows()
iNumOfDCPRow= ListOfDCPRow.Size()
objDcpRow1_= ListOfDCPRow.GetItem(2)
objDcpRow1__IntegerType= ListOfDCPRow.GetItem(1)
objDcpRow3__TextType= ListOfDCPRow.GetItem(3)
strDcpRowLabel=objDcpRow1_.GetAttributeString( "V_DCLabel" ) //PLMEntity API
numOfMesurement = objDcpRow1_.GetAttributeInteger( "V_DCNbSameMeasurement" ) //PLMEntity API
iMinValueStatus=objDcpRow1_.GetAttributeIntegerFromDCPRow("MinBoundValue")
strText = objDcpRow1_.GetAttributeStringFromDCPRow("InstructionText")
rMinimumValue = objDcpRow1_.GetAttributeRealFromDCPRow("RealMinValue")
Notify(" strDcpRowLabel = [#],numOfMesurement = [#],iMinValueStatus = [#]", strDcpRowLabel, numOfMesurement, iMinValueStatus)
Notify(" rMinimumValue = [#]", rMinimumValue)
Notify(" strText = [#]", strText)
listOfPossibleValue_TextType = objDcpRow3__TextType.GetAttributeListFromDCPRow("TextPossibleValues" )
Notify(" Text values 1=[#], 2=[#]", listOfPossibleValue_TextType[1], listOfPossibleValue_TextType[2])
listOfPossibleValue_IntType = objDcpRow1__IntegerType.GetAttributeListFromDCPRow("IntPossibleValues" )
Notify("Integer values 1=[#], 2=[#]", listOfPossibleValue_IntType[1], listOfPossibleValue_IntType[2])
PLMSpecifyHowToCollectDataCnx.GetAttributeStringFromDCPRow
Gets attribute of string-type for specified attribute-name in Data Collect Plan
Row.
SignaturePLMSpecifyHowToCollectDataCnx
->GetAttributeStringOnDCPRow (i_strDCPAttributeName: String): String
Arguments
| Name |
Input / Output |
Required? |
Type |
Comment |
i_strDCPAttributeName |
Input |
Yes |
String |
Valid attribute names are -
- InstructionText, Unit,
- RealMinValueWithUnit, RealMaxValueWithUnit, RealControlMinValueWithUnit,
RealControlMaxValueWithUnit, NominalValueWithUnit, FailureMinValueWithUnit,
FailureMaxValueWithUnit
- TimestampFormat
|
ReturnTypeString: value of the
attribute
Example
//~~~~~~~~~~~
// Input: i_objDCP (DELWKiDataCollectPlanReference) : Data Collect Plan Provided by User Input.
//Short Description: Gets attribute of string type for specified attribute-name in Data Collect Plan Row.
//~~~~~~~~~~~
//Note: Before running the script, make sure to have data collect plan row of string type and activate the views for operation.
//~~~~~~~~~~~~
if(i_objDCP <> NULL )
{
let ListOfDCPRow(List)
let iNumOfDCPRow(Integer)
let objDcpRow1_(PLMSpecifyHowToCollectDataCnx)
let objDcpRow3__TextType (PLMSpecifyHowToCollectDataCnx)
let objDcpRow1__IntegerType (PLMSpecifyHowToCollectDataCnx)
let strDcpRowLabel(String)
let numOfMesurement(Integer)
let iMinValueStatus (Integer)
let strText(String)
let rMinimumValue(Real)
let listOfPossibleValue_TextType(List)
let listOfPossibleValue_IntType(List)
ListOfDCPRow=i_objDCP.GetDCPRows()
iNumOfDCPRow= ListOfDCPRow.Size()
objDcpRow1_= ListOfDCPRow.GetItem(2)
objDcpRow1__IntegerType= ListOfDCPRow.GetItem(1)
objDcpRow3__TextType= ListOfDCPRow.GetItem(3)
strDcpRowLabel=objDcpRow1_.GetAttributeString( "V_DCLabel" ) //PLMEntity API
numOfMesurement = objDcpRow1_.GetAttributeInteger( "V_DCNbSameMeasurement" ) //PLMEntity API
iMinValueStatus=objDcpRow1_.GetAttributeIntegerFromDCPRow("MinBoundValue")
strText = objDcpRow1_.GetAttributeStringFromDCPRow("InstructionText")
rMinimumValue = objDcpRow1_.GetAttributeRealFromDCPRow("RealMinValue")
Notify(" strDcpRowLabel = [#],numOfMesurement = [#],iMinValueStatus = [#]", strDcpRowLabel, numOfMesurement, iMinValueStatus)
Notify(" rMinimumValue = [#]", rMinimumValue)
Notify(" strText = [#]", strText)
listOfPossibleValue_TextType = objDcpRow3__TextType.GetAttributeListFromDCPRow("TextPossibleValues" )
Notify(" Text values 1=[#], 2=[#]", listOfPossibleValue_TextType[1], listOfPossibleValue_TextType[2])
listOfPossibleValue_IntType = objDcpRow1__IntegerType.GetAttributeListFromDCPRow("IntPossibleValues" )
Notify("Integer values 1=[#], 2=[#]", listOfPossibleValue_IntType[1], listOfPossibleValue_IntType[2])
}
PLMSpecifyHowToCollectDataCnx.LinkDCPRowWithViewsOrDressups
Links the Data Collect Plan rows to specified views or dressup's.
SignaturePLMSpecifyHowToCollectDataCnx->LinkDCPRowWithViewsOrDressups
(i_oListOfViewsorDressups: List): Boolean
Arguments
| Name |
Input / Output |
Required? |
Type |
Comment |
i_oListOfViewsorDressups |
Input |
Yes |
List |
List of views or dressup's. |
ReturnTypeBoolean: status of this function
execution - if succeeded(True) or not(False)
Example
//input i_objDCP(DELWkiDataCollectPlanReference) // to get DCP Rows
//input i_objOp(PLMOperation) // to get Views
Let listOfViews(List)
Let iNum_Views(Integer)
Let listOfDCPRows(List)
Let iNum_DCPRows(Integer)
Let objDCPRow(PLMSpecifyHowToCollectDataCnx)
Let bRc(Boolean)
if(i_objDCP<> NULL AND i_objOp <> NULL)
{
listOfViews = i_objOp.GetAllViews()
listOfDCPRows=i_objDCP.GetDCPRows()
Notify("iNum_Views = [#]",listOfViews.Size())
Notify("iNum_DCPRows = [#]",listOfDCPRows.Size())
iNum_DCPRows=listOfDCPRows.Size()
if(iNum_DCPRows>=1)
{
objDCPRow=listOfDCPRows[1]
if(objDCPRow<> NULL)
{
bRc = objDCPRow.LinkDCPRowWithViewsOrDressups(listOfViews)
Notify("LinkDCPRowWithViewsOrDressups - bRc = [#]",bRc)
} //end=of=if(objDCPRow<> NULL)
} // if(iNum_DCPRows>=1)
} //end=of=if(i_objDCP<> NULL AND i_objOp <> NULL)
PLMSpecifyHowToCollectDataCnx.RemoveLinkBetDCPRowAndViewsOrDressups
You can remove a link between a given Data Collect Plan row and specified views or
dressup's.
SignaturePLMSpecifyHowToCollectDataCnx->RemoveLinkBetDCPRowAndViewsOrDressups
(i_oListOfViewsorDressups: List): Boolean
Arguments
| Name |
Input / Output |
Required? |
Type |
Comment |
i_oListOfViewsorDressups |
Input |
Yes |
List |
List of views or dressup's. |
ReturnTypeBoolean: status of this function
execution - if succeeded(True) or not(False)
Example
//input i_objDCP(DELWkiDataCollectPlanReference) // to get DCP Rows
//input i_objOp(PLMOperation) // to get Views
Let listOfViews(List)
Let iNum_Views(Integer)
Let listOfDCPRows(List)
Let iNum_DCPRows(Integer)
Let objDCPRow(PLMSpecifyHowToCollectDataCnx)
Let bRc(Boolean)
if(i_objDCP<> NULL AND i_objOp <> NULL)
{
listOfViews = i_objOp.GetAllViews()
listOfDCPRows=i_objDCP.GetDCPRows()
Notify("iNum_Views = [#]",listOfViews.Size())
Notify("iNum_DCPRows = [#]",listOfDCPRows.Size())
iNum_DCPRows=listOfDCPRows.Size()
if(iNum_DCPRows>=1)
{
objDCPRow=listOfDCPRows[1]
if(objDCPRow<> NULL)
{
bRc = objDCPRow.RemoveLinkBetDCPRowAndViewsOrDressups(listOfViews)
Notify("RemoveLinkBetDCPRowAndViewsOrDressups - bRc = [#]",bRc)
} //end=of=if(objDCPRow<> NULL)
} // if(iNum_DCPRows>=1)
} //end=of=if(i_objDCP<> NULL AND i_objOp <> NULL)
PLMSpecifyHowToCollectDataCnx.SetAttributeIntegerOnDCPRow
Sets attribute of integer-type for specified attribute-name and attribute-value in
Data Collect Plan row.
SignaturePLMSpecifyHowToCollectDataCnx
->SetAttributeIntegerOnDCPRow (i_strDCPAttributeName: String, i_iWkiDCPRowAttributeValue:
Integer): Integer
Arguments
| Name |
Input / Output |
Required? |
Type |
Comment |
i_strDCPAttributeName |
Input |
Yes |
String |
Valid attribute names are -
-
MinBoundValue, MaxBoundValue, ControlMinBoundValue, ControlMaxBoundValue,
FailureMinBoundValue, FailureMaxBoundValue
Note:
valid values for above attributes are : 0 - Not Set, 1 -
Included, 2 - Exclude
- IntMinValue, IntMaxValue, IntControlMinValue, IntControlMaxValue,
-
Criticality,.
Note:
valid values for above attributes are: 0 - undefined, 1 -
NotApplicable, 2 - ProcessParameter, 3 - KeyProcessParameter, 4-
CriticalProcessParameter
|
i_iWkiDCPRowAttributeValue |
Input |
Yes |
Integer |
Attribute value. |
ReturnTypeInteger: status of this function
execution - if succeeded(1) or not(non-zero)
Example
// Input - i_objDCP (DELWKiDataCollectPlanReference)
if(i_objDCP <> NULL )
{
//Set Attribute for Integer type Row
Let dcpRowInt (PLMSpecifyHowToCollectDataCnx)
dcpRowInt=iDCP.CreateDCPRow("INTEGER")
dcpRowInt.SetAttributeString( "V_DCMode" , "Computed")
dcpRowInt.SetAttributeInteger( "V_DCNbSameMeasurement" , 15)
dcpRowInt.SetAttributeString( "V_DCLabel", "IntegerDCPRow1 ")
dcpRowInt.SetAttributeStringOnDCPRow("InstructionText", "Text_Int”")
dcpRowInt.SetAttributeIntegerOnDCPRow("MinBoundValue", 1)
dcpRowInt.SetAttributeIntegerOnDCPRow("IntMinValue", 10)
dcpRowInt.SetAttributeIntegerOnDCPRow("MaxBoundValue", 1)
}
PLMSpecifyHowToCollectDataCnx.SetAttributeListOnDCPRow
Sets attributes of list-type for specified attribute-name and attribute-value in
Data Collect Plan row.
SignaturePLMSpecifyHowToCollectDataCnx->
SetAttributeListOnDCPRow (i_strDCPAttributeName: String, i_ListWkiDCPRowAttributeValue:
List): Integer
Arguments
| Name |
Input / Output |
Required? |
Type |
Comment |
i_strDCPAttributeName |
Input |
Yes |
String |
Valid attribute names are - IntPossibleValues,
TextPossibleValues, BooleanPossibleValue |
i_ListWkiDCPRowAttributeValue |
Input |
Yes |
List |
List of values. |
ReturnTypeInteger: status of this function
execution - if succeeded(1) or not(non-zero)
Example
// Input - i_objDCP (DELWKiDataCollectPlanReference)
if (i_objDCP <> NULL )
{
//Set Attribute for Integer type Row
let dcpRowInt (PLMSpecifyHowToCollectDataCnx)
dcpRowInt=iDCP.CreateDCPRow("INTEGER")
dcpRowInt.SetAttributeString( "V_DCMode" , "Computed")
dcpRowInt.SetAttributeInteger( "V_DCNbSameMeasurement" , 15)
dcpRowInt.SetAttributeString( "V_DCLabel", "IntegerDCPRow1 ")
dcpRowInt.SetAttributeStringOnDCPRow("InstructionText", "Text_Int”")
dcpRowInt.SetAttributeIntegerOnDCPRow("MinBoundValue", 1)
dcpRowInt.SetAttributeIntegerOnDCPRow("IntMinValue", 10)
dcpRowInt.SetAttributeIntegerOnDCPRow("MaxBoundValue", 1)
let iPossibleValues(List)
let iPosValue1(Integer)
let iPosValue2(Integer)
let iPosValue3(Integer)
iPosValue1= 20
iPosValue2= 30
iPosValue3= 40
iPossibleValues.Append(iPosValue1)
iPossibleValues.Append(iPosValue2)
iPossibleValues.Append(iPosValue3)
dcpRowInt.SetAttributeListOnDCPRow("IntPossibleValues",iPossibleValues)
}
PLMSpecifyHowToCollectDataCnx.SetAttributeRealOnDCPRow
Sets attribute of real-type for specified attribute-name and attribute-value in
Data Collect Plan Row.
SignaturePLMSpecifyHowToCollectDataCnx
->SetAttributeRealOnDCPRow (i_strDCPAttributeName: String, i_dWkiDCPRowAttributeValue:
Real): Integer
Arguments
| Name |
Input / Output |
Required? |
Type |
Comment |
i_strDCPAttributeName |
Input |
Yes |
String |
Valid attribute names are - RealMinValue, RealMaxValue,
RealControlMinValue, RealControlMaxValue, NominalValue, FailureMinValue,
FailureMaxValue |
i_dWkiDCPRowAttributeValue |
Input |
Yes |
Real |
Attribute value. |
ReturnTypeInteger: status of this function
execution - if succeeded(1) or not(non-zero)
Example
// Input - i_objDCP (DELWKiDataCollectPlanReference)
if(i_objDCP <> NULL )
{
Let dcpRowReal (PLMSpecifyHowToCollectDataCnx)
dcpRowReal=iDCP.CreateDCPRow("MASS")
dcpRowReal.SetAttributeString( "V_DCMode" , "Collected")
dcpRowReal.SetAttributeInteger( "V_DCNbSameMeasurement" , 20)
dcpRowReal.SetAttributeString( "V_DCLabel", "RealDCPRow1 ")
dcpRowInt.SetAttributeStringOnDCPRow("InstructionText", "Text_Real”")
dcpRowReal.SetAttributeStringOnDCPRow( "Unit" , "Kilogram(kg)")
dcpRowReal.SetAttributeIntegerOnDCPRow("MinBoundValue", 1)
dcpRowReal.SetAttributeRealOnDCPRow("RealMinValue", 15.5)
dcpRowReal.SetAttributeIntegerOnDCPRow("ControlMinBoundValue", 1)
dcpRowReal.SetAttributeRealOnDCPRow("RealControlMinValue", 25.5)
}
PLMSpecifyHowToCollectDataCnx.SetAttributeStringOnDCPRow
Sets attribute of string-type for specified attribute-name and attribute-value in
Data Collect Plan row.
SignaturePLMSpecifyHowToCollectDataCnx
->SetAttributeStringOnDCPRow (i_strDCPAttributeName: String, i_strwkiDCPRowAttributeValue:
String): Integer
Arguments
| Name |
Input / Output |
Required? |
Type |
Comment |
i_strDCPAttributeName |
Input |
Yes |
String |
Valid attribute names are -
- InstructionText, Unit
- RealMinValueWithUnit, RealMaxValueWithUnit, RealControlMinValueWithUnit,
RealControlMaxValueWithUnit, NominalValueWithUnit, FailureMinValueWithUnit,
FailureMaxValueWithUnit
- TimestampFormat
|
i_strwkiDCPRowAttributeValue |
Input |
Yes |
String |
Attribute value. |
ReturnTypeInteger: status of this function
execution - if succeeded(1) or not(non-zero)
Example
// Input - i_objDCP (DELWKiDataCollectPlanReference)
if(i_objDCP <> NULL )
{
Let dcpRowReal (PLMSpecifyHowToCollectDataCnx)
dcpRowReal=iDCP.CreateDCPRow("MASS")
dcpRowReal.SetAttributeString( "V_DCMode" , "Collected")
dcpRowReal.SetAttributeInteger( "V_DCNbSameMeasurement" , 20)
dcpRowReal.SetAttributeString( "V_DCLabel", "RealDCPRow1 ")
dcpRowInt.SetAttributeStringOnDCPRow("InstructionText", "Text_Real”")
dcpRowReal.SetAttributeStringOnDCPRow( "Unit" , "Kilogram(kg)")
dcpRowReal.SetAttributeIntegerOnDCPRow("MinBoundValue", 1)
dcpRowReal.SetAttributeRealOnDCPRow("RealMinValue", 15.5)
dcpRowReal.SetAttributeIntegerOnDCPRow("ControlMinBoundValue", 1)
dcpRowReal.SetAttributeRealOnDCPRow("RealControlMinValue", 25.5)
}
ProdSystemOccurrence. AssignRequirementToDataCollectPlanOrCheckList
Assigns manufacturing requirement to the Data Collect Plan or Data Collect
Checklist.
SignatureProdSystemOccurrence->AssignRequirementToDataCollectPlanOrCheckList
(i_objDcpOrDcc : ProdSystemOccurrence, Mfg Requirement that is to be assigned to DCP/DCC:
Requirement): Boolean
Arguments
| Name |
Input / Output |
Required? |
Type |
Comment |
i_objDcpOrDcc |
Input |
Yes |
ProdSystemOccurence |
|
i_objReq |
Input |
Yes |
Requirement |
|
ReturnTypeBoolean: status of this function
execution - if succeeded(True) or not(False)
Example
//i_occOperation(ProdSystemOccurrence) //[Operation,Provided by user selection]
//i_occDCP (ProdSystemOccurrence) //[DCP to which requirement is to be assigned]
let objReferenceOfOperation(PLMOperation)
let listOfReqsLinkedToOperation(List)
let objReqToBeAssignedWithDcp(Requirement)
let iNumReqsOnOperation(Integer)
let bRc(boolean)
bRc = false // initialize to false
if( i_occOperation <> NULL )
{
set objReferenceOfOperation = i_occOperation.Reference
}
if( i_occOperation <> NULL And objReferenceOfOperation <> NULL And i_occDCP <> NULL )
{
listOfReqsLinkedToOperation = objReferenceOfOperation.Requirements
iNumReqsOnOperation = listOfReqsLinkedToOperation.Size()
if(iNumReqsOnOperation>0)
{
set objReqToBeAssignedWithDcp = listOfReqsLinkedToOperation[2] // second requirement
bRc = i_occOperation.AssignRequirementToDataCollectPlanOrCheckList(i_occDCP,objReqToBeAssignedWithDcp)
Notify("AssignRequirementToDataCollectPlanOrCheckList - bRc = [#]",bRc)
}
} // end=of=if( i_occOperation <> NULL And objReferenceOfOperation <> NULL And i_occDCP <> NULL )
ProdSystemOccurrence.UnAssignRequirementFromDataCollectPlanOrCheckList
Unassigns Manufacturing Requirement from the Data Collect Plan or Data Collect
Checklist.
SignatureProdSystemOccurrence->UnassignRequirementToDataCollectPlanOrCheckList
(i_objDcpOrDcc : ProdSystemOccurrence, Mfg Requirement that is to be unassigned from
DCP/DCC: Requirement): Boolean
Arguments
| Name |
Input / Output |
Required? |
Type |
Comment |
i_objDcpOrDcc |
Input |
Yes |
ProdSystemOccurence |
|
i_objReq |
Input |
Yes |
Requirement |
|
ReturnTypeBoolean: status of this function
execution - if succeeded(True) or not(False)
Example
//i_occOperation(ProdSystemOccurrence) //[Operation,Provided by user selection]
//i_occDCP (ProdSystemOccurrence) //[DCP to which requirement is to be assigned]
let objReferenceOfOperation(PLMOperation)
let listOfReqsLinkedToOperation(List)
let objReqToBeUnassignedWithDcp(Requirement)
let iNumReqsOnOperation(Integer)
let bRc(boolean)
bRc = false // initialize to false
if( i_occOperation <> NULL )
{
set objReferenceOfOperation = i_occOperation.Reference
}
if( i_occOperation <> NULL And objReferenceOfOperation <> NULL And i_occDCP <> NULL )
{
listOfReqsLinkedToOperation = objReferenceOfOperation.Requirements
iNumReqsOnOperation = listOfReqsLinkedToOperation.Size()
if(iNumReqsOnOperation>0)
{
set objReqToBeAssignedWithDcp = listOfReqsLinkedToOperation[2] // second requirement
bRc = i_occOperation.UnassignRequirementToDataCollectPlanOrCheckList(i_occDCP, objReqToBeUnassignedWithDcp)
Notify("UnassignRequirementToDataCollectPlanOrCheckList - bRc = [#]",bRc)
}
} // end=of=if( i_occOperation <> NULL And objReferenceOfOperation <> NULL And i_occDCP <> NULL )
ProdSystemOccurrence.CheckDCPFormulaValidity
Checks the validity of formulas in the Data Collect Plans of a given workplan,
system, or parent operation.
SignatureProdSystemOccurrence->CheckDCPFormulaValidity ():
List
ReturnTypeList: List of Data Collect Plans
with invalid formulas
ProdSystemOccurrence.CompareViewImages
You can compare view images across specified workplans, systems, or
operations.
SignatureProdSystemOccurrence->CompareViewImages (iProdSysOcc1:
ProdSystemOccurrence, strDocName_1: String, iProdSysOcc2: ProdSystemOccurrence,
strDocName_2: String, iImageCmpTolerance: Real): Boolean
Arguments
| Name |
Input / Output |
Required? |
Type |
Comment |
iProdSysOcc1 |
Input |
Yes |
ProdSystemOccurrence |
First W_S_O (Workplan/System/Operation) for
comparison. |
strDocName_1 |
Input |
Yes |
String |
GenerateDocumentation name. If NULL, then the default name is:
<internal_name_of_wso>.<version>.WIDocumentationHTML
Example: gsys-53140417-00000003.A.WIDocumentationHTML
|
iProdSysOcc2 |
Input |
Yes |
ProdSystemOccurrence |
Second W_S_O (Workplan/System/Operation) for comparison. |
strDocName_2 |
Input |
Yes |
String |
GenerateDocumentation name. If NULL, then the default name
is: <internal_name_of_wso>.<version>.WIDocumentationHTML Example:
gsys-53140417-00000003.A.WIDocumentationHTML |
iImageCmpTolerance |
Input |
Yes |
Real |
Tolerance for image comparison. The ratio is the number of differing pixels to
total pixels.
Recommendation:
Set the value to 2% or 3% (to avoid detecting
nonrelevant differences).
|
ReturnTypeBoolean: status of this function
execution - if succeeded(True) or not(False)
Example
// Inputs - i_WP1 (ProdSystemOccurrence), i_WP2 (ProdSystemOccurrence)
if( i_WP1 <> NULL AND i_WP2 <> NULL )
{
Let dImageCompareTolerance = 0.02 // 2 percentage
i_WP1->CompareViewImages(i_WP1, "", i_WP2, "", 0.02)
}
ProdSystemOccurrence.Create3DLabelMarker
Create a label marker point to a list of items and resources. Make sure views are
activated before calling this function.
SignatureProdSystemOccurrence->Create3DLabelMarker (iListMfgItems:
List): VoidType
Arguments
| Name |
Input / Output |
Required? |
Type |
Comment |
iListMfgItems |
Input |
Yes |
List |
List of manufactured items and resources. |
ReturnTypeVoidType
Example
let MfgList(List)
parentOp.Create3DLabelMarker(MfgList)
ProdSystemOccurrence.Create3DTextMarker
Create a text marker point to a list of items and resources. Make sure views are
activated before calling this function.
SignatureProdSystemOccurrence->Create3DTextMarker (iListMfgItems:
List, iTextList: List): VoidType
Arguments
| Name |
Input / Output |
Required? |
Type |
Comment |
iListMfgItems |
Input |
Yes |
List |
List of manufactured items and resources. |
iTextList |
Input |
Yes |
List |
List of strings: text content and markers. |
ReturnTypeVoidType
Example
let MfgList(List)
Let iTextList (List) /* List of Text */
iTextList.Append (“Line 1”)
iTextList.Append (“Line 2”)
parentOp.Create3DTextMarker (MfgList, iTextList)
ProdSystemOccurrence.CreateNewWorkInstruction
Creates a new work instruction occurrence (reference and its instance), and
adds the occurrence as a child to the selected operation.
The following work
instruction types are available: WKIText, WKIAlert, WKISignOff, WKIDataCollect,
WKIDataCollectPlan, and WKIDataCollectChecklist.
Signature
ProdSystemOccurrence.CreateNewWorkInstruction (The new WI Type: WorkInstructionType): ProdSystemOccurrence
Arguments
| Name |
Input / Output |
Required? |
Type |
Comment |
WIType |
Input |
Yes |
WorkInstructionType |
Valid values are:
- WKIText
- WKIAlert
- WKISignoff
- WKIDataCollect
- WKIDataCollectPlan
- WKIDataCollectChecklist
|
ReturnType
ProdSystemOccurrence : created WI instance
Possible values: valid WI instance or NULL.
Example
/*
PPR Tree:
PPRContext ("PPRContext1")
.
+--RootGeneralSys1 ("RootGeneralSys1")
+--TestGeneralSys1 ("TestGeneralSys1.1")
+--LoadingOp1 ("LoadingOp1.1")
| +--WIDataCollect1 ("WIDataCollect1.1")
| +--WISignOff1 ("WISignOff1.1")
| +--WIText1 ("WIText1.1")
...
Time Constraint sequence:
WIDataCollect1 -> WISignOff1 -> WIText1
*/
Let mySelectedParentOperation (ProdSystemOccurrence)
Let myCreatedWIReference (DELWkiAlertReference)
Let myWIType (WorkInstructionType)
Let myCreatedWIOccurrence (ProdSystemOccurrence)
// ...(set/obtain mySelectedParentOperation = LoadingOp1)...
myWIType = "WKIAlert"
myCreatedWIOccurrence = mySelectedParentOperation.CreateNewWorkInstruction(myWIType)
Set myCreatedWIReference = myCreatedWIOccurrence.Reference
myCreatedWIReference.V_WIAlert_Message = "This Alert is created with CreateNewWorkInstruction() method"
/*
PPR Tree:
PPRContext ("PPRContext1")
.
+--RootGeneralSys1 ("RootGeneralSys1")
+--TestGeneralSys1 ("TestGeneralSys1.1")
+--LoadingOp1 ("LoadingOp1.1")
| +--WIDataCollect1 ("WIDataCollect1.1")
| +--WISignOff1 ("WISignOff1.1")
| +--WIText1 ("WIText1.1")
| +--WIAlert1 ("WIAlert1.1")
...
Time Constraint sequence:
WIDataCollect1 -> WISignOff1 -> WIText1 -> WIAlert1
*/
ProdSystemOccurrence.GetBuildupMfgItemsResourcesByType
Returns the list of manufacturing items and resources based on buildup type
(current, previous, or parallel). Make sure views are activated before calling this
function.
Signature
ProdSystemOccurrence->GetBuildupMfgItemsResourcesByType (iBuildupType: Integer): List
Arguments
| Name |
Input / Output |
Required? |
Type |
Comment |
BUType |
Input |
Yes |
Integer |
Integer value:
- 1: Current
- 2: Previous
- 3: Parallel
|
Return TypeList: Manufacturing Items and
Resources
Example
// Inputs - i_objProdSysOcc_Op(ProdSystemOccurrence)
// Comments: Activate views for GetBuildupMfgItemsResourcesByType to work correctly.
let iBUType (Integer) /*1:current; 2:previous; 3:parallel*/
let listOfMfgItem (List)
let iNum_MfgItems(Integer)
let iCount_MfgItems(Integer)
if( i_objProdSysOcc_Op <> NULL)
{
Notify("~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~")
Set iBUType=1 /*1:current; 2:previous; 3:parallel*/
listOfMfgItem = i_objProdSysOcc_Op.GetBuildupMfgItemsResourcesByType(iBUType)
iNum_MfgItems = listOfMfgItem.Size()
Notify("Number of CURRENT MfgItems ="+iNum_MfgItems)
iCount_MfgItems = 1
for iCount_MfgItems while iCount_MfgItems <= iNum_MfgItems
{
Notify(" [#] Name = [#]", iCount_MfgItems, listOfMfgItem[iCount_MfgItems])
}
Notify("~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~")
Set iBUType=2 /*1:current; 2:previous; 3:parallel*/
listOfMfgItem = i_objProdSysOcc_Op.GetBuildupMfgItemsResourcesByType(iBUType)
iNum_MfgItems = listOfMfgItem.Size()
Notify("Number of PREVIOUS MfgItems ="+iNum_MfgItems)
iCount_MfgItems = 1
for iCount_MfgItems while iCount_MfgItems <= iNum_MfgItems
{
Notify(" [#] Name = [#]", iCount_MfgItems, listOfMfgItem[iCount_MfgItems])
}
Notify("~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~")
}
ProdSystemOccurrence.GetViewsOrDressupsLinkedWithDCPRow
Retrieves the list of views and dressup's linked with a given Data Collect Plan
row.
SignaturePLMSpecifyHowToCollectDataCnx->GetViewsOrDressupsLinkedWithDCPRow
(): List
ReturnTypeList: List of Views and Dressups
(Markers)
Example
//input i_objDcp(DELWKiDataCollectPlanReference)
if(i_objDcp <> NULL)
{
Let listOfDcpRows(List)
Let iNumOfDCPRows(Integer)
Let objDcpRow1(PLMSpecifyHowToCollectDataCnx)
let listOfVorD(List) // ViewsOrDressups
Let iNum_VOrD(Integer)
Let iCount_VorD(Integer)
Let objFeat_VOrD(Feature)
listOfDcpRows=i_objDcp.GetDCPRows()
iNumOfDCPRows=listOfDcpRows.Size()
Notify("Number of listOfDcpRows ="+iNumOfDCPRows)
if( iNumOfDCPRows >= 1 )
{
set objDcpRow1 = listOfDcpRows[1] // get the first DCP row
if( objDcpRow1 <> NULL )
{
listOfVorD=objDcpRow2_RealType.GetViewsOrDressupsLinkedWithDCPRow()
iNum_VOrD=listOfVorD.Size()
Notify("Number of listOfVorD ="+iNum_VOrD)
iCount_VorD = 1
for iCount_VorD while iCount_VorD <= iNum_VOrD
{
set objFeat_VOrD = listOfVorD[iCount_VorD]
if(objFeat_VOrD<>NULL)
{
Notify(" Name [#] =[#]",iCount_VorD,objFeat_VOrD.Name)
}
} // end=of=for iCount_VorD while
} // end=of=if( objDcpRow1 <> NULL )
} // end=of=if( iNumOfDCPRow >= 1 )
}
ProdSystemOccurrence.GetViewsOrDressupsLinkedWithWI
Retrieves the list of views and dressup's linked with a given work
instruction.
SignatureProdSystemOccurrence->GetViewsOrDressupsLinkedWithWI ():
List
ReturnTypeList: List of Views and Dressups
(Markers)
Example
//input i_objWki (ProdSystemOccurrence), i_objPlmOp(PLMOperation)
let listOfDressUpOrView(List)
let iNumOfDressUpOrView(Integer)
let ii(Integer)
let strViewOrDressupName(String)
let listDressups_GetAllDressup(list)
Let objView(DMUFilterType )
Let listTextContent(List)
listTextContent[1] = "Line-111"
listTextContent[2] = "Line-222"
if(i_objWki <> NULL AND i_objPlmOp <> NULL)
{
// listDressups_GetAllDressup = i_objPlmOp.GetAllDressup()
// i_objPlmOp.SetDressupText( listDressups_GetAllDressup[ii], listTextContent )
listOfDressUpOrView=i_objWki.GetViewsOrDressupsLinkedWithWI()
iNumOfDressUpOrView=listOfDressUpOrView.Size()
Notify("L_18 Number of listOFDressUpOrView ="+iNumOfDressUpOrView)
ii=1
for ii while ii <= iNumOfDressUpOrView
{
set objView = listOfDressUpOrView[ii]
if(objView <> NULL)
{ // View-Type
Notify("L_25 View Name [#] =[#]",ii,objView.Name)
}
else
{ // Dressup-Type
strViewOrDressupName =i_objPlmOp.GetDressupName(listOfDressUpOrView[ii])
Notify("L_30 Dressup Name [#] =[#]",ii,strViewOrDressupName)
i_objPlmOp.SetDressupText( listOfDressUpOrView[ii], listTextContent )
} // end=of=if(objView>NULL)
} // end=of=for ii while ii <= iNumOfDressUpOrView
} // end=of=if (i_objWki <> NULL AND i_objPlmOp <> NULL)
ProdSystemOccurrence.InsertExistingWorkInstruction
Creates a new work instruction instance from an existing work instruction
reference, and adds it as a child of the selected operation.
If the parent
operation has a time constraint sequence, the newly created work instruction appears at the
end of the sequence.
Signature
ProdSystemOccurrence->InsertExistingWorkInstruction (iWorkInstructionReference - WorkInstruction Reference: PLMEntity): ProdSystemOccurrence
Arguments
| Name |
Input / Output |
Required? |
Type |
Comment |
iWorkInstructionReference |
Input |
Yes |
PLMEntity |
The work instruction needs to be under an operation. |
ReturnType
ProdSystemOccurrence : Inserted WI instance
Possible values: valid WI instance or NULL.
Example
//---
//i_occOperation(ProdSystemOccurrence) //[Operation,Provided by user selection]
// i_objPlmEntityOfAlert(PLMEntitiy) //[Alert,Provided by user selection]
//---
// Short Description: Alert existing in Op1. It is used for creating instance in Op2
//---
let WkiAlertInst (DELWkiAlertInstance)
let objAlertOccCreatedFromExisting (ProdSystemOccurrence)
if( i_occOperation <> NULL AND i_objPlmEntityOfAlert <> NULL)
{
objAlertOccCreatedFromExisting = i_occOperation.InsertExistingWorkInstruction(i_objPlmEntityOfAlert )
set WkiAlertInst= objAlertOccCreatedFromExisting.Instance
If( WkiAlertInst <> NULL)
{
Notify("Success in getting Alert Instance")
}
}
ProdSystemOccurrence.LinkInstructionWithViewsOrDressups
Links the instruction to specified views or dressup's.
SignatureProdSystemOccurrence->LinkInstructionWithViewsOrDressups
(i_oListOfViewsorDressups: List): Boolean
Arguments
| Name |
Input / Output |
Required? |
Type |
Comment |
i_oListOfViewsorDressups |
Input |
Yes |
List |
List of views or dressup's. |
ReturnTypeBoolean: status of this function
execution - if succeeded(True) or not(False)
Example
//Input- i_objOperation(PLMOperation),i_objWKI(ProdSystemOccurrence)
Let listOfViews(List)
Let bRc(Boolean)
listOfViews = i_objOperation.GetAllViews()
bRc = i_objWKI.LinkInstructionWithViewsOrDressups(listOfViews)
Notify("Value of bRc = [#]",bRc)
ProdSystemOccurrence.MoveAfter
Moves an existing work instruction occurrence after a targeted work
instruction.
Signature
ProdSystemOccurrence->MoveAfter (iWorkInstructionOccurrence - WorkInstruction Occurrence where the moving WI is inserted after this: ProdSystemOccurrence): VoidType
Arguments
| Name |
Input / Output |
Required? |
Type |
Comment |
iWorkInstructionReference |
Input |
Yes |
PLMEntity |
The work instruction that needs to be under an
operation. |
Example
//input
// i_objWiOccThatisMoved (ProdSystemOccurrence) //[Operation,Provided by user selection]
// i_ objWiOccAfterWhichItIsToBePositioned (ProdSystemOccurrence) //[Operation provided by user selection]
//~~~~~~~~~~
//Short Description: Move the source (first selected) Work Instruction immediately after the target (second selected) Work Instruction
//When you select the source and target it changes the sequence of operations.
//~~~~~~~~~~
if(i_objWiOccThatisMoved <> NULL AND i_objWiOccAfterWhichItIsToBePositioned <> NULL)
{
i_ objWiOccAfterWhichItIsToBePositioned.MoveAfter(i_objWiOccAfterWhichMoved)
}
ProdSystemOccurrence.MoveBefore
Moves an existing work instruction occurrence before a targeted work
instruction successor.
Signature
ProdSystemOccurrence->MoveBefore (iWorkInstructionOccurrence - WorkInstruction Occurrence where the moving WI is inserted in front of this: ProdSystemOccurrence): VoidType
Arguments
| Name |
Input / Output |
Required? |
Type |
Comment |
iWorkInstructionReference |
Input |
Yes |
PLMEntity |
The work instruction that needs to be under an
operation. |
Example
//~~~~~~~~~~
//input
// i_objWiOccThatisMoved (ProdSystemOccurrence) //[Operation,Provided by user selection]
// i_objWiOccBeforeWhichMoved (ProdSystemOccurrence) //[Operation Provided by user selection]
//~~~~~~~~~~~
//Short Description:Move the source (first selected) Work Instruction immediately before the target (second selected) Work Instruction
//When you select the source and target it changes the sequence of operations
//~~~~~~~~~~~
if(i_objWiOccThatisMoved<>NULL AND i_objWiOccBeforeWhichMoved <> NULL)
{
i_objWiOccThatisMoved.MoveBefore(i_objWiOccBeforeWhichMoved)
}
ProdSystemOccurrence.RemoveLinkBetWIAndViewsOrDressups
Removes link between a given work instruction and specified views or
dressup's.
SignatureProdSystemOccurrence->RemoveLinkBetWIAndViewsOrDressups
(i_oListOfViewsorDressups: List): Boolean
Arguments
| Name |
Input / Output |
Required? |
Type |
Comment |
i_oListOfViewsorDressups |
Input |
Yes |
List |
List of views or dressup's. |
ReturnTypeBoolean: status of this function
execution - if succeeded(True) or not(False)
Example
//input i_objWI(ProdSystemOccurrence)
//input i_objOp(PLMOperation)) // to get Views
Let i_objWI(ProdSystemOccurrence)
Let listOfViews(List)
Let bRc(Boolean)
if(i_objWI<> NULL AND i_objOp <> NULL)
{
listOfViews = i_objOp.GetAllViews()
bRc = i_objWI.RemoveLinkBetWIAndViewsOrDressups(listOfViews)
Notify("RemoveLinkBetWIAndViewsOrDressups - bRc = [#]",bRc)
} //end=of=if(i_objWI<> NULL AND i_objOp <> NULL)
ProdSystemOccurrence.SetActiveSystem
Activates the view panel for the active operation.
SignatureProdSystemOccurrence->SetActiveSystem ():
Boolean
ReturnTypeBoolean: status of this function
execution - if succeeded(True) or not(False)
Example
Let iSelectedSys(ProdSystemOccurrence) ...
rc = iSelectedSys.SetActiveSystem( )
ProdSystemOccurrence.SetMfgItemsResourcesVisibility
Set visibility on selected list of items and resources. Make sure views are
activated before calling this function.
SignatureProdSystemOccurrence->SetMfgItemsResourcesVisibility
(iListMfgItems: List, iVisibility: Boolean): VoidType
Arguments
| Name |
Input / Output |
Required? |
Type |
Comment |
iListMfgItems |
Input |
Yes |
List |
List of manufactured items and resources. |
iVisibility |
Input |
Yes |
Boolean |
Visibility:
- True for show
- Hide for false
|
ReturnTypeVoidType
Example
let MfgList(List)
let Visibility (Integer)
Set Visibility=0
parentOp.SetMfgItemsResourcesVisibility(MfgList,Visibility)
ProdSystemOccurrence.SetMfgItemsResourcesColor
Set color on selected list of items and resources. Make sure views are activated
before calling this function.
SignatureProdSystemOccurrence->SetMfgItemsResourcesColor
(iListMfgItems: List, iColorR: Integer, iColorG: Integer, iColorB: Integer, iTransparency:
Integer): VoidType
Arguments
| Name |
Input / Output |
Required? |
Type |
Comment |
iListMfgItems |
Input |
Yes |
List |
List of manufactured items and resources. |
iColorR |
Input |
Yes |
Integer |
Red component of color: 0–255. |
iColorG |
Input |
Yes |
Integer |
Green component of color: 0–255. |
iColorB |
Input |
Yes |
Integer |
Blue component of color: 0–255. |
iTransparency |
Input |
Yes |
Integer |
Transparency: 0 (opaque) - 255 (fully transparent). |
ReturnTypeProdSystemOccurrence: created WI
instance
Example
let MfgList(List)
let ColorR (Integer)
let ColorG (Integer)
let ColorB (Integer)
let Alpha (Integer)
Set ColorR=255,
Set ColorG=0,
Set ColorB=0
Set Alpha=126
parentOp.SetMfgItemColort(MfgList, ColorR, ColorG, ColorB, Alpha)
ProdSystemOccurrence.UpdateViewsForListOfOperationsBasedOnInstanceNames
Update Views based on Operation Name.
To use this API, you must configure the environment variable. Please reach out to the
R&D team for more information.
SignatureProdSystemOccurrence->UpdateViewsForListOfOperationsBasedOnInstanceNames(
i_listOfOperations, i_iUpdateMode, i_listOfBuildUpTypesToConsider,
i_bRestrictedToProductFlowConstraints) : Integer
Arguments
| Name |
Input / Output |
Required? |
Type |
Comment |
i_listOfOperations |
Input |
Yes |
List (of Operation) |
Operation list which needs to updated. |
i_iUpdateMode |
Input |
Yes |
Integer |
To reroute or duplicate the markers, when its attached mfg
items are revised. 0 = for Reroute 1 = for Duplicate
(reserved) |
i_listOfBuildUpTypesToConsider |
Input |
Yes |
List (of Integer) |
Provide list of build-up types to consider for updating the views
0 = for Default
1 = to consider current Mfg Items
2 = to consider Previous Mfg Items
3 = to consider Parallel Mfg Items
4 = to consider Context Mfg Items
50 = to consider resources
|
i_bRestrictedToProductFlowConstraints |
Input |
Yes |
Boolean |
To consider Product Flow Constraints or not |
iTransparency |
Input |
Yes |
Integer |
Transparency: 0 (opaque) - 255 (fully transparent). |
ReturnTypeInteger: Integer return code:0
for successful execution; 1 for Partial success; -1 for Invalid Input - No valid Operation
list; -2 for Invalid Input - Incorrect Update Mode; -3 for Invalid Input - no valid
Build-Up specified; -5 for Invalid Runtime Environment.
Example
//~~~~~~~~~~~
// input i_objOperation(ProdSystemOccurrence):
// Workplan, System or Operation provided by User Input in EKL-UI
//~~~~~~~~~~~
// Short Description:
// Update Views based on Operation Name on User selected Operation
//~~~~~~~~~~~
//----------
// Variable declarations
//----------
Let listOfOperations (List)
Let iUpdateMode_Reroute(Integer)
Let listOfBuildUpTypesToConsider(List)
Let iTempProductType_CurrentMfgItems (Integer)
Let iTempProductType_PreviousMfgItems (Integer)
Let iTempProductType_ParallelMfgItems (Integer)
Let iTempProductType_ContextMfgItems (Integer)
Let iTempProductType_Resources (Integer)
Let bRestrictedToProductFlowConstraints(Boolean)
Let iReturnCode (Integer)
//----------
// Execution - Main Body
//----------
if( i_objOperation<> NULL)
{
listOfOperations.Append(i_objOperation)
iUpdateMode_Reroute = 0 // for Reroute.
iTempProductType_CurrentMfgItems = 1 // Current Mfg Items
iTempProductType_PreviousMfgItems = 2 // Previous Mfg Items
iTempProductType_ParallelMfgItems = 3 // Parallel Mfg Items
iTempProductType_ContextMfgItems = 4 // Context Mfg Items
iTempProductType_Resources = 50 // Resources
listOfBuildUpTypesToConsider.Append( iTempProductType_CurrentMfgItems )
listOfBuildUpTypesToConsider.Append( iTempProductType_PreviousMfgItems )
listOfBuildUpTypesToConsider.Append( iTempProductType_ParallelMfgItems )
listOfBuildUpTypesToConsider.Append( iTempProductType_ContextMfgItems )
listOfBuildUpTypesToConsider.Append( iTempProductType_Resources )
bRestrictedToProductFlowConstraints = TRUE
iReturnCode = i_objOperation.UpdateViewsForListOfOperationsBasedOnInstanceNames(
listOfOperations, iUpdateMode_Reroute, listOfBuildUpTypesToConsider,
bRestrictedToProductFlowConstraints)
Notify("Return code from UpdateViewsForListOfOperationsBasedOnInstanceNames = iReturnCode = [#]", iReturnCode)
}
PLMOperation.GetActiveOperation
Gets the activated operation and notifies the name of the activated
operation.
SignatureProdSystemOccurrence->GetActiveOperation (Workplan Or
System or Operation or WorkInstruction Occurrence: ProdSystemOccurrence): Boolean
Arguments
| Name |
Input / Output |
Required? |
Type |
Comment |
iSelectedOp_1 |
Input |
Yes |
ProdSystemOccurrence |
|
iSelectedOp_2 |
Input |
Yes |
PLMOperation |
|
i_objActiveOperation |
Input |
Yes |
ProdSystemOccurrence |
|
ReturnTypeBoolean: status of this function
execution - if succeeded(True) or not(False)
Example
//~~~~~~~~
//Input: iSelectedOp_1 (ProdSystemOccurrence)
// : iSelectedOp_2 (PLMOperation)
//~~~~~~~~
//ShortDescription: Gets the activated operation and notifies the name of the activated operation.
//~~~~~~~~
Let bRc(Boolean)
Let i_objActiveOperation(ProdSystemOccurrence)
if(iSelectedOp_1 <> NULL AND iSelectedOp_2 <> NULL )
{
iSelectedOp_2.SetActiveOperation()
bRc = iSelectedOp_1.GetActiveOperation(i_objActiveOperation)
Notify("the value of bRc = [#]" , bRc)
Notify(i_objActiveOperation.Name)
}
PLMOperation.GetActiveSystem
Gets the activated system and notifies the name of the activated
system.
SignatureProdSystemOccurrence->GetActiveSystem (Workplan Or System
or Operation or WorkInstruction Occurrence: ProdSystemOccurrence):
Boolean
Arguments
| Name |
Input / Output |
Required? |
Type |
Comment |
iSelectedOp_1 |
Input |
Yes |
ProdSystemOccurrence |
|
iSelectedOp_2 |
Input |
Yes |
ProdSystemOccurrence |
|
i_objActiveOperation |
Input |
Yes |
ProdSystemOccurrence |
|
ReturnTypeBoolean: status of this function
execution - if succeeded(True) or not(False)
Example
//~~~~~~~~
//Input: iSelectedOp_1 (ProdSystemOccurrence)
// : iSelectedOp_2 (ProdSystemOccurrence)
//~~~~~~~~
//ShortDescription: Gets the activated system and notifies the name of the activated system.
//~~~~~~~~
Let bRc(Boolean)
Let i_objActiveSystem(ProdSystemOccurrence)
if(iSelectedOp_1 <> NULL AND iSelectedOp_2 <> NULL )
{
iSelectedOp_2.SetActiveSystem()
bRc = iSelectedOp_1.GetActiveSystem(i_objActiveSystem)
Notify("the value of bRc = [#]" , bRc)
Notify(i_objActiveSystem.Name)
}
ProdSystemOccurrence.SetItemsAssociatedWithInstruction
Set the list of Items Associated to the selected Instruction.
SignatureProdSystemOccurrence->SetItemsAssociatedWithInstruction
(i_oListOfItems: List): Boolean
Arguments
| Name |
Input / Output |
Required? |
Type |
Comment |
i_ ObjWI |
Input |
Yes |
ProdSystemOccurrence |
|
listIATI_ToAssociateWithWI |
Input |
Yes |
List |
|
ReturnTypeBoolean: status of this function
execution - if succeeded(True) or not(False)
Example
//~~~~~~~~
//Input: i_ ObjWI (ProdSystemOccurrence) => selcted Work Instruction Object
//~~~~~~~~
//----------
// Variable declarations
//----------
let listIATI_ToAssociateWithWI(List)
Let bRc_SetAssociated(Boolean)
bRc_SetAssociated = False
.....
if( listIATI_ToAssociateWithWI.Size() > 0 )
{
bRc_SetAssociated = i_ObjWI->SetItemsAssociatedWithInstruction(listIATI_ToAssociateWithWI)
Notify("\t Status of bRc_SetAssociated after SetItemsAssociatedWithInstruction = [#]", bRc_SetAssociated)
}
PLMSpecifyHowToCollectDataCnx.SetItemsAssociatedWithDCPRow
Setting the list of Items Associated to the selected DCPRow.
For usage in non-WKI workbenches the immediate parent operation of the DCP must be set as
an active operation explicitly using PLMoperation.SetActiveOperation().
This enables the APIs to traverse the correct operation, header, and operation occurrence,
and sets the appropriate MfgItems.
/* begin script */
…
selectedOp (PLMoperation);
i_objFirstDCPRow (PLMSpecifyHowToCollectDataCnx)
selectedOp.SetActiveOperation();
bRc = i_objFirstDCPRow->SetItemsAssociatedWithDCPRow()
…
/* end script */
SignatureData Collect Plan
Row->SetItemsAssociatedWithDCPRow (i_oListOfItems: List): Boolean
Arguments
| Name |
Input / Output |
Required? |
Type |
Comment |
i_ objFirstDCPRow |
Input |
Yes |
PLMSpecifyHowToCollectDataCnx |
|
listIATI_ToAssociateWithDCPRow |
Input |
Yes |
List |
|
ReturnTypeBoolean: status of this function
execution - if succeeded(True) or not(False)
Example
//~~~~~~~~
//Input: i_objFirstDCPRow (PLMSpecifyHowToCollectDataCnx) => selcted DCPRow Object
//~~~~~~~~
//----------
// Variable declarations
//----------
let i_objFirstDCPRow(PLMSpecifyHowToCollectDataCnx)
let listIATI_ToAssociateWithDCPRow(List)
Let bRc_SetAssociated(Boolean)
bRc_SetAssociated = False
if( listIATI_ToAssociateWithDCPRow.Size() > 0 )
{
bRc_SetAssociated = i_objFirstDCPRow->SetItemsAssociatedWithDCPRow(listIATI_ToAssociateWithDCPRow)
Notify("\t Status of bRc_SetAssociated after SetItemsAssociatedWithDCPRow = [#]", bRc_SetAssociated)
}
ProdSystemOccurrence.GetItemsAssociatedWithInstruction
Get the list of Items Associated with Selected Instruction.
SignatureProdSystemOccurrence->GetItemsAssociatedWithInstruction
(): List
Arguments
| Name |
Input / Output |
Required? |
Type |
Comment |
i_ ObjWI |
Input |
Yes |
ProdSystemOccurrence |
|
listIATI_GetItemsFromWI |
Output |
Yes |
List |
|
ReturnTypeList: List of Items Associated
with Selected Instruction.
Example
//~~~~~~~~
//Input: i_ ObjWI (ProdSystemOccurrence) => selcted Work Instruction Object
//~~~~~~~~
//----------
// Variable declarations
//----------
let listIATI_GetItemsFromWI(List)
listIATI_GetItemsFromWI = i_ObjWI->GetItemsAssociatedWithInstruction()
….
if( listIATI_GetItemsFromWI.Size() > 0 )
{
Notify("\t Num Items associated to Selected Work Instruction = [#]", listIATI_GetItemsFromWI.Size())
}
else
{
Notify("\t - No Items associated to Selected Work Instruction")
}
PLMSpecifyHowToCollectDataCnx.GetItemsAssociatedWithDCPRow
For usage in non-WKI workbenches the immediate parent operation of the DCP must be
set as an active operation explicitly using PLMoperation.SetActiveOperation().
This enables the APIs to traverse the correct operation, header, and operation occurrence,
and gets the appropriate MfgItems.
/* begin script */
…
selectedOp (PLMoperation);
i_objFirstDCPRow (PLMSpecifyHowToCollectDataCnx)
selectedOp.SetActiveOperation();
bRc = i_objFirstDCPRow->GetItemsAssociatedWithDCPRow()
…
/* end script */
SignatureData Collect Plan
Row->GetItemsAssociatedWithDCPRow (): List
Arguments
| Name |
Input / Output |
Required? |
Type |
Comment |
i_ objFirstDCPRow |
Input |
Yes |
PLMSpecifyHowToCollectDataCnx |
|
listIATI_GetItemsFromDCPRow |
Output |
Yes |
List |
|
ReturnTypeList: List of Items Associated
with Selected DCPRow.
Example
//~~~~~~~~
//Input: i_objFirstDCPRow(PLMSpecifyHowToCollectDataCnx) => selcted DCPRow Object
//~~~~~~~~
//----------
// Variable declarations
//----------
let i_objFirstDCPRow(PLMSpecifyHowToCollectDataCnx)
let listIATI_GetItemsFromDCPRow(List)
listIATI_GetItemsFromDCPRow = objFirstDCPRow->GetItemsAssociatedWithDCPRow()
if( listIATI_GetItemsFromDCPRow.Size() > 0 )
{
Notify("\t Num Items associated to first DCPRow = [#]", listIATI_GetItemsFromDCPRow.Size())
}
else
{
Notify("\t No Items associated to Selected Work Instruction")
}
ProdSystemOccurrence.RemoveAssociationBetweenInstructionAndItems
Remove the list of Items Associated from the Selected Instruction.
SignatureProdSystemOccurrence->RemoveAssociationBetweenInstructionAndItems
(i_oListOfItems: List): Boolean
Arguments
| Name |
Input / Output |
Required? |
Type |
Comment |
i_ ObjWI |
Input |
Yes |
ProdSystemOccurrence |
|
listIATI_ ToRemoveAssociationFromWI |
Output |
Yes |
List |
|
ReturnTypeBoolean: status of this function
execution - if succeeded(True) or not(False)
Example
//~~~~~~~~
//Input: i_ ObjWI (ProdSystemOccurrence) => selcted Work Instruction Object
//~~~~~~~~
//----------
// Variable declarations
//----------
Let listIATI_ToRemoveAssociationFromWI(List)
Let bRc_RemoveAssociated(Boolean)
bRc_RemoveAssociated = False
if( listIATI_ToRemoveAssociationFromWI.Size() > 0 )
{
bRc_RemoveAssociated = i_ObjWI->RemoveAssociationBetweenInstructionAndItems(listIATI_ToRemoveAssociationFromWI)
Notify("Status of bRc_RemoveAssociated after RemoveItemsAssociatedWithInstruction = [#]", bRc_RemoveAssociated)
}
PLMSpecifyHowToCollectDataCnx.RemoveAssociationBetweenDCPRowAndItems
For usage in non-WKI workbenches the immediate parent operation of the DCP must be
set as an active operation explicitly using PLMoperation.SetActiveOperation().
This enables the APIs to traverse the correct operation, header, and operation occurrence,
and removes the appropriate MfgItems.
/* begin script */
…
selectedOp (PLMoperation);
i_objFirstDCPRow (PLMSpecifyHowToCollectDataCnx)
selectedOp.SetActiveOperation();
bRc = i_objFirstDCPRow->RemoveAssociationBetweenDCPRowAndItems()
…
/* end script */
SignatureData Collect Plan
Row->RemoveAssociationBetweenDCPRowAndItems (i_oListOfItems: List):
Boolean
Arguments
| Name |
Input / Output |
Required? |
Type |
Comment |
i_ objFirstDCPRow |
Input |
Yes |
PLMSpecifyHowToCollectDataCnx |
|
listIATI_GetItemsFromDCPRow |
Input |
Yes |
List |
|
ReturnTypeBoolean: status of this function
execution - if succeeded(True) or not(False)
Example
//~~~~~~~~
//Input: i_objFirstDCPRow (PLMSpecifyHowToCollectDataCnx) => selcted DCPRow Object
//~~~~~~~~
//----------
// Variable declarations
//----------
let i_objFirstDCPRow(PLMSpecifyHowToCollectDataCnx)
let listIATI_ToRemoveAssociationFromDCPRow(List)
Let bRc_RemoveAssociated(Boolean)
bRc_RemoveAssociated = False
if( listIATI_ToRemoveAssociationFromDCPRow.Size() > 0 )
{
bRc_RemoveAssociated = objFirstDCPRow->RemoveAssociationBetweenDCPRowAndItems(listIATI_ToRemoveAssociationFromDCPRow)
Notify("Status of bRc_RemoveAssociated after RemoveItemsAssociatedWithDCPRow = [#]", bRc_RemoveAssociated)
}
PLMSpecifyHowToCollectDataCnx.GetRequirementFromDCPRow
This method gets the Requirement associated with DCPRow.
SignatureProdSystemOccurrence->
GetRequirementFromDCPRow (i_objDcpOrDcc : ProdSystemOccurrence, Mfg Requirement that is to
be assigned to DCP/DCC: Requirement): Boolean
Arguments
| Name |
Input / Output |
Required? |
Type |
i_ iterObjDcpRow |
Input |
Yes |
PLMSpecifyHowToCollectDataCnx |
o_objReq |
Output |
Yes |
Requirement |
ReturnTypeBoolean: status of this function
execution - if succeeded(True) or not(False)
Example
Let i_objDCP (DELWkiDataCollectPlanReference)
Let iterObjDcpRow(PLMSpecifyHowToCollectDataCnx)
Let listOfDCPRows(List)
listOfDCPRows=i_objDCP.GetDCPRows()
set iterObjDcpRow = listOfDCPRows.GetItem(1) // first item in the list
...
Let o_objReq(Requirement)
o_objReq = iterObjDcpRow.GetRequirementFromDCPRow()
if( o_objReq <> NULL )
{
Notify("DcpRowName = [#], ReqName = [#]",iterObjDcpRow.Name, o_objReq.Name )
}
PLMSpecifyHowToCollectDataCnx.SetCapableResourcesAssociatedWithDCPRow
Setting the list of Capable Resources Associated to the selected
DCPRow.
For usage in non-WKI workbenches the immediate parent operation of the DCP must be set as
an active operation explicitly using PLMoperation.SetActiveOperation().
This enables the APIs to traverse the correct operation, header, and operation occurrence,
and sets the appropriate capable resources.
/* begin script */
…
selectedOp (PLMoperation);
i_objFirstDCPRow (PLMSpecifyHowToCollectDataCnx)
selectedOp.SetActiveOperation();
bRc = i_objFirstDCPRow->SetCapableResourcesAssociatedWithDCPRow()
…
/* end script */
SignatureData Collect Plan
Row->SetCapableResourcesAssociatedWithDCPRow (i_oListOfCapableResources: List):
Boolean
Arguments
| Name |
Input / Output |
Required? |
Type |
i_ objFirstDCPRow |
Input |
Yes |
PLMSpecifyHowToCollectDataCnx |
listOfCR_ToAssociateWithDCPRow |
Input |
Yes |
List |
ReturnTypeBoolean: status of this function
execution - if succeeded(True) or not(False)
Example
//~~~~~~~~
//Input: i_objFirstDCPRow (PLMSpecifyHowToCollectDataCnx) => selcted DCPRow Object
//~~~~~~~~
//----------
// Variable declarations
//----------
let i_objFirstDCPRow(PLMSpecifyHowToCollectDataCnx)
let listOfCR_ToAssociateWithDCPRow(List)
Let bRc_SetAssociated(Boolean)
bRc_SetAssociated = False
if( listOfCR_ToAssociateWithDCPRow.Size() > 0 )
{
bRc_SetAssociated = i_objFirstDCPRow->SetCapableResourcesAssociatedWithDCPRow(listOfCR_ToAssociateWithDCPRow)
Notify("\t Status of bRc_SetAssociated after SetCapableResourcesAssociatedWithDCPRow = [#]", bRc_SetAssociated)
}
PLMSpecifyHowToCollectDataCnx.GetCapableResourcesAssociatedWithDCPRow
Get the list of Capable Resources Associated with the selected DCPRow.
For usage in non-WKI workbenches the immediate parent operation of the DCP must be set as
an active operation explicitly using PLMoperation.SetActiveOperation().
This enables the APIs to traverse the correct operation, header, and operation occurrence,
and gets the appropriate capable resources.
/* begin script */
…
selectedOp (PLMoperation);
i_objFirstDCPRow (PLMSpecifyHowToCollectDataCnx)
selectedOp.SetActiveOperation();
bRc = i_objFirstDCPRow->GetCapableResourcesAssociatedWithDCPRow()
…
/* end script */
SignatureData Collect Plan
Row->GetCapableResourcesAssociatedWithDCPRow (): List
Arguments
| Name |
Input / Output |
Required? |
Type |
i_ objFirstDCPRowI |
Input |
Yes |
PLMSpecifyHowToCollectDataCnx |
listOfCR_GetItemsFromDCPRow |
Input |
Yes |
List |
ReturnTypeList: List of Capable Resources
Associated with Selected DCPRow.
Example
//~~~~~~~~
//Input: i_objFirstDCPRow (PLMSpecifyHowToCollectDataCnx) => selcted DCPRow Object
//~~~~~~~~
//----------
// Variable declarations
//----------
let i_objFirstDCPRow(PLMSpecifyHowToCollectDataCnx)
let listOfCR_GetItemsFromDCPRow(List)
listOfCR_GetItemsFromDCPRow = objFirstDCPRow->GetCapableResourcesAssociatedWithDCPRow()
if( listOfCR_GetItemsFromDCPRow.Size() > 0 )
{
Notify("\tNum Items associated to first DCPRow = [#]", listOfCR_GetItemsFromDCPRow.Size())
}
else
{
Notify("\t No Items associated to Selected Work Instruction")
}
PLMSpecifyHowToCollectDataCnx.RemoveAssociationBetweenDCPRowAndCapableResources
Remove the list of Capable Resources Associated from the Selected
DCPRow.
For usage in non-WKI workbenches the immediate parent operation of the DCP must be set as
an active operation explicitly using PLMoperation.SetActiveOperation().
This enables the APIs to traverse the correct operation, header, and operation occurrence,
and removes the appropriate capable resources.
/* begin script */
…
selectedOp (PLMoperation);
i_objFirstDCPRow (PLMSpecifyHowToCollectDataCnx)
selectedOp.SetActiveOperation();
bRc = i_objFirstDCPRow->RemoveAssociationBetweenDCPRowAndCapableResources()
…
/* end script */
SignatureData Collect Plan
Row->RemoveAssociationBetweenDCPRowAndCapableResources (i_oListOfCapableResources: List):
Boolean
Arguments
| Name |
Input / Output |
Required? |
Type |
i_ objFirstDCPRowI |
Input |
Yes |
PLMSpecifyHowToCollectDataCnx |
listOfCR_GetItemsFromDCPRow |
Output |
Yes |
List |
ReturnTypeBoolean: status of this function
execution - if succeeded(True) or not(False)
Example
//~~~~~~~~
//Input: i_objFirstDCPRow (PLMSpecifyHowToCollectDataCnx) => selcted DCPRow Object
//~~~~~~~~
//----------
// Variable declarations
//----------
let i_objFirstDCPRow(PLMSpecifyHowToCollectDataCnx)
let listOfCR_ToRemoveAssociationFromDCPRow(List)
Let bRc_RemoveAssociated(Boolean)
bRc_RemoveAssociated = False
if( listOfCR_ToRemoveAssociationFromDCPRow.Size() > 0 )
{
bRc_RemoveAssociated = objFirstDCPRow->RemoveAssociationBetweenDCPRowAndItems(listOfCR_ToRemoveAssociationFromDCPRow)
Notify("Status of bRc_RemoveAssociated after RemoveAssociationBetweenDCPRowAndItems = [#]", bRc_RemoveAssociated)
}
ProdSystemOccurrence.SetCapableResourcesAssociatedWithInstruction
Set the list of Capable Resources Associated to the selected
Instruction.
SignatureProdSystemOccurrence->AssignRequirementToDataCollectPlanOrCheckList
(i_objDcpOrDcc : ProdSystemOccurrence, Mfg Requirement that is to be assigned to DCP/DCC:
Requirement): Boolean
Arguments
| Name |
Input / Output |
Required? |
Type |
i_ ObjWI |
Input |
Yes |
ProdSystemOccurrence |
listOfCR_ToAssociateWithWI |
Input |
Yes |
List |
ReturnTypeBoolean: status of this function
execution - if succeeded(True) or not(False)
Example
//~~~~~~~~
//Input: i_ ObjWI (ProdSystemOccurrence) => selcted Work Instruction Object
//~~~~~~~~
//----------
// Variable declarations
//----------
let listOfCR_ToAssociateWithWI(List)
Let bRc_SetAssociated(Boolean)
bRc_SetAssociated = False
.....
if( listOfCR_ToAssociateWithWI.Size() > 0 )
{
bRc_SetAssociated = i_ObjWI->SetCapableResourcesAssociatedWithInstruction(listOfCR_ToAssociateWithWI)
Notify("\t Status of bRc_SetAssociated after SetCapableResourcesAssociatedWithInstruction = [#]", bRc_SetAssociated)
}
ProdSystemOccurrence.GetCapableResourcesAssociatedWithInstruction
Get the list of Capable Resources Associated with Selected Instruction
SignatureProdSystemOccurrence->GetCapableResourcesAssociatedWithInstruction
(): List
Arguments
| Name |
Input / Output |
Required? |
Type |
i_ ObjWI |
Input |
Yes |
ProdSystemOccurrence |
listOfCR_GetItemsFromWI |
Output |
Yes |
List |
ReturnTypeList: List of Items Associated
with Selected Instruction
Example
//~~~~~~~~
//Input: i_ ObjWI (ProdSystemOccurrence) => selcted Work Instruction Object
//~~~~~~~~
//----------
// Variable declarations
//----------
let listOfCR_GetItemsFromWI(List)
listOfCR_GetItemsFromWI = i_ObjWI-> GetCapableResourcesAssociatedWithInstruction ()
….
if( listOfCR_GetItemsFromWI.Size() > 0 )
{
Notify("\t Num Items associated to Selected Work Instruction = [#]", listOfCR_GetItemsFromWI.Size())
}
else
{
Notify("\t - No Items associated to Selected Work Instruction")
}
ProdSystemOccurrence.RemoveAssociationBetweenInstructionAndCapableResources
Remove the list of Capable Resources Associated from the Selected
Instruction
SignatureProdSystemOccurrence->RemoveAssociationBetweenInstructionAndCapableResources
(i_oListOfCapableResources: List): Boolean
Arguments
| Name |
Input / Output |
Required? |
Type |
i_ ObjWI |
Input |
Yes |
ProdSystemOccurrence |
listOfCR_ToRemoveAssociationFromWI |
Input |
Yes |
List |
ReturnTypeBoolean: status of this function
execution - if succeeded(True) or not(False)
Example
//~~~~~~~~
//Input: i_ ObjWI (ProdSystemOccurrence) => selcted Work Instruction Object
//~~~~~~~~
//----------
// Variable declarations
//----------
Let listOfCR_ToRemoveAssociationFromWI(List)
Let bRc_RemoveAssociated(Boolean)
bRc_RemoveAssociated = False
if( listOfCR_ToRemoveAssociationFromWI.Size() > 0 )
{
bRc_RemoveAssociated = i_ObjWI->RemoveAssociationBetweenInstructionAndCapableResources(listOfCR_ToRemoveAssociationFromWI)
Notify("Status of bRc_RemoveAssociated after RemoveAssociationBetweenInstructionAndCapableResources = [#]", bRc_RemoveAssociated)
}
ProdSystemOccurrence.GetItemSubComponents
Get the list of sub-components defined under given operation.
SignatureProdSystemOccurrence->GetItemSubComponents
(i_ProdSystemOccurrence: ProdSystemOccurrence, o_ListOfItems: out List):
Integer
Arguments
| Name |
Input / Output |
Required? |
Type |
Comment |
i_objOperation |
Input |
Yes |
List (of Operation) |
The Sub Component Item are defined under an operation scope. This is the
input operation under which the Item SubComponent exist |
io_listOfItems |
Input |
Yes |
Integer |
The list of Items that were defined as sub-components |
ReturnTypeInteger: Integer return code: 0
on success, -1 for One or more arguments are not valid, -2 on failure.
Example
//~~~~~~~~~~~
// Input – to be provided for EKL Script Run.
//~~~~~~~~~~~
// input i_objOperation(ProdSystemOccurrence) :
// Workplan, System or Operation provided by User Input in EKL-UI
// and also Operation under which the Sub-Component relation are to be queried
//~~~~~~~~~~~
// Short Description:
// Get the list of sub-components defined under given operation
//~~~~~~~~~~~
//----------
// Variable declarations
//----------
let listOfItems(List)
let iNum_Items (Integer)
let iCount_Items (Integer)
let iReturnCode (Integer)
//----------
// Execution - Main Body
//----------
if( i_objOperation<> NULL )
{
iReturnCode = i_objOperation.GetItemSubComponents(
i_objOperation, listOfItems)
Notify("Return code from GetItemSubComponents = iReturnCode = [#]", iReturnCode)
iNum_Items = listOfItems.Size()
//--- listing the items
Notify("Number of Items ="+iNum_Items)
iCount_Items = 1
for iCount_Items while iCount_Items <= iNum_Items
{
Notify(" [#] Name = [#]", iCount_Items, listOfItems[iCount_Items])
}
}
ProdSystemOccurrence.CreateItemSubComponents
Create Item sub-components.
SignatureProdSystemOccurrence->CreateItemSubComponents (
i_objOperation, i_listOfItems, io_listOfSubComponentizationStatus) :
Integer
Arguments
| Name |
Input / Output |
Required? |
Type |
Comment |
i_objOperation |
Input |
Yes |
ProdSystemOccurrence |
The Sub Component Item are defined under an operation scope. This is the
input operation under which the Item SubComponent exist |
i_listOfItems |
Input |
Yes |
List (of Items) |
The list of Item that are to be defined as
sub-components Pre-requisite for sub-component creation (1) The
input item must not be a pre-existing sub-component (2) The input item
must be a leaf-level item. (it cannot be an intermediate node in the MBOM
structure.) (3) The input item must at least have one sibling that is not
a sub-component. This is to enable the availability of graphics for the
parent-item assembly through graphics of at least one item. NOTE: All the
inputs must meet the above conditions. Even if one of the input components
doesn't meet the above-mentioned pre-requisites, the API returns a fail status
without any action. This API follows an all-or-nothing approach. |
io_listOfSubComponentizationStatus |
Output |
Yes |
List (of Integer) |
Status for sub-componentization per each input item |
ReturnTypeInteger: Integer return code: 0
on success, 1 The inputs do not meet the above mentioned pre-requisites, -1 on
failure.
Example
//~~~~~~~~~~~
// Input – to be provided for EKL Script Run.
//~~~~~~~~~~~
// input i_objOperation(ProdSystemOccurrence) :
// Workplan, System or Operation provided by User Input in EKL-UI
// and also Operation under which the Sub-Component relation would be created
// input i_objItem_1 (MfgProcessOccurrence) :
// The first item which must be made as sub-component
// input i_objItem_2 (MfgProcessOccurrence) :
// The second item which must be made as sub-component
//~~~~~~~~~~~
// Short Description:
// Create Item sub-components
//~~~~~~~~~~~
//----------
// Variable declarations
//----------
Let listOfItems (List)
Let iNum_Items (Integer)
Let iCount_Items (Integer)
Let iReturnCode (Integer)
Let listOfSubComponentizationStatus(List)
//----------
// Execution - Main Body
//----------
if( i_objOperation<> NULL AND i_objItem_1<> NULL AND i_objItem_2<> NULL)
{
listOfItems.Append(i_objItem_1)
listOfItems.Append(i_objItem_2)
iReturnCode = i_objOperation.CreateItemSubComponents (
i_objOperation, listOfItems, listOfSubComponentizationStatus)
Notify("Return code from CreateItemSubComponents = iReturnCode = [#]", iReturnCode)
iNum_Items = listOfItems.Size()
//--- listing the status
Notify("Number of Items ="+iNum_Items)
iCount_Items = 1
for iCount_Items while iCount_Items <= iNum_Items
{
Notify(" [#] Status of Creation = [#]", iCount_Items, listOfSubComponentizationStatus [iCount_Items])
}
}
ProdSystemOccurrence.RemoveItemSubComponents
Removes Item sub-components.
SignatureProdSystemOccurrence->RemoveItemSubComponents (
i_objOperation, i_listOfItems, io_listOfRemoveSubComponentiStatus) :
Integer
Arguments
| Name |
Input / Output |
Required? |
Type |
Comment |
i_objOperation |
Input |
Yes |
List (of Operations) |
The Sub Component Item are defined under an operation scope. This is the
input operation under which the Item SubComponent exist |
i_listOfItems |
Input |
Yes |
Integer |
The list of Item that are to be defined as
sub-components Pre-requisite for sub-component deletion (1) The
input item must be a pre-existing sub-component NOTE: All the inputs must
meet the above conditions. Even if one of the input components doesn't meet the
above-mentioned pre-requisites, the API returns a fail status without any
action |
io_listOfSubComponentizationStatus |
Input |
Yes |
Integer |
Status for removal of sub-component per each input item |
ReturnTypeInteger: Integer return code: 0
on success, 1 The inputs do not meet the above mentioned pre-requisites, -1 on
failure.
Example
//~~~~~~~~~~~
// Input – to be provided for EKL Script Run.
//~~~~~~~~~~~
// input i_objOperation(ProdSystemOccurrence) :
// Workplan, System or Operation provided by User Input in EKL-UI
// and also Operation under which the Sub-Component relation would be created
// input i_objItem_1 (MfgProcessOccurrence) :
// The first item which must be made as sub-component
// input i_objItem_2 (MfgProcessOccurrence) :
// The second item which must be made as sub-component
//~~~~~~~~~~~
// Short Description:
// Remove Item sub-components
//~~~~~~~~~~~
//----------
// Variable declarations
//----------
Let listOfItems (List)
Let iNum_Items (Integer)
Let iCount_Items (Integer)
Let iReturnCode (Integer)
Let listOfRemoveSubComponentStatus (List)
//----------
// Execution - Main Body
//----------
if( i_objOperation<> NULL AND i_objItem_1<> NULL AND i_objItem_2<> NULL)
{
listOfItems.Append(i_objItem_1)
listOfItems.Append(i_objItem_2)
iReturnCode = i_objOperation.RemoveItemSubComponents (
i_objOperation, listOfItems, listOfRemoveSubComponentStatus)
Notify("Return code from RemoveItemSubComponents = iReturnCode = [#]", iReturnCode)
iNum_Items = listOfItems.Size()
//--- listing the status
Notify("Number of Items ="+iNum_Items)
iCount_Items = 1
for iCount_Items while iCount_Items <= iNum_Items
{
Notify(" [#] Status of Removal = [#]", iCount_Items, listOfRemoveSubComponentStatus [iCount_Items])
}
}
ProdSystemOccurrence.CreateItemSubComponentsEx
Create Item sub-components with ValidityStatusOfAllInputCandidates.
SignatureProdSystemOccurrence->CreateItemSubComponentsEx (
i_objOperation, i_listOfItems, io_listOfSubComponentizationStatus) : Integer
Arguments
| Name |
Input / Output |
Required? |
Type |
Comment |
i_objOperation |
Input |
Yes |
ProdSystemOccurrence |
The Sub Component Item are defined under an operation scope. This is the
input operation under which the Item SubComponent exist |
i_listOfItems |
Input |
Yes |
List (of Items) |
The list of Item that are to be defined as
sub-components Pre-requisite for sub-component creation (1) The
input item must not be a pre-existing sub-component (2) The input item
must be a leaf-level item. (it cannot be an intermediate node in the MBOM
structure.) (3) The input item must at least have one sibling that is not
a sub-component. This is to enable the availability of graphics for the
parent-item assembly through graphics of at least one item. NOTE: All the
inputs must meet the above conditions. Even if one of the input components
doesn't meet the above-mentioned pre-requisites, the API returns a fail status
without any action. This API follows an all-or-nothing approach. |
io_listOfSubComponentizationStatus |
Output |
Yes |
List (of Integer) |
Status for sub-componentization per each input item |
i_bGetValidityStatusOfAllInputCandidates |
Input |
Yes |
Boolean |
The validity status of removal of all input Resources will be listed in
io_listOfSubComponentizationStatus |
ReturnTypeInteger: Integer return code: 0
on success, 1 The inputs do not meet the above mentioned pre-requisites, -1 on
failure.
Example
//~~~~~~~~~~~
// Input – to be provided for EKL Script Run.
//~~~~~~~~~~~
// input i_objOperation(ProdSystemOccurrence) :
// Workplan, System or Operation provided by User Input in EKL-UI
// and also Operation under which the Sub-Component relation would be created
// input i_objItem_1 (MfgProcessOccurrence) :
// The first item which must be made as sub-component
// input i_objItem_2 (MfgProcessOccurrence) :
// The second item which must be made as sub-component
//~~~~~~~~~~~
// Short Description:
// Create Item sub-components
//~~~~~~~~~~~
//----------
// Variable declarations
//----------
Let listOfItems (List)
Let iNum_Items (Integer)
Let iCount_Items (Integer)
Let iReturnCode (Integer)
Let listOfSubComponentizationStatus(List)
Let i_bGetValidityStatusOfAllInputCandidates (Boolean)
//----------
// Execution - Main Body
//----------
if( i_objOperation<> NULL AND i_objItem_1<> NULL AND i_objItem_2<> NULL)
{
listOfItems.Append(i_objItem_1)
listOfItems.Append(i_objItem_2)
i_bGetValidityStatusOfAllInputCandidates=TRUE
iReturnCode = i_objOperation.CreateItemSubComponentsEx (
i_objOperation, listOfItems, listOfSubComponentizationStatus, i_bGetValidityStatusOfAllInputCandidates)
Notify("Return code from CreateItemSubComponents = iReturnCode = [#]", iReturnCode)
iNum_Items = listOfItems.Size()
//--- listing the status
Notify("Number of Items ="+iNum_Items)
iCount_Items = 1
for iCount_Items while iCount_Items <= iNum_Items
{
Notify(" [#] Status of Creation = [#]", iCount_Items, listOfSubComponentizationStatus [iCount_Items])
}
}
ProdSystemOccurrence.RemoveItemSubComponentsEx
Removes Item sub-components with ValidityStatusOfAllInputCandidates
SignatureProdSystemOccurrence->RemoveItemSubComponentsEx (
i_objOperation, i_listOfItems, io_listOfRemoveSubComponentiStatus) : Integer
Arguments
| Name |
Input / Output |
Required? |
Type |
Comment |
i_objOperation |
Input |
Yes |
List (of Operation) |
The Sub Component Item are defined under an operation scope. This is the
input operation under which the Item SubComponent exist |
i_listOfItems |
Input |
Yes |
Integer |
The list of Item that are to be defined as
sub-components Pre-requisite for sub-component deletion (1) The
input item must be a pre-existing sub-component NOTE: All the inputs must
meet the above conditions. Even if one of the input components doesn't meet the
above-mentioned pre-requisites, the API returns a fail status without any
action. |
io_listOfRemoveSubComponentStatus |
Input |
Yes |
Integer |
Status for removal of sub-component per each input item |
i_bGetValidityStatusOfAllInputCandidates |
Input |
Yes |
Boolean |
The validity status of removal of all input Resources will be listed in
io_listOfSubComponentizationStatus |
ReturnTypeInteger: Integer return code: 0
on success, 1 The inputs do not meet the above mentioned pre-requisites, -1 on
failure.
Example
//~~~~~~~~~~~
// Input – to be provided for EKL Script Run.
//~~~~~~~~~~~
// input i_objOperation(ProdSystemOccurrence) :
// Workplan, System or Operation provided by User Input in EKL-UI
// and also Operation under which the Sub-Component relation would be created
// input i_objItem_1 (MfgProcessOccurrence) :
// The first item which must be made as sub-component
// input i_objItem_2 (MfgProcessOccurrence) :
// The second item which must be made as sub-component
//~~~~~~~~~~~
// Short Description:
// Remove Item sub-components
//~~~~~~~~~~~
//----------
// Variable declarations
//----------
Let listOfItems (List)
Let iNum_Items (Integer)
Let iCount_Items (Integer)
Let iReturnCode (Integer)
Let listOfRemoveSubComponentStatus (List)
Let i_bGetValidityStatusOfAllInputCandidates (Boolean)
//----------
// Execution - Main Body
//----------
if( i_objOperation<> NULL AND i_objItem_1<> NULL AND i_objItem_2<> NULL)
{
listOfItems.Append(i_objItem_1)
listOfItems.Append(i_objItem_2)
i_bGetValidityStatusOfAllInputCandidates=TRUE
iReturnCode = i_objOperation.RemoveItemSubComponentsEx (
i_objOperation, listOfItems, listOfRemoveSubComponentStatus, i_bGetValidityStatusOfAllInputCandidates)
Notify("Return code from RemoveItemSubComponents = iReturnCode = [#]", iReturnCode)
iNum_Items = listOfItems.Size()
//--- listing the status
Notify("Number of Items ="+iNum_Items)
iCount_Items = 1
for iCount_Items while iCount_Items <= iNum_Items
{
Notify(" [#] Status of Removal = [#]", iCount_Items, listOfRemoveSubComponentStatus [iCount_Items])
}
}
ProdSystemOccurrence.GetResourceSubComponents
Get the list of Resource-sub-components defined under given operation.
SignatureProdSystemOccurrence->GetResourceSubComponents(i_objWSHo,
io_listOfResources) : Integer
Arguments
| Name |
Input / Output |
Required? |
Type |
Comment |
i_objWSHo |
Input |
Yes |
ProdSystemOccurrence |
The Resource-sub-components are defined under a Workplan or System or
Header-Operation scope. This is the input Workplan or System or Header-Operation
under which the Resource-sub-component exist. |
io_listOfResources |
Output |
Yes |
List (of strings) |
The Resource-sub-components that were defined under the input Workplan or
System or Header-Operation. |
ReturnTypeInteger: Integer return code: 0
on success, -1 for One or more arguments are not valid, -2 on failure.
Example
//~~~~~~~~~~~
// Input – to be provided for EKL Script Run.
//~~~~~~~~~~~
// input i_objWSHo(ProdSystemOccurrence) :
// Workplan, System or Operation provided by User Input in EKL-UI
// and also Workplan or System or Header-Operation under which the Resource-Sub-Components are to be queried
//~~~~~~~~~~~
// Short Description:
// Get the list of Resource-sub-components defined under given operation
//~~~~~~~~~~~
//----------
// Variable declarations
//----------
Let io_listOfResources (List)
Let iNum_Resources (Integer)
Let iCount_Resources (Integer)
Let iReturnCode (Integer)
//----------
// Execution - Main Body
//----------
if( i_objWSHo<> NULL )
{
iReturnCode = i_objWSHo.GetResourceSubComponents(
i_objWSHo, io_listOfResources)
Notify("Return code from GetResourceSubComponents = iReturnCode = [#]", iReturnCode)
iNum_Resources = io_listOfResources.Size()
//--- listing the resource-sub-components
Notify("Number of Resources ="+iNum_Resources)
iCount_Resources = 1
for iCount_Resources while iCount_Resources <= iNum_Resources
{
Notify(" [#] Name = [#]", iCount_Resources, io_listOfResources[iCount_Resources])
}
}
ProdSystemOccurrence.CreateResourceSubComponents
Create Resource Sub-Components.
SignatureProdSystemOccurrence->CreateResourceSubComponents (
i_objWSHo, i_listOfResources, io_listOfSubComponentizationStatus) : Integer
Arguments
| Name |
Input / Output |
Required? |
Type |
Comment |
i_objWSHo |
Input |
Yes |
ProdSystemOccurrence |
The Resource-sub-components are defined under a Workplan or System or
Header-Operation scope. This is the input Workplan or System or Header-Operation
under which the Resource-sub-component exist. |
io_listOfResources |
Input |
Yes |
List (of Resources) |
The list of resources that are to be defined as sub-components
Pre-requisite for sub-component creation
(1) The input resource must not be a pre-existing sub-component
(2) The input resource must at least have one sibling that is not a
sub-component. This is to enable the availability of graphics for the
parent-resource assembly through the graphics of at least one resource.
NOTE: All the inputs must meet the above conditions. Even if one of the input
components doesn't meet the above-mentioned pre-requisites, the API returns a
fail status without any action.
This API follows an all-or-nothing approach.
|
io_listOfSubComponentizationStatus |
Output |
Yes |
List (of strings) |
Status for sub-componentization per each input Resource |
i_bGetValidityStatusOfAllInputCandidates |
Input |
Yes |
Boolean |
The validity status of removal of all input Resources will be listed in io_
listOfSubComponentizationStatus |
ReturnTypeInteger: Integer return code: 0
on success, 1 The inputs do not meet the above mentioned pre-requisites, -1 on
failure.
Example
//~~~~~~~~~~~
// Input – to be provided for EKL Script Run.
//~~~~~~~~~~~
// input i_objWSHo(ProdSystemOccurrence) :
// Workplan, System or Operation provided by User Input in EKL-UI
// and also Workplan or System or Header-Operation under which the Sub-Component relation would be created
// input i_objResource_1 (ProductOccurrence) :
// The first resource which must be made as sub-component
// input i_objResource_2 (ProductOccurrence) :
// The second resource which must be made as sub-component
//~~~~~~~~~~~
// Short Description:
// Create Resource Sub-Components
//~~~~~~~~~~~
//----------
// Variable declarations
//----------
Let i_listOfResources (List)
Let iNum_Resources (Integer)
Let iCount_Resources (Integer)
Let iReturnCode (Integer)
Let io_listOfSubComponentizationStatus(List)
Let i_bGetValidityStatusOfAllInputCandidates (Boolean)
//----------
// Execution - Main Body
//----------
if( i_objWSHo<> NULL AND i_objResource_1<> NULL AND i_objResource_1<> NULL)
{
i_listOfResources.Append(i_objResource_1)
i_listOfResources.Append(i_objResource_2)
i_bGetValidityStatusOfAllInputCandidates = FALSE
iReturnCode = i_objWSHo.CreateResourceSubComponents (
i_objWSHo, i_listOfResources, io_listOfSubComponentizationStatus, i_bGetValidityStatusOfAllInputCandidates)
Notify("Return code from CreateResourceSubComponents = iReturnCode = [#]", iReturnCode)
iNum_Resources = i_listOfResources.Size()
//--- listing the status
Notify("Number of Resources ="+iNum_Resources)
iCount_Resources = 1
for iCount_Resources while iCount_Resources <= iNum_Resources
{
Notify(" [#] Status of Creation = [#]", iCount_Resources, io_listOfSubComponentizationStatus[iCount_Resources])
}
}
ProdSystemOccurrence.RemoveResourceSubComponents
Removes Resource Sub-Components.
SignatureProdSystemOccurrence->
RemoveResourceSubComponents ( i_objWSHo, i_listOfResources,
io_listOfRemoveSubComponentStatus): Integer
Arguments
| Name |
Input / Output |
Required? |
Type |
Comment |
i_objWSHo |
Input |
Yes |
List (of Operation) |
The Resource-sub-components are defined under a Workplan or System or
Header-Operation scope. This is the input Workplan or System or Header-Operation
under which the Resource-sub-component exist. |
io_listOfResources |
Input |
Yes |
List (of Resources) |
The list of resources that are to be defined as
sub-components Pre-requisite for sub-component deletion (1) The
input resource must be a pre-existing sub-component NOTE: All the inputs
must meet the above conditions. Even if one of the input components doesn't meet
the above-mentioned pre-requisites, the API returns a fail status without any
action. |
io_listOfSubComponentizationStatus |
Input |
Yes |
List (of strings) |
Status for removal of Resource-sub-component per each input |
i_bGetValidityStatusOfAllInputCandidates |
Input |
Yes |
Boolean |
The validity status of removal of all input Resources will be listed in
io_listOfRemoveSubComponentStatus |
ReturnTypeInteger: Integer return code: 0
on success, 1 The inputs do not meet the above mentioned pre-requisites, -1 on
failure.
Example
//~~~~~~~~~~~
// Input – to be provided for EKL Script Run.
//~~~~~~~~~~~
// input i_objWSHo(ProdSystemOccurrence) :
// Workplan, System or Operation provided by User Input in EKL-UI
// and also Workplan or System or Header-Operation under which the Sub-Component relation would be created
// input i_objResource_1 (ProductOccurrence) :
// The first resource which must be made as sub-component
// input i_objResource_2 (ProductOccurrence) :
// The second resource which must be made as sub-component
//~~~~~~~~~~~
// Short Description:
// Remove Resource Sub-Components
//~~~~~~~~~~~
//----------
// Variable declarations
//----------
Let i_listOfResources (List)
Let iNum_Resources (Integer)
Let iCount_Resources (Integer)
Let iReturnCode (Integer)
Let io_listOfRemoveSubComponentStatus (List)
Let i_bGetValidityStatusOfAllInputCandidates (Boolean)
//----------
// Execution - Main Body
//----------
if( i_objWSHo<> NULL AND i_objResource_1<> NULL AND i_objResource_1<> NULL)
{
i_listOfResources.Append(i_objResource_1)
i_listOfResources.Append(i_objResource_2)
i_bGetValidityStatusOfAllInputCandidates = FALSE
iReturnCode = i_objWSHo.RemoveResourceSubComponents (
i_objWSHo, i_listOfResources, io_listOfRemoveSubComponentStatus, i_bGetValidityStatusOfAllInputCandidates)
Notify("Return code from RemoveResourceSubComponents = iReturnCode = [#]", iReturnCode)
iNum_Resources = i_listOfResources.Size()
//--- listing the status
Notify("Number of Resources ="+iNum_Resources)
iCount_Resources = 1
for iCount_Resources while iCount_Resources <= iNum_Resources
{
Notify(" [#] Status of Removal = [#]", iCount_Resources, io_listOfRemoveSubComponentStatus [iCount_Resources])
}
}
ProdSystemOccurrence.CreateResourceSubComponentsEx
Create Resource Sub-Components with ValidityStatusOfAllInputCandidates.
SignatureProdSystemOccurrence->CreateResourceSubComponentsEx (
i_objWSHo, i_listOfResources, io_listOfSubComponentizationStatus) : Integer
Arguments
| Name |
Input / Output |
Required? |
Type |
Comment |
i_objWSHo |
Input |
Yes |
ProdSystemOccurrence |
The Resource-sub-components are defined under a Workplan or System or
Header-Operation scope. This is the input Workplan or System or Header-Operation
under which the Resource-sub-component exist. |
io_listOfResources |
Input |
Yes |
List (of Resources) |
The list of resources that are to be defined as
sub-components Pre-requisite for sub-component creation (1) The
input resource must not be a pre-existing sub-component (2) The input
resource must at least have one sibling that is not a sub-component. This is to
enable the availability of graphics for the parent-resource assembly through the
graphics of at least one resource. NOTE: All the inputs must meet the
above conditions. Even if one of the input components doesn't meet the
above-mentioned pre-requisites, the API returns a fail status without any
action. This API follows an all-or-nothing approach. |
io_listOfSubComponentizationStatus |
Output |
Yes |
List (of strings) |
Status for sub-componentization per each input Resource |
i_bGetValidityStatusOfAllInputCandidates |
Input |
Yes |
Boolean |
The validity status of removal of all input Resources will be listed in
io_listOfSubComponentizationStatus |
ReturnTypeInteger: Integer return code: 0
on success, 1 The inputs do not meet the above mentioned pre-requisites, -1 on
failure.
Example
//~~~~~~~~~~~
// Input – to be provided for EKL Script Run.
//~~~~~~~~~~~
// input i_objWSHo(ProdSystemOccurrence) :
// Workplan, System or Operation provided by User Input in EKL-UI
// and also Workplan or System or Header-Operation under which the Sub-Component relation would be created
// input i_objResource_1 (ProductOccurrence) :
// The first resource which must be made as sub-component
// input i_objResource_2 (ProductOccurrence) :
// The second resource which must be made as sub-component
//~~~~~~~~~~~
// Short Description:
// Create Resource Sub-Components
//~~~~~~~~~~~
//----------
// Variable declarations
//----------
Let i_listOfResources (List)
Let iNum_Resources (Integer)
Let iCount_Resources (Integer)
Let iReturnCode (Integer)
Let io_listOfSubComponentizationStatus(List)
Let i_bGetValidityStatusOfAllInputCandidates (Boolean)
//----------
// Execution - Main Body
//----------
if( i_objWSHo<> NULL AND i_objResource_1<> NULL AND i_objResource_1<> NULL)
{
i_listOfResources.Append(i_objResource_1)
i_listOfResources.Append(i_objResource_2)
i_bGetValidityStatusOfAllInputCandidates = TRUE
iReturnCode = i_objWSHo.CreateResourceSubComponentsEx (
i_objWSHo, i_listOfResources, io_listOfSubComponentizationStatus, i_bGetValidityStatusOfAllInputCandidates)
Notify("Return code from CreateResourceSubComponents = iReturnCode = [#]", iReturnCode)
iNum_Resources = i_listOfResources.Size()
//--- listing the status
Notify("Number of Resources ="+iNum_Resources)
iCount_Resources = 1
for iCount_Resources while iCount_Resources <= iNum_Resources
{
Notify(" [#] Status of Creation = [#]", iCount_Resources, io_listOfSubComponentizationStatus[iCount_Resources])
}
}
ProdSystemOccurrence.RemoveResourceSubComponentsEx
Removes Resource Sub-Components with
ValidityStatusOfAllInputCandidates.
SignatureProdSystemOccurrence->
RemoveResourceSubComponentsEx ( i_objWSHo, i_listOfResources,
io_listOfRemoveSubComponentStatus): Integer
Arguments
| Name |
Input / Output |
Required? |
Type |
Comment |
i_objWSHo |
Input |
Yes |
List (of Operation) |
The Resource-sub-components are defined under a Workplan or System or
Header-Operation scope. This is the input Workplan or System or Header-Operation
under which the Resource-sub-component exist. |
io_listOfResources |
Input |
Yes |
List (of Resources) |
The list of resources that are to be defined as
sub-components Pre-requisite for sub-component deletion (1) The
input resource must be a pre-existing sub-component NOTE: All the inputs
must meet the above conditions. Even if one of the input components doesn't meet
the above-mentioned pre-requisites, the API returns a fail status without any
action. |
io_listOfRemoveSubComponentStatus |
Input |
Yes |
List (of strings) |
Status for removal of Resource-sub-component per each input. |
i_bGetValidityStatusOfAllInputCandidates |
Input |
Yes |
Boolean |
The validity status of removal of all input Resources will be listed in
io_listOfRemoveSubComponentStatus |
ReturnTypeInteger: Integer return code: 0
on success, 1 The inputs do not meet the above mentioned pre-requisites, -1 on
failure.
Example
//~~~~~~~~~~~
// Input – to be provided for EKL Script Run.
//~~~~~~~~~~~
// input i_objWSHo(ProdSystemOccurrence) :
// Workplan, System or Operation provided by User Input in EKL-UI
// and also Workplan or System or Header-Operation under which the Sub-Component relation would be created
// input i_objResource_1 (ProductOccurrence) :
// The first resource which must be made as sub-component
// input i_objResource_2 (ProductOccurrence) :
// The second resource which must be made as sub-component
//~~~~~~~~~~~
// Short Description:
// Remove Resource Sub-Components
//~~~~~~~~~~~
//----------
// Variable declarations
//----------
Let i_listOfResources (List)
Let iNum_Resources (Integer)
Let iCount_Resources (Integer)
Let iReturnCode (Integer)
Let io_listOfRemoveSubComponentStatus (List)
Let i_bGetValidityStatusOfAllInputCandidates (Boolean)
//----------
// Execution - Main Body
//----------
if( i_objWSHo<> NULL AND i_objResource_1<> NULL AND i_objResource_1<> NULL)
{
i_listOfResources.Append(i_objResource_1)
i_listOfResources.Append(i_objResource_2)
i_bGetValidityStatusOfAllInputCandidates = TRUE
iReturnCode = i_objWSHo.RemoveResourceSubComponentsExS (
i_objWSHo, i_listOfResources, io_listOfRemoveSubComponentStatus, i_bGetValidityStatusOfAllInputCandidates)
Notify("Return code from RemoveResourceSubComponents = iReturnCode = [#]", iReturnCode)
iNum_Resources = i_listOfResources.Size()
//--- listing the status
Notify("Number of Resources ="+iNum_Resources)
iCount_Resources = 1
for iCount_Resources while iCount_Resources <= iNum_Resources
{
Notify(" [#] Status of Removal = [#]", iCount_Resources, io_listOfRemoveSubComponentStatus [iCount_Resources])
}
}
ProdSystemOccurrence.InsertExistingWorkInstructionAsCopy
Inserts existing work instruction as copy. This API is supported for the following
types of work instructions: Textual Instruction, Alert, Alert Caution, Alert Note, Alert
Warning & Signoff.
SignatureProdSystemOccurrence.
InsertExistingWorkInstructionAsCopy (i_WIObject): ProdSystemOccurrence
Arguments
| Name |
Input / Output |
Required? |
Type |
Comment |
i_WIObject |
Input |
Yes |
DELWkiInstructionReference
DELWkiAlertReference
DELWkiAlertCautionReference
DELWkiAlertNoteReference
DELWkiAlertWarningReference
DELWkiSignOffReference
|
The work instruction reference which needs to be inserted as copy. |
Example
//---
//i_occOperation(ProdSystemOccurrence) //[Operation,Provided by user selection]
// i_referenceInstruction_1(DELWkiInstructionReference) //[Instruction,Provided by user selection]
//---
// Short Description: InstructionText existing in Op1. It is used for creating instance in Op2
//---
let objNewWIInsertedAsCopy_Inst (DELWkiInstructionInstance)
let objNewWIInsertedAsCopy_Ref (DELWkiInstructionReference)
let result (ProdSystemOccurrence)
if( i_occOperation <> NULL AND i_referenceInstruction_1 <> NULL)
{
//result= i_occOperation.InsertExistingWorkInstruction(i_referenceAlert_1)
result= i_occOperation.InsertExistingWorkInstructionAsCopy(i_referenceInstruction_1)
set objNewWIInsertedAsCopy_Ref = result.Reference
set objNewWIInsertedAsCopy_Inst = result.Instance
If( objNewWIInsertedAsCopy_Ref <> NULL)
{
Notify("Success in getting Instruction Reference")
}
If( objNewWIInsertedAsCopy_Inst <> NULL)
{
Notify("Success in getting Instruction Instance")
}
}
|