EnsFilter.GetExtensionDefinition()
Lets you get the extension definition of an ens filter (if any).
SignatureEnsFilter.GetExtensionDefinition(ExtensionDefinitionExist : Boolean, ListOfPLMParts : List) : Boolean
Arguments
Name | Input / Output | Required? | Type | Comment |
ExtensionDefinitionExist | Out | Yes | Boolean | TRUE if the extension definition exists i.e. an ens filter is defined "ByExtension". FALSE if the extension definition does not exist i.e. for an ens filter defined "ByComprehension" meaning through units filtering expressions. |
ListOfPLMParts | Out | Yes | List | Extension definition if the extension definition exists. |
Examplelet pEnsFilter (EnsFilter)
let bEnsFilterExtensionDefinitionExists (Boolean)
let EnsFilterByExtensionPLMParts (List)
let NbEnsFilterByExtensionPLMParts (Integer)
let pEnsFilterByExtensionPLMPart (PLMCoreReference)
let res (Boolean)
let j (Integer)
res=false
…
res = pEnsFilter-> GetExtensionDefinition(bEnsFilterExtensionDefinitionExists, EnsFilterByExtensionPLMParts)
Trace(1,"Extension definition : bEnsFilterExtensionDefinitionExists = ", bEnsFilterExtensionDefinitionExists)
NbEnsFilterByExtensionPLMParts = EnsFilterByExtensionPLMParts.Size()
j = 1
for j while j <= NbEnsFilterByExtensionPLMParts
{
set pEnsFilterByExtensionPLMPart = EnsFilterByExtensionPLMParts.GetItem(j)
if (NULL <> pEnsFilterByExtensionPLMPart)
{
….
}
}
EnsFilter.GetFilterUnits()
Lets you get filter units for an ens filter.
SignatureEnsFilter.GetFilterUnits(ListOfEnsParameterDefinitions : List, ListOfEnsFilterUnits : List) : Boolean
Arguments
Name | Input / Output | Required? | Type | Comment |
ListOfEnsParameterDefinitions | Out | Yes | List | common list of parameters used in the various filter units of the ens filter. |
ListOfEnsFilterUnits | Out | Yes | List | Filter units of the ens filter. |
Examplelet pEnsFilter (EnsFilter)
let EnsFilterParameterDescriptors (List)
let pEnsFilterParameterDescriptor (EnsParameterDescriptor)
let NbEnsFilterParameterDescriptors (Integer)
let EnsFilterUnits (List)
let pEnsFilterUnit (EnsFilterUnit)
let NbEnsFilterUnits (Integer)
let res (Boolean)
let i (Integer)
let j (Integer)
res=false
…
res = pEnsFilter->GetFilterUnits(EnsFilterParameterDescriptors, EnsFilterUnits)
NbEnsFilterParameterDescriptors = EnsFilterParameterDescriptors.Size()
i = 1
for i while i <= NbEnsFilterParameterDescriptors
{
set pEnsFilterParameterDescriptor = EnsFilterParameterDescriptors.GetItem(i)
if (NULL <> pEnsFilterParameterDescriptor)
{ …. }
}
j = 1
for j while j <= NbEnsFilterUnits
{
set pEnsFilterUnit = EnsFilterUnits.GetItem(j)
if (NULL <> pEnsFilterUnit)
{ …. }
}
EnsSpecification.OpenSpecificationContent()
Lets you open the content of an Engineering Specification. This function is used in case that the content of the specification has not been loaded.
SignatureEnsSpecification.OpenSpecificationContent(SearchedType : String, ListOfContent : List) : Boolean
Example/* Declarations */
let pEnsSpecObj (PipSpecification)
let pEnsTechnoTable (EnsTechnologicalTable)
let EnsSpecTechnoTableObjects(List)
let NbEnsSpecTechnoTableObjects (Integer)
let res1 (Boolean)
let res2 (Boolean)
let res3 (Boolean)
let i (Integer)
/* Access to ens spec as a resource (only the ens spec is open, not yet its content */
pEnsSpecObj = AccessResource("PipingSpecificationResource|DefaultPipingEngineeringSpecification",
"PipSpecification") /* string ARMPath, string Type */
/* Open specification content */
if (pEnsSpecObj <> NULL)
{
res1 = pEnsSpecObj->OpenSpecificationContent()
}
/* Retrieve for example ens technological tables under the ens specification */
/* Get ens specification content in term of ens technological tables */
if (pEnsSpecObj <> NULL)
{
res2 = pEnsSpecObj->GetSpecificationContent("EnsTechnologicalTable",EnsSpecTechnoTableObjects)
NbEnsSpecTechnoTableObjects = EnsSpecTechnoTableObjects.Size()
Trace(1,"Eng Spec Open Rule : GetSpecificationContent : NbEnsSpecTechnoTableObjects = ", NbEnsSpecTechnoTableObjects)
}
i = 1
if (0 < NbEnsSpecTechnoTableObjects)
{
for i while i <= NbEnsSpecTechnoTableObjects
{
set ContentObject = EnsSpecTechnoTableObjects.GetItem(i)
if (NULL <> ContentObject)
{
/* Access to ens table name */
sContentObjectName = ContentObject.V_Name /* Title */
Trace(1,"Eng Spec Open Rule : GetSpecificationContent : : Case Ens Technological Table : ens spec table name = ",sContentObjectName)
/* Access to ens techno table information */
set pEnsTechnoTable = ContentObject
res3 = pEnsTechnoTable-> . . .
}
}
}
The above example lets you access ens technological tables located under a spec.
EnsSpecification.GetSpecificationContent()
Lets you access ESE entities aggregated under an ens specification.
SignatureEnsSpecification.GetSpecificationContent(SearchedType : String, ListOfContent : List) : Boolean
Arguments
Name | Input / Output | Required? | Type | Comment |
SearchedType | In | Yes | String | PLM type of the searched content: EnsTechnologicalTable , EnsFilter , or of their PLM subtypes. |
ListOfContent | Out | Yes | List | List of ens techno tables or of ens filters being aggregated under the ens specification. |
Examplelet pEnsSpecObj (EnsSpecification)
let EnsSpecTechnoTableObjects(List)
let NbEnsSpecTechnoTableObjects (Integer)
let ContentObject(PLMEntity)
let res (Boolean)
let i (Integer)
res=false
…
res = pEnsSpecObj-> GetSpecificationContent("EnsTechnologicalTable",
EnsSpecTechnoTableObjects)
NbEnsSpecTechnoTableObjects = EnsSpecTechnoTableObjects.Size()
i = 1
for i while i <= NbEnsSpecTechnoTableObjects
{
set ContentObject = EnsSpecTechnoTableObjects.GetItem(i)
if (NULL <> ContentObject)
{
…
}
}
The above example lets you access ens technological tables located under a spec.
EnsTechnologicalTable.GetColumn()
Lets you get a column for an ens technological table as cells.
SignatureEnsTechnologicalTable.GetColumn(ColumnIndex : Integer, ListOfEnsTechnologicalTableCells : List) : Boolean
Arguments
Name | Input / Output | Required? | Type | Comment |
ColumnIndex | In | Yes | Integer | Column index. |
ListOfEnsTechnologicalTableCells | Out | Yes | List | Column cells |
Examplelet pEnsTechnoTable (EnsTechnologicalTable)
let res (Boolean)
let ColumnIndex (Integer)
let EnsTechnologicalTableCellsOfAColumn (List)
let NbEnsTechnologicalTableCellsOfAColumn (Integer)
let pEnsTechnologicalTableCell (EnsTechnologicalTableCell)
let j (Integer)
/* Read cells of the 8th column of an ens techno table */
ColumnIndex = 8
res = pEnsTechnoTable->GetColumn(ColumnIndex, EnsTechnologicalTableCellsOfAColumn)
NbEnsTechnologicalTableCellsOfAColumn = EnsTechnologicalTableCellsOfAColumn.Size()
Trace(1,"NbEnsTechnologicalTableCells in Column 8 = ", NbEnsTechnologicalTableCellsOfAColumn)
/* Column8 : Read cells values */
j = 1
for j while j <= NbEnsTechnologicalTableCellsOfAColumn
{
set pEnsTechnologicalTableCell = EnsTechnologicalTableCellsOfAColumn.GetItem(j)
if (NULL <> pEnsTechnologicalTableCell)
{
…
}
}
EnsTechnologicalTable.GetColumnDefinitions()
Lets you get the characteristics of ens technological table columns.
SignatureEnsTechnologicalTable.GetColumnDefinitions(ListOfColumnDefinitions : List) : Boolean
Arguments
Name | Input / Output | Required? | Type | Comment |
ListOfColumnDefinitions | Out | Yes | List | List of ens parameter descriptors describing ens technological table columns. |
Example/* Get ens techno table’s columns’ characteristics as ens parameter descriptors */
let pEnsTechnoTable (EnsTechnologicalTable)
let NbEnsParameterDescriptors (Integer)
let EnsParameterDescriptors (List)
let pEnsParameterDescriptor (EnsParameterDescriptor)
let res (Boolean)
let j (Integer)
res=false
…
res = pEnsTechnoTable-> GetColumnDefinitions(EnsParameterDescriptors)
NbEnsParameterDescriptors = EnsParameterDescriptors.Size()
j = 1
for j while j <= NbEnsParameterDescriptors
{
set pEnsParameterDescriptor = EnsParameterDescriptors.GetItem(j)
if (NULL <> pEnsParameterDescriptor)
{
…
}
}
EnsTechnologicalTable.GetDependancyOnATableColumn()
Lets you determine the dependancy that an ens technological table column may have on another ens technological one (if any).
SignatureEnsTechnologicalTable.GetDependancyOnATableColumn(ColumnIndex : Integer, EnsTechnologicalTableDependancy : EnsTechnologicalTableDependancy) : Boolean
Arguments
Name | Input / Output | Required? | Type | Comment |
ColumnIndex | In | Yes | Integer | Column index. |
EnsTechnologicalTableDependancy | Out | Yes | EnsTechnologicalTableDependancy | Provides you with information related to the dependancy the table column in input can have on another table column. |
Examplelet pEnsTechnoTable (EnsTechnologicalTable)
let res (Boolean)
let ColumnIndex (Integer)
let pEnsTechnologicalTableDependancy (EnsTechnologicalTableDependancy)
…
ColumnIndex = 1
res = pEnsTechnoTable->GetDependancyOnATableColumn(ColumnIndex, pEnsTechnologicalTableDependancy)
if ( NULL <> pEnsTechnologicalTableDependancy )
{
...
}
EnsTechnologicalTable.GetRow()
Lets you get the row of an ens technological table as cells.
SignatureEnsTechnologicalTable.GetRow(RowIndex : Integer, ListOfEnsTechnologicalTableCells : List) : Boolean
Arguments
Name | Input / Output | Required? | Type | Comment |
RowIndex | In | Yes | Integer | Row index. |
ListOfEnsTechnologicalTableCells | Out | Yes | List | Cells of the row. |
Examplelet pEnsTechnoTable (EnsTechnologicalTable)
let res (Boolean)
let RowIndex (Integer)
let EnsTechnologicalTableCellsOfARow (List)
let NbEnsTechnologicalTableCellsOfARow (Integer)
let pEnsTechnologicalTableCell (EnsTechnologicalTableCell)
let j (Integer)
res=false
RowIndex=1
…
res = pEnsTechnoTable->GetRow(RowIndex, EnsTechnologicalTableCellsOfARow)
NbEnsTechnologicalTableCellsOfARow = EnsTechnologicalTableCellsOfARow.Size()
Trace(1,"NbEnsTechnologicalTableCells in Row 1 = ", NbEnsTechnologicalTableCellsOfARow)
/* Row1 : Read cells values */
j = 1
for j while j <= NbEnsTechnologicalTableCellsOfARow
{
set pEnsTechnologicalTableCell = EnsTechnologicalTableCellsOfARow.GetItem(j)
if (NULL <> pEnsTechnologicalTableCell)
{
…
}
}
EnsTechnologicalTable.GetSize()
Lets you get the number of rows and columns of an ens technological table.
Arguments
Name | Input / Output | Required? | Type | Comment |
NbRows | Out | Yes | Integer | Number of rows. |
NbColumns | Out | Yes | Integer | Number of columns. |
Example/* Description : get number of rows and columns of an ens technological table */
let pEnsTechnoTable (EnsTechnologicalTable)
let NbRows (Integer)
let NbColumns (Integer)
let res (Boolean)
res=false
res = pEnsTechnoTable->GetSize(NbRows, NbColumns)
Trace(1,"GetSize : NbRows = ", NbRows)
Trace(1,"GetSize : NbColumns = ", NbColumns)
EnsTechnologicalTable.SetCell()
Lets you set a cell of an ens technological table.
SignatureEnsTechnologicalTable.SetCell(RowIndex : Integer, ColumnIndex : Integer, EnsTechnologicalTableCell : EnsTechnologicalTableCell) : Boolean
Arguments
Name | Input/Output | Required? | Type | Comment |
RowIndex | In | Yes | Integer | Row index of the ens technological table's cell to set. |
ColumnIndex | In | Yes | Integer | Column index of the ens technological table's cell to set.
|
EnsTechnologicalTableCell | In | Yes | EnsTechnologicalTableCell | Cell to set at position
(RowIndex, ColumnIndex) in the ens technological table. |
Example/* Description : Set a cell of an ens technological table */
/* Sample */
let pEnsTechnoTable (EnsTechnologicalTable)
let res (Boolean)
let RowIndex (Integer)
let ColumnIndex (Integer)
let pEnsTechnologicalTableCurNewCellForCol9 (EnsTechnologicalTableCell)
/* Retrieve the ens techno table to work on */
...
/* Create and initialize 1 new cell for row2 & column9 */
pEnsTechnologicalTableCurNewCellForCol9 = new("EnsTechnologicalTableCell","EnsTechnologicalTableNewCell92Replacement",NULL)
if (pEnsTechnologicalTableCurNewCellForCol9 <> NULL)
{
pEnsTechnologicalTableCurNewCellForCol9-> SetAttributeString("ValueAsString","StringIdentifier92AfterReplacement")
}
RowIndex = 2
ColumnIndex = 9
res = pEnsTechnoTable-> SetCell(RowIndex,ColumnIndex,pEnsTechnologicalTableCurNewCellForCol9)
EnsTechnologicalTable.SetColumn()
Lets you set a column of an ens technological table as cells.
SignatureEnsTechnologicalTable.SetColumn(ColumnIndex : Integer, ListOfEnsTechnologicalTableCells : List) : Boolean
Arguments
Name | Input/Output | Required? | Type | Comment |
ColumnIndex | In | Yes | Integer | Column index of the ens technological table's column to set.
|
ListOfEnsTechnologicalTableCells | In | Yes | List | List of cells to set the ens technological table's column with index ColumnIndex.
|
Example/* Description : Set a column of an ens technological table as cells */
/* Declarations : Techno table cells access in Write by column */
let pEnsTechnoTable (EnsTechnologicalTable)
let res (Boolean)
let pEnsTechnologicalTableCurNewCellForCol9 (EnsTechnologicalTableCell)
let EnsTechnologicalTableNewCellsForCol9 (List)
let ColumnIndex (Integer)
/* Retrieve the ens techno table to work on */
...
/* Create 2 new cells for column9 because 2 rows in this sample */
pEnsTechnologicalTableCurNewCellForCol9 = new ("EnsTechnologicalTableCell","EnsTechnologicalTableNewCell91",NULL)
if (pEnsTechnologicalTableCurNewCellForCol9 <> NULL)
{
pEnsTechnologicalTableCurNewCellForCol9-> SetAttributeString("ValueAsString","StringIdentifier91")
EnsTechnologicalTableNewCellsForCol9-> Append(pEnsTechnologicalTableCurNewCellForCol9)
}
pEnsTechnologicalTableCurNewCellForCol9 = new ("EnsTechnologicalTableCell","EnsTechnologicalTableNewCell92",NULL)
if (pEnsTechnologicalTableCurNewCellForCol9 <> NULL)
{
pEnsTechnologicalTableCurNewCellForCol9-> SetAttributeString("ValueAsString","StringIdentifier92")
EnsTechnologicalTableNewCellsForCol9-> Append(pEnsTechnologicalTableCurNewCellForCol9)
}
/* Set the complete ens techno table column with the list of cells */
ColumnIndex = 9
res = pEnsTechnoTable-> SetColumn(ColumnIndex,EnsTechnologicalTableNewCellsForCol9)
|