Skip to main content

ModelCenter APIs 2026 R1

ObjectVariable

Last update: 18.06.2026

public class ObjectVariable : Variable

An array type class for ModelCenter

Author

Woyak, 10/2001

Functions

Name Summary
callMethod public callMethod(method: String): Any
call a method
deleteAllMembers public deleteAllMembers()
delete all members for non-strict type object.
deleteMember public deleteMember(mIndex: String)
delete a member for non-strict type object.
dependentLinks public dependentLinks(): VariableLinks
Returns a list of links that immediately depend on the value of this variable.
disableGC public disableGC(gc: Boolean)
If true, prevents releaseObjects from doing anything.
fromFile public fromFile(mIndex: String, fileName: String)
load a file into a file member
fromString public fromString(str: String)
Sets the value for the variable from a string.
fromXML public fromXML(xmlStr: String)
update the object from an XML string
getBooleanArrayMemberValue public getBooleanArrayMemberValue(mIndex: String, index: Int): Boolean
get the value of an 1D boolean array element
public getBooleanArrayMemberValue(mIndex: String, index: Array<Int>): Boolean
get the value of a boolean array element
getBooleanArrayMemberValueAbsolute public getBooleanArrayMemberValueAbsolute(mIndex: String, index: Int): Boolean
get the value of an 1D boolean array element without validating it
public getBooleanArrayMemberValueAbsolute(mIndex: String, index: Array<Int>): Boolean
get the value of a boolean array element without validating it
getBooleanMemberValue public getBooleanMemberValue(mIndex: String): Boolean
gets the value of boolean member
getBooleanMemberValueAbsolute public getBooleanMemberValueAbsolute(mIndex: String): Boolean
gets the value of boolean member without validating it
getClassURL public getClassURL(): String
gets class URL
getDescription public getDescription(): String
gets the description for the variable
getDirectDependents public getDirectDependents(): Variables
public getDirectDependents(followSuspended: Boolean): Variables
Gets all the immediately linked outputs of this variable.
getDirectPrecedents public getDirectPrecedents(): Variables
public getDirectPrecedents(followSuspended: Boolean): Variables
Gets all the immediately linked inputs of this variable.
getDoubleArrayMemberValue public getDoubleArrayMemberValue(mIndex: String, index: Int): Double
get the value of an 1D double array element
public getDoubleArrayMemberValue(mIndex: String, index: Array<Int>): Double
get the value of a double array element
getDoubleArrayMemberValueAbsolute public getDoubleArrayMemberValueAbsolute(mIndex: String, index: Int): Double
get the value of an 1D double array element without validating it
public getDoubleArrayMemberValueAbsolute(mIndex: String, index: Array<Int>): Double
get the value of a double array element without validating it
getDoubleMemberValue public getDoubleMemberValue(mIndex: String): Double
gets the value of a double member
getDoubleMemberValueAbsolute public getDoubleMemberValueAbsolute(mIndex: String): Double
gets the value of a double member without validating it
getFileExtension public getFileExtension(mIndex: String): String
return file extension of a file member
getFileName public getFileName(mIndex: String): String
return file name of a file member
getFullName public getFullName(): String
Gets the full name of the variable, e.g.
getHasChanged public getHasChanged(): Boolean
Boolean which indicates if the variable has changed since the last time the boolean was reset.
getHide public getHide(): Boolean
Gets whether the variable is hidden or not
getIndexStr public getIndexStr(index: Int): String
public getIndexStr(index: Array<Int>): String
return ModelCenter style array index as a string
getIntArrayMemberValue public getIntArrayMemberValue(mIndex: String, index: Int): Int
get the value of an 1D integer array element
public getIntArrayMemberValue(mIndex: String, index: Array<Int>): Int
get the value of an integer array element
getIntArrayMemberValueAbsolute public getIntArrayMemberValueAbsolute(mIndex: String, index: Int): Int
get the value of an 1D integer array element without validating it
public getIntArrayMemberValueAbsolute(mIndex: String, index: Array<Int>): Int
get the value of an integer array element without validating it
getIntMemberValue public getIntMemberValue(mIndex: String): Int
gets the value of an integer member
getIntMemberValueAbsolute public getIntMemberValueAbsolute(mIndex: String): Int
gets the value of an integer member without validating it
getIsBinary public getIsBinary(mIndex: String): Boolean
return true if the file member contains a binary file
getMemberDescription public getMemberDescription(mIndex: String): String
get description of the member
getMemberDimensions public getMemberDimensions(mIndex: String): Array<Long>
get dimensions and size of an array member
getMemberEnumAliases public getMemberEnumAliases(mIndex: String): String
get enum aliases of the member
getMemberEnumValues public getMemberEnumValues(mIndex: String): String
return enum values of the member
getMemberIndex public getMemberIndex(fullMemberName: String): String
return member name from a full variable name
getMemberLength public getMemberLength(mIndex: String, dimension: Long): Long
get length of an array member
getMemberList public getMemberList(mIndex: String): Array<String>
get a list of child members.
getMemberLowerBound public getMemberLowerBound(mIndex: String): Double
get lowerBound of a member
getMemberNumDimensions public getMemberNumDimensions(mIndex: String): Long
get number of dimensions of an array member
getMemberProperty public getMemberProperty(mIndex: String, propertyName: String): String
get value of a property of the member
getMemberType public getMemberType(mIndex: String): String
return type of the member
getMemberUnits public getMemberUnits(mIndex: String): String
get units of the member
getMemberUpperBound public getMemberUpperBound(mIndex: String): Double
return upperBound of the member
getMemberValueAbsoluteAsString public getMemberValueAbsoluteAsString(mIndex: String): String
gets the value of a member as a string without validating it
getMemberValueAsString public getMemberValueAsString(mIndex: String): String
gets the value of a member as a string
getMetadata public getMetadata(name: String): Variant
Get a metadata value.
getMethodList public getMethodList(): Array<String>
get a list of methods
getName public getName(): String
Gets the name of the variable, e.g.
getOwningComponent public getOwningComponent(): Component
Get the component which owns this variable.
getStringArrayMemberValue public getStringArrayMemberValue(mIndex: String, index: Int): String
get the value of an 1D String array element
public getStringArrayMemberValue(mIndex: String, index: Array<Int>): String
get the value of a string array element
getStringArrayMemberValueAbsolute public getStringArrayMemberValueAbsolute(mIndex: String, index: Int): String
get the value of an 1D String array element without validating it
public getStringArrayMemberValueAbsolute(mIndex: String, index: Array<Int>): String
get the value of a string array element without validating it
getStringMemberValue public getStringMemberValue(mIndex: String): String
gets the value of string member
getStringMemberValueAbsolute public getStringMemberValueAbsolute(mIndex: String): String
gets the value of string member without validating it
getType public getType(): String
Gets the type of the variable.
hasMember public hasMember(mIndex: String): Boolean
check if a member exists
hasMemberLowerBound public hasMemberLowerBound(mIndex: String): Boolean
check if a member has lower bound defined
hasMemberUpperBound public hasMemberUpperBound(mIndex: String): Boolean
check if a member has lower bound defined
invalidate public invalidate()
Invalidates the variable
isInput public isInput(): Boolean
Indicates whether the variable is an input or output
isInputToComponent public isInputToComponent(): Boolean
Indicates whether a variable is an input to a component
isInputToModel public isInputToModel(): Boolean
Indicates whether a variable is an input to the Model
isNonStrictType public isNonStrictType(): Boolean
check whether a class is a non-strict type
isNumericMember public isNumericMember(mIndex: String): Boolean
check if a member is a numeric type
isValid public isValid(): Boolean
Indicates whether the variable is currently valid or not
precedentLinks public precedentLinks(): VariableLinks
Returns a list of links that are immediate precedents to the value of this variable.
reinitialize public reinitialize()
reinitialize the object using the current class type
release public release()
Releases the COM reference to ModelCenter for this object.
releaseObjects public releaseObjects()
This function attempts to release any COM resources left behind from objects which have been finalized but release() was never called on them.
setBooleanArrayMemberValue public setBooleanArrayMemberValue(mIndex: String, index: Int, value: Boolean)
sets the value of an 1D boolean array member
public setBooleanArrayMemberValue(mIndex: String, index: Array<Int>, value: Boolean)
sets the value of a boolean array member
setBooleanMemberValue public setBooleanMemberValue(mIndex: String, value: Boolean)
sets the value of a boolean member
setDescription public setDescription(description: String)
sets the description for the variable
setDoubleArrayMemberValue public setDoubleArrayMemberValue(mIndex: String, index: Int, value: Double)
sets the value of a 1D double array member
public setDoubleArrayMemberValue(mIndex: String, index: Array<Int>, value: Double)
sets the value of a double array member
setDoubleMemberValue public setDoubleMemberValue(mIndex: String, value: Double)
sets the value of a double member
setFileExtension public setFileExtension(mIndex: String, fileExtension: String)
set file extension of a file member
setFileName public setFileName(mIndex: String, fileName: String)
set file name of a file member
setHasChanged public setHasChanged(flag: Boolean)
Boolean which indicates if the variable has changed since the last time the boolean was reset.
setHide public setHide(flag: Boolean)
Set whether the variable is hidden or not
setIntArrayMemberValue public setIntArrayMemberValue(mIndex: String, index: Int, value: Int)
sets the value of an 1D integer array member
public setIntArrayMemberValue(mIndex: String, index: Array<Int>, value: Int)
sets the value of an integer array member
setIntMemberValue public setIntMemberValue(mIndex: String, value: Int)
sets the value of an integer member
setIsBinary public setIsBinary(mIndex: String, isBinary: Boolean)
set binary flag for a file member
setMemberDescription public setMemberDescription(mIndex: String, description: String)
set description of the member
setMemberDimensions public setMemberDimensions(mIndex: String, d1: Long)
public setMemberDimensions(mIndex: String, d1: Long, d2: Long)
public setMemberDimensions(mIndex: String, d1: Long, d2: Long, d3: Long)
public setMemberDimensions(mIndex: String, d1: Long, d2: Long, d3: Long, d4: Long)
public setMemberDimensions(mIndex: String, d1: Long, d2: Long, d3: Long, d4: Long, d5: Long)
public setMemberDimensions(mIndex: String, d1: Long, d2: Long, d3: Long, d4: Long, d5: Long, d6: Long)
public setMemberDimensions(mIndex: String, d1: Long, d2: Long, d3: Long, d4: Long, d5: Long, d6: Long, d7: Long)
public setMemberDimensions(mIndex: String, d1: Long, d2: Long, d3: Long, d4: Long, d5: Long, d6: Long, d7: Long, d8: Long)
public setMemberDimensions(mIndex: String, d1: Long, d2: Long, d3: Long, d4: Long, d5: Long, d6: Long, d7: Long, d8: Long, d9: Long)
public setMemberDimensions(mIndex: String, d1: Long, d2: Long, d3: Long, d4: Long, d5: Long, d6: Long, d7: Long, d8: Long, d9: Long, d10: Long)
set dimension of an array member
setMemberEnumAliases public setMemberEnumAliases(mIndex: String, enumAliases: String)
set enum aliases of the member
setMemberEnumValues public setMemberEnumValues(mIndex: String, enumValues: String)
set enum values of the member
setMemberFromString public setMemberFromString(mIndex: String, value: String, type: String)
sets the value of a member.
setMemberLength public setMemberLength(mIndex: String, length: Long, dimension: Long)
set length of an array member
setMemberLowerBound public setMemberLowerBound(mIndex: String, lowerBound: Double)
set lowerBound of the member
setMemberProperty public setMemberProperty(mIndex: String, propertyName: String, propertyValue: String)
set value of a property of the member
setMemberUnits public setMemberUnits(mIndex: String, units: String)
set units of the member
setMemberUpperBound public setMemberUpperBound(mIndex: String, upperBound: Double)
set upperBound of the member
setMemberValueFromString public setMemberValueFromString(mIndex: String, value: String)
sets the value of a member from string
setMetadata public setMetadata(name: String, type: Variable.MetadataType, value: Any, access: Variable.MetadataAccess, archive: Boolean)
Set a metadata value on a variable.
setReferenceDebugMode public setReferenceDebugMode(on: Boolean)
When set to true, the system will keep a list of active COM objects that are allocated but not yet released since this method was invoked.
setStringArrayMemberValue public setStringArrayMemberValue(mIndex: String, index: Int, value: String)
sets the value of a 1D string array member
public setStringArrayMemberValue(mIndex: String, index: Array<Int>, value: String)
sets the value of a string array member
setStringMemberValue public setStringMemberValue(mIndex: String, value: String)
sets the value of a string member
toFile public toFile(mIndex: String, fileName: String, encoding: String)
write a file member to a file
toFileAbsolute public toFileAbsolute(mIndex: String, fileName: String, encoding: String)
write a file member to a file without validating the variable
toString public toString(): String
Converts the variable value to a string representation.
toStringAbsolute public toStringAbsolute(): String
Converts the variable value to a string representation.
toXML public toXML(): String
validate public validate()
Causes the scheduler to get a valid value for this variable.

Connect with Ansys