Hide Table of Contents

Custom Animation XML Example

This topic provides an example of XML code created for a custom animation. To create your own custom animations, you must be proficient in XML.

Tip: In larger companies, this task could be devoted to a documentation architect.

Important: Before reading this, make sure that you understand the concepts described in About the Animation Library.

This page discusses:

Basic Concepts

Each animation group corresponds to a dedicated folder in your Animation Library folder. Each folder stores a number of XML files that make up the animations of the group. Each XML file defines a single animation. An animation is created in the XML file using the single <Step> element.

For each animation/step, you can specify:

  • whether or not to allow the user to modify the property values in the Animation Library workshop.
  • whether or not to make the angle, axis, and distance properties of animated actors editable in the Animation Library workshop, when property values are not modifiable.
  • whether to hide or to show the Start time and End time property values in the Animation Library workshop.

An animation/step can have one or several motions. Individual motions are pre-defined, and each motion has a set of pre-defined properties.

Tip: For ease of use, it is recommended to reuse the content of individual <Motion> elements (with the whole property set) from the pre-defined XML files provided by default in the Animation Library. You can customize the values of each property of the property set. Examples of reusable <Motion> elements are highlighted in the XML code example below.

XML Code Example

Here are examples of XML codes that you could write to create a custom animation called "Review", and to be able to mirror it.



Code Description

The XML elements shown in the code example above are described here.

<Step>
Creates an animation. Parameters are as follows:
Name: Text displayed to identify the animation in the Animation Library workshop.
ReadOnly: Specifies whether or not to allow the user to modify the property values in the Animation Library workshop.
  • "0": Allows the user to modify the property values.
  • "1": Prevents the user from modifying the property values.
(Optional) MakeAngleAxisDistPtEditable: Specifies whether or not to make the angle, axis, distance, and point properties of animated actors editable in the Animation Library workshop, when ReadOnly is set to "1".
  • "0": Prevents the user from modifying the angle, axis, distance, and point properties of animated actors.
  • "1": Allows the user to modify the angle, axis, distance, and point properties of animated actors.
ShowStartEnd: For each motion of the animation, specifies whether to hide or to show the Start time and End time property values in the Animation Library workshop.
  • "0": Hides Start time and End time.
  • "1": Shows Start time and End time.
<Modifiables>
Introduces the various motions that make up the animation. Standalone, compulsory element.
<Motions>
Introduces the individual motions that make up the animation.
<Motion>
Creates an individual motion within the animation. Each motion has the following parameter:
Name: Text displayed to identify the motion in the Animation Library workshop.
(Optional) ApplyWhenMirrored: For each motion of the animation, specifies whether or not to ignore the original animation definition and to use the motion definition described in the mirrored XML.
  • "0": Applies the original animation definition in the mirrored XML.
  • "1": Ignores the original animation definition and uses the motion definition described in the mirrored XML.
(Optional) Defined: For the Motion.Color property of the Flash and SetColor motions, specifies whether or not to change the color of the selected actor during this step of the animation.
  • "0": Sets the color to Undefined.
  • "1": Takes the RGB values into account.
Note: If you do not specify a Defined parameter, the RGB values are taken into account.
<PropSet>
Introduces the property set of the motion.
<Motion.XXX>
Defines each property of the motion, using one or several parameters.
<Links>
(Optional) Defines a link type to other animations.
Note: If you do not use this XML element, there is no mirrored version of this animation.
<Mirror>
(Optional) Creates a mirror link type. Parameters are as follows:
FolderName: Name of the folder where the XML file describing the animation to mirror is located.
FileName: Name of the XML file describing the animation to mirror.
Note: Both the FolderName and FileName parameters are case-sensitive.


Provide feedback on this topic

SOLIDWORKS welcomes your feedback concerning the presentation, accuracy, and thoroughness of the documentation. Use the form below to send your comments and suggestions about this topic directly to our documentation team. The documentation team cannot answer technical support questions. Click here for information about technical support.

* Required

 
*Email:  
Subject:   Feedback on Help Topics
Page:   Custom Animation XML Example
*Comment:  
*   I acknowledge I have read and I hereby accept the privacy policy under which my Personal Data will be used by Dassault Systèmes

Print Topic

Select the scope of content to print:




x

We have detected you are using a browser version older than Internet Explorer 7. For optimized display, we suggest upgrading your browser to Internet Explorer 7 or newer.

 Never show this message again
x

Web Help Content Version: SOLIDWORKS Composer 2024 SP02

To disable Web help from within SOLIDWORKS and use local help instead, click Help > Use SOLIDWORKS Web Help.

To report problems encountered with the Web help interface and search, contact your local support representative. To provide feedback on individual help topics, use the “Feedback on this topic” link on the individual topic page.