Delta.Target

Description

Sets or returns the name of the reference model associated to this Delta as a String.

C# Syntax

// get accessor

String rtn = Delta.Target;

// set accessor

Delta.Target = String;

Examples

JScript Example

/*

	This example demonstrates how to change the target reference container

*/

NewScene(null, false);

// Create a reference model from a cube

var oRoot = Application.ActiveProject.ActiveScene.Root;

var oCube = oRoot.AddGeometry("Cube", "MeshSurface");

var emdlFileRefModel = XSIUtils.BuildPath(Application.InstallationPath(siProjectPath), "Models", "MyModel.emdl"); 

CreateModelAndConvertToRef(oCube, emdlFileRefModel );

// Create a cone

var oCone = oRoot.AddGeometry("Cone", "MeshSurface", "Proxy3DObj");

// Create a reference model

var emdlFileRefModel1 = Application.InstallationPath(siProjectPath) + "/Models/MyModel1.emdl";

CreateModelAndConvertToRef(oCone, emdlFileRefModel1);

// Add the Delta object

var oDelta = AddDelta(oCube.Model);

// Add an action of type siModificationDeltaStaticValue

var oDeltaAction = oDelta.AddAction(siModificationDeltaStaticValue);

// Add the Static value item	

var oActionDeltaItem = oDeltaAction.AddStaticValueItem(oCube + ".kine.global.posx", 10);

// Change the target reference container

oDelta.Target = oCone.Model.Name;

// Update the reference

UpdateReferencedModel(oCone.Model.Name + "," + oCube.Model.Name);