Jump to: navigation, search

Difference between revisions of "Activity:AssignToNamedRelation (Activity)"


Line 18: Line 18:
 
! Argument !! Type !! Direction !! Purpose  
 
! Argument !! Type !! Direction !! Purpose  
 
|- align="left"
 
|- align="left"
| Parent || RelationalObject || In || The parent object
+
| Parent || [[RelationalObject]] || In || The parent object
 
|- align="left"
 
|- align="left"
 
| RelationName || {{String_MSDN}}|| In || The name of the relation to be searched for at the parent object
 
| RelationName || {{String_MSDN}}|| In || The name of the relation to be searched for at the parent object
 
|- align="left"
 
|- align="left"
| Child || RelationalObject || In || The child to relate
+
| Child || [[RelationalObject]] || In || The child to relate
 
|- align="left"
 
|- align="left"
| RelationData|| RelationData || Out || The created relation data object, null if failed
+
| RelationData|| [[RelationData]] || Out || The created relation data object, null if failed
 
|- align="left"
 
|- align="left"
 
| Result|| {{Boolean_MSDN}}|| Out || True if successful, false if failed
 
| Result|| {{Boolean_MSDN}}|| Out || True if successful, false if failed

Revision as of 14:46, 8 January 2015

The AssignedToNamedRelation activity assigns a child objec via the name of an existing Relation to a given parent object.

Assign To Named Relation
Name AssignToNamedRelation
Purpose Relate child object to parent object
Category Object Primitives
Returns True if successful
Version 2.1.15+

Arguments

Argument Type Direction Purpose
Parent RelationalObject In The parent object
RelationName String In The name of the relation to be searched for at the parent object
Child RelationalObject In The child to relate
RelationData RelationData Out The created relation data object, null if failed
Result Boolean Out True if successful, false if failed

Usage

This activity is used to find a certain relation at the parent object via the name and then relate the child object to it.

Example

Load the MetaClass named PUMP, also load the MetaProperty NOMINALPOWER from the property pool and then add it to the MetaClasses' properties:


Argument Value
Parent
UBIKObject.Environment _
.GetSystemMetaClass(SystemObjects.METACLASS) _
.AllInstances("PUMP")
RelationName
"SYSREL_METAPROPERTY"
Child
UBIKObject.Environment _
.GetSystemMetaClass(SystemObjects.POOL_METAPROPERTY) _
.GetMetaProperty("NOMINALPOWER")

See also