@PHXClassDecorator(PHXTException_Decorator)
class PHXScriptObject(PHXSimpleType)
The ModelCenter type for object variable. This class adds the following features to thePHXSimpleType:
className: string
def __init__(self, varName)
Create a data object.
The internal script object still needs to be initialized via initialize method
@param varName: the name of the variable already declared in the wrapper to reference@type varName: string@rtype: void
def toString(self)
converts the variable to a string
@rtype: string
def fromString(self, val)
converts a String representation to the internal value
@param val: the value to convert@type val: string@rtype: void
def getClassURL(self)
return the class URL
@rtype: string
def getMemberValueAsString(self, mIndex)
return member value
@param mIndex: index of the member@type mIndex: string@rtype: string
def getDoubleMemberValue(self, mIndex)
return member value
@param mIndex: index of the member@type mIndex: string@rtype: double
def getIntMemberValue(self, mIndex)
return member value
@param mIndex: index of the member@type mIndex: string@rtype: int
def getBooleanMemberValue(self, mIndex)
return member value
@param mIndex: index of the member@type mIndex: string@rtype: boolean
def getStringMemberValue(self, mIndex)
return member value
@param mIndex: index of the member@type mIndex: string@rtype: string
def getDoubleArrayMemberValue(self, mIndex, index)
return member value
@param mIndex: index of the member@type mIndex: string@param index: Index to an array element@type index: string (as a comma-separated list of indices), int[], or int@rtype: double
def getIntArrayMemberValue(self, mIndex, index)
return member value
@param mIndex: index of the member@type mIndex: string@param index: Index to an array element@type index: string (as a comma-separated list of indices), int[], or int@rtype: int
def getBooleanArrayMemberValue(self, mIndex, index)
return member value
@param mIndex: index of the member@type mIndex: string@param index: Index to an array element@type index: string (as a comma-separated list of indices), int[], or int@rtype: boolean
def getStringArrayMemberValue(self, mIndex, index)
return member value
@param mIndex: index of the member@type mIndex: string@param index: Index to an array element@type index: string (as a comma-separated list of indices), int[], or int@rtype: string
def setMemberValueFromString(self, mIndex, value)
set value of a member
@param mIndex: index of the member@type mIndex: string@param value: value of the member@type value: string@rtype: void
def setDoubleMemberValue(self, mIndex, value)
set value of a double member
@param mIndex: index of the member@type mIndex: string@param value: value of the member@type value: double@rtype: void
def setIntMemberValue(self, mIndex, value)
set value of a double member
@param mIndex: index of the member@type mIndex: string@param value: value of the member@type value: int@rtype: void
def setBooleanMemberValue(self, mIndex, value)
set value of a double member
@param mIndex: index of the member@type mIndex: string@param value: value of the member@type value: boolean@rtype: void
def setStringMemberValue(self, mIndex, value)
set value of a double member
@param mIndex: index of the member@type mIndex: string@param value: value of the member@type value: string@rtype: void
def setDoubleArrayMemberValue(self, mIndex, index, value)
set value of a double member
@param mIndex: index of the member@type mIndex: string@param index: Index to an array element@type index: string (as a comma-separated list of indices), int[], or int@param value: value of the member@type value: double@rtype: void
def setIntArrayMemberValue(self, mIndex, index, value)
set value of a double member
@param mIndex: index of the member@type mIndex: string@param index: Index to an array element@type index: string (as a comma-separated list of indices), int[], or int@param value: value of the member@type value: int@rtype: void
def setBooleanArrayMemberValue(self, mIndex, index, value)
set value of a double member
@param mIndex: index of the member@type mIndex: string@param index: Index to an array element@type index: string (as a comma-separated list of indices), int[], or int@param value: value of the member@type value: boolean@rtype: void
def setStringArrayMemberValue(self, mIndex, index, value)
set value of a double member
@param mIndex: index of the member@type mIndex: string@param index: Index to an array element@type index: string (as a comma-separated list of indices), int[], or int@param value: value of the member@type value: string@rtype: void
def setMember(self, mIndex, value, typeStr)
set member. Create a member if not exists.
@param mIndex: index of the member@type mIndex: string@param value: value of the member@type value: string@param typeStr: type of the member@type typeStr: string@rtype: void
def deleteMember(self, mIndex)
delete a member
@param mIndex: index of the member@type mIndex: string@rtype: void
def deleteAllMembers(self)
delete all members
@rtype: void
def callMethod(self, method)
call an object method
@param method: name of the method@type method: string@rtype: void
def isNonStrictType(self)
return true if the object is a non-strict type
@rtype: bool
def toXML(self)
return XML representation of the object
@rtype: string
def fromXML(self, xmlStr)
set the content of the object from the XML string
@param xmlStr: XML representation of object@type xmlStr: string@rtype: void
def hasMember(self, mIndex)
return true if the member exists
@param mIndex: index of the member@type mIndex: string@rtype: bool
def getMemberLength(self, mIndex, dim=0)
return length of an ND array
@param mIndex: index of the member@type mIndex: string@param dim: specified dimension@type dim: int@rtype: int or list of int
def setMemberLength(self, mIndex, length, dim=0)
return length of an ND array
@param mIndex: index of the member@type mIndex: string@param length: size of the dimension@type length: int@param dim: specified dimension@type dim: int@rtype: void
def setMemberDimensions(self, mIndex, dim)
Sets the dimensions of an array member.
@param mIndex: index of the member@type mIndex: string@param dim: the new dimensions for the array@type dim: int[]@rtype: void
def getMemberNumDimensions(self, mIndex)
Gets the number of dimensions of an array member
@param mIndex: index of the member@type mIndex: string@rtype: int
def getMemberDimensions(self, mIndex)
gets the dimensions of an array member
@param mIndex: index of the member@type mIndex: string@rtype: int[]
def getMemberType(self, mIndex)
return member type
@param mIndex: index of the member@type mIndex: string@rtype: string
def hasMemberLowerBound(self, mIndex)
return true if the member has lowerbound defined
@param mIndex: index of the member@type mIndex: string@rtype: bool
def hasMemberUpperBound(self, mIndex)
return true if the member has upperbound defined
@param mIndex: index of the member@type mIndex: string@rtype: bool
def getMemberLowerBound(self, mIndex)
return member’s lower bound
@param mIndex: index of the member@type mIndex: string@rtype: string
def setMemberLowerBound(self, mIndex, lowerBound)
set member’s lower bound
@param mIndex: index of the member@type mIndex: string@param lowerBound: lower bound@type lowerBound: string@rtype: void
def getMemberUpperBound(self, mIndex)
return member’s upper bound
@param mIndex: index of the member@type mIndex: string@rtype: string
def setMemberUpperBound(self, mIndex, upperBound)
set member’s upper bound
@param mIndex: index of the member@type mIndex: string@param upperBound: upper bound@type upperBound: string@rtype: void
def getMemberEnumValues(self, mIndex)
return member’s enum values
@param mIndex: index of the member@type mIndex: string@rtype: string
def setMemberEnumValues(self, mIndex, enumValues)
set member’s enum values
@param mIndex: index of the member@type mIndex: string@param enumValues: enum values@type enumValues: string@rtype: void
def getMemberEnumAliases(self, mIndex)
return member’s enum aliases
@param mIndex: index of the member@type mIndex: string@rtype: string
def setMemberEnumAliases(self, mIndex, enumAliases)
set member’s enum aliases
@param mIndex: index of the member@type mIndex: string@param enumAliases: enum aliases@type enumAliases: string@rtype: void
def getMemberDescription(self, mIndex)
return member’s description
@param mIndex: index of the member@type mIndex: string@rtype: string
def setMemberDescription(self, mIndex, description)
set member’s enum aliases
@param mIndex: index of the member@type mIndex: string@param description: description@type description: string@rtype: void
def getMemberUnits(self, mIndex)
return member’s units
@param mIndex: index of the member@type mIndex: string@rtype: string
def setMemberUnits(self, mIndex, units)
set member’s units
@param mIndex: index of the member@type mIndex: string@param units: units@type units: string@rtype: void
def getMemberProperty(self, mIndex, propertyName)
return member’s property
@param mIndex: index of the member@type mIndex: string@param propertyName: name of the property@type propertyName: string@rtype: string
def setMemberProperty(self, mIndex, propertyName, propertyValue)
set member’s property
@param mIndex: index of the member@type mIndex: string@param propertyName: property name@type propertyName: string@param propertyValue: property value@type propertyValue: string@rtype: void
def fromFile(self, mIndex, fileName="")
set content of a file or file array member from a file
@param mIndex: index of the member@type mIndex: string@param fileName: file name@rtype: fileName`: string@rtype: void
def toFile(self, mIndex, fileName="")
write content of a file or file array member to a file
@param mIndex: index of the member@type mIndex: string@param fileName: file name@rtype: fileName`: string@rtype: void
def getIsBinary(self, mIndex)
return True if the file or file array member contains a binary file
@param mIndex: index of the member@type mIndex: string@rtype: boolean
def setIsBinary(self, mIndex, isBinary)
set whether the file or file array member contains a binary file
@param mIndex: index of the member@type mIndex: string@param isBinary: whether it is a binary or not@type isBinary: boolean@rtype: void
def getFileName(self, mIndex)
return file name of the file or file array member
@param mIndex: index of the member@type mIndex: string@rtype: string
def setFileName(self, mIndex, fileName)
set file name for file or file array member
@param mIndex: index of the member@type mIndex: string@param fileName: file name@rtype: fileName`: string@rtype: void
def setFileExtension(self, mIndex, fileExtension)
set file extension for file or file array member
@param mIndex: index of the member@type mIndex: string@param fileExtension: file extension@type fileExtension: string@rtype: void
def setBaseName(self, mIndex, baseName)
set base directory for file or file array member
@param mIndex: index of the member@type mIndex: string@param baseName: base directory@type baseName: string@rtype: void