Python scripting - Objects

CENPyOlpEventObject

 

Methods

 

GetEnumIndex(name: string): int

 

o

name

Name of the enum attribute

 

o

return

Current enum index of found enum attribute

Finds an enum attribute by name and returns its Enum index.

 

[Example]   

   index = obj.GetEnumIndex("EEnumAttribute")

 


 

SetEnumIndex(name: string, iVal: int)

 

o

name

Name of the enum attribute

 

o

iVal

enum index to be set

Finds an enum attribute by name and sets its Enum index.

 

[Example]   

   obj.SetEnumIndex("EEnumAttribute", 1)

 


 

GetInteger(name: string): int

 

o

name

Name of the int attribute

 

o

return

Value of the found attribute

Finds an int attribute by name and returns its value.

 

[Example]   

  iVal = obj.GetInteger("EIntAttribute")

 


 

SetInteger(name: string, iVal: int)

 

o

name

Name of the int attribute

 

o

iVal

Value to set

Finds an int attribute by name and sets its value.

 

[Example]   

  obj.SetInteger("EIntAttribute", 1)

 


 

GetDouble(name: string): float

 

o

name

Name of the double attribute

 

o

return

Value of the found attribute

Finds an int attribute by name and returns its value.

 

[Example]   

   dVal = obj.GetDouble("EDoubleAttribute")

 


 

SetDouble(name: string, iVal: float)

 

o

name

Name of the double attribute

 

o

iVal

Value to set

Finds an int attribute by name and sets its value.

 

[Example]   

   obj.SetDouble("EDoubleAttribute", 1.1)

 


 

GetString(name: string): string

 

o

name

Name of the string attribute

 

o

return

Value of the found attribute

Finds an string attribute by name and returns its value.

 

[Example]   

   sVal = obj.GetString("EStringAttribute")

 


 

SetString(name: string, iVal: string)

 

o

name

Name of the string attribute

 

o

iVal

Value to set

Finds an int attribute by name and sets its value.

 

[Example]   

  obj.SetString("EStringAttribute", "element2")

 


 

GetBool(name: string): bool

 

o

name

Name of the boolean attribute

 

o

return

Value of the found attribute

Finds an boolean attribute by name and returns its value.

 

[Example]   

  bVal = obj.GetBool("EBooleanAttribute")

 


 

SetBool(name: string, iVal: bool)

 

o

name

Name of the boolean attribute

 

o

iVal

Value to set

Finds an boolean attribute by name and sets its value.

 

[Example]   

   obj.SetBool("IsLocked", True)

 


Previous
Page précédente
Chapter
Page principale du chapitre
Next
Page suivante