Python scripting - Common operators

CENPyOlpAttribGetter

Previous  Chapter  Next

 

The object of the CENPyOlpAttribGetter class may be used to obtain values of attributes.

 

 

[Example 1]

 

def PostTechInitAttributes(techAttribInitOperator):  

attribGetter = techAttribInitOperator.GetAttribGetter()

 

def PostInitManufacturingGeometry(techMfGeoInitOperator):

attribGetter = techMfGeoInitOperator.GetAttribGetter()

 

[Example 2]

 

def PostWmInitAttributes(wmAttribInitOperator):  

attribGetter = wmAttribInitOperator.GetAttribGetter()

 

 

Methods

 

GetInteger(attributeName: string): int

 

o

attributeName

The name of the attribute

 

o

return

The value of the attribute

 

[Example]

   valOfMyIntAttrib = attribGetter.GetInteger('MyIntAttribute')

 


 

GetDouble(attributeName: string): float

 

o

attributeName

The name of the attribute

 

o

return

The value of the attribute

 

[Example]

   valOfMyDoubleAttrib = attribGetter.GetDouble('MyDoubleAttribute')


 

GetString(attributeName: string): string

 

o

attributeName

The name of the attribute

 

o

return

The value of the attribute

 

[Example]

   valOfMyStrAttrib = attribGetter.GetString('MyStringAttribute')

 


 

GetBool(attributeName: string): bool

 

o

attributeName

The name of the attribute

 

o

return

The value of the attribute

 

[Example]

   valOfMyBoolAttrib = attribGetter.GetBool('MyBoolAttribute')

 


 

GetEnumIndex(attributeName: string): integer

 

o

attributeName

The name of the attribute

 

o

return

The index of the attribute

 

[Example]

   indexOfMyEnumAttrib = attribGetter.GetEnumIndex('MyEnumAttribute')

 


 

GetAttributeByName(name: string): CENPyOlpAttribute

 

 

o

name

name of attribute to search for

 

o

return

CENPyOlpAttribute object

 

[Example]

   foundAttribute = attribGetter.GetAttributeByName('MyIntAttribute')

 


 

GetAttributeBoolByName(name: string): CENPyOlpAttributeBool

 

 

o

name

name of attribute to search for

 

o

return

CENPyOlpAttributeBool object

 

[Example]

   foundAttribute = attribGetter.GetAttributeBoolByName('MyBoolAttribute')

 


 

GetAttributeEnumByName(name: string): CENPyOlpAttributeEnum

 

 

o

name

name of attribute to search for

 

o

return

CENPyOlpAttributeEnum object

 

[Example]

   foundAttribute = attribGetter.GetAttributeEnumByName('MyEnumAttribute')

 


 

GetAttributeDoubleByName(name: string): CENPyOlpAttributeDouble

 

 

o

name

name of attribute to search for

 

o

return

CENPyOlpAttributeDouble object

 

[Example]

   foundAttribute = attribGetter.GetAttributeDoubleByName('MyDoubleAttribute')

 


 

GetSystemAttribGetter(): CENPyOlpSystemAttribGetter

 

 

o

return

CENPyOlpSystemAttribGetter object

 

[Example]

   sysAttribGetter = attribGetter.GetSystemAttribGetter()

 


 

GetAttributeTableByName(name: string, contailsCellId: string = ""): CENPyOlpAttributeTable

 

o

name

name of table attribute to search for

 

o

containsCellId

ID the table needs to have (optional)

 

o

return

CENPyOlpAttributeTable object

 

Returns the table attribute object. If containsCellId is set, it will check if there are two tables with the given name and returns the one which contains the ID.

First it will check the program table and if this table does not contain the ID it will check the controller table.

 

[Example]

   myTable = attribGetter.GetAttributeTableByName("MyTable")

   myTable2 = attribGetter.GetAttributeTableByName("MyTable2", "ID_123")

 


 

GetScopeSortedTableRows(tableName: string): list

 

o

tableName

Name of table attribute

 

o

return

List of strings with all IDs combined of table from controller and program

 

Gets all IDs (first column) from both tables program and controller with the given name (no duplicates of IDs)

 

[Example]

ids = attribGetter.GetScopeSortedTableRows("MyTable")

 


Previous
Previous page
Chapter
Chapter page
Next
Next page