Engineering Specification Functions

A package that describes the engineering specification functions.

This page discusses:

EnsFilter.GetExtensionDefinition()

Lets you get the extension definition of an ens filter (if any).

Signature

EnsFilter.GetExtensionDefinition(ExtensionDefinitionExist : Boolean, ListOfPLMParts : List) : Boolean

Arguments

NameInput / OutputRequired?TypeComment
ExtensionDefinitionExistOutYesBoolean

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.

ListOfPLMPartsOutYesListExtension definition if the extension definition exists.

ReturnType

Boolean

Example

let 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.

Signature

EnsFilter.GetFilterUnits(ListOfEnsParameterDefinitions : List, ListOfEnsFilterUnits : List) : Boolean

Arguments

NameInput / OutputRequired?TypeComment
ListOfEnsParameterDefinitionsOutYesListcommon list of parameters used in the various filter units of the ens filter.
ListOfEnsFilterUnitsOutYesListFilter units of the ens filter.

ReturnType

Boolean

Example

let 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.

Signature

EnsSpecification.OpenSpecificationContent(SearchedType : String, ListOfContent : List) : Boolean

ReturnType

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.

Signature

EnsSpecification.GetSpecificationContent(SearchedType : String, ListOfContent : List) : Boolean

Arguments

NameInput / OutputRequired?TypeComment
SearchedTypeInYesStringPLM type of the searched content: EnsTechnologicalTable, EnsFilter, or of their PLM subtypes.
ListOfContentOutYesListList of ens techno tables or of ens filters being aggregated under the ens specification.

ReturnType

Boolean

Example

let 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.

Signature

EnsTechnologicalTable.GetColumn(ColumnIndex : Integer, ListOfEnsTechnologicalTableCells : List) : Boolean

Arguments

NameInput / OutputRequired?TypeComment
ColumnIndexInYesIntegerColumn index.
ListOfEnsTechnologicalTableCellsOutYesListColumn cells

ReturnType

Boolean

Example

let 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.

Signature

EnsTechnologicalTable.GetColumnDefinitions(ListOfColumnDefinitions : List) : Boolean

Arguments

NameInput / OutputRequired?TypeComment
ListOfColumnDefinitionsOutYesListList of ens parameter descriptors describing ens technological table columns.

ReturnType

Boolean

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).

Signature

EnsTechnologicalTable.GetDependancyOnATableColumn(ColumnIndex : Integer, EnsTechnologicalTableDependancy : EnsTechnologicalTableDependancy) : Boolean

Arguments

NameInput / OutputRequired?TypeComment
ColumnIndexInYesIntegerColumn index.
EnsTechnologicalTableDependancyOutYesEnsTechnologicalTableDependancyProvides you with information related to the dependancy the table column in input can have on another table column.

ReturnType

Boolean

Example

let 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.

Signature

EnsTechnologicalTable.GetRow(RowIndex : Integer, ListOfEnsTechnologicalTableCells : List) : Boolean

Arguments

NameInput / OutputRequired?TypeComment
RowIndexInYesIntegerRow index.
ListOfEnsTechnologicalTableCellsOutYesListCells of the row.

ReturnType

Boolean

Example

let 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.

Signature

EnsTechnologicalTable.GetSize(NbRows : Integer, NbColumns : Integer) : Boolean

Arguments

NameInput / OutputRequired?TypeComment
NbRowsOutYesIntegerNumber of rows.
NbColumnsOutYesIntegerNumber of columns.

ReturnType

Boolean

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.

Signature

EnsTechnologicalTable.SetCell(RowIndex : Integer, ColumnIndex : Integer, EnsTechnologicalTableCell : EnsTechnologicalTableCell) : Boolean

Arguments

NameInput/OutputRequired?TypeComment
RowIndexInYesIntegerRow index of the ens technological table's cell to set.
ColumnIndexInYesIntegerColumn index of the ens technological table's cell to set.
EnsTechnologicalTableCellInYesEnsTechnologicalTableCellCell to set at position (RowIndex, ColumnIndex) in the ens technological table.

ReturnType

Boolean

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.

Signature

EnsTechnologicalTable.SetColumn(ColumnIndex : Integer, ListOfEnsTechnologicalTableCells : List) : Boolean

Arguments

NameInput/OutputRequired?TypeComment
ColumnIndexInYesIntegerColumn index of the ens technological table's column to set.
ListOfEnsTechnologicalTableCellsInYesListList of cells to set the ens technological table's column with index ColumnIndex.

ReturnType

Boolean

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)