/*
This example demonstrates how to remove an ActionDelta
*/
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 );
// Add the Delta object
var oDelta = AddDelta(oCube.Model);
// Translate the 3D Objects
Translate(oCube, 3.0, 3.0, 0.0, siRelative, siView, siObj, siXYZ, null, null, null, null, null, null, null, null, null, 0, null);
// Remove the Action of type siModificationDeltaStaticValue
oDelta.RemoveAction(siModificationDeltaStaticValue);
// Revert the modification
UpdateReferencedModel(oCube.Model); |