home *** CD-ROM | disk | FTP | other *** search
- /* Duplicate & Rotate the currently selected object 90degrees, 5 at a time
-
- You MUST have an object selected before running this
-
- Copyright 1997 by TrueSpectra Inc.
-
- This code is provided purely for demonstration purposes and is not
- supported or under warranty. Feel free to modify and examine this
- example script for your own purposes.
-
- */
-
- /* rotate by 5 degrees to 90 = 18 times */
- Do count = 1 to 18
-
- /* what is selected? */
- object = CwGetSelectedObject()
-
- /* duplicate the object */
- newobject = CwDuplicateObject(object)
-
- /* where is the selected object currently */
- call CwGetPosition newobject, position
-
- /* calculate the new angle */
- rotate = position.Rotation + (5 * count)
-
- /* rotate the new object */
- call CwSetPosition newobject, position.x, position.y, position.width,,
- position.height, rotate, position.XShear
-
- end
-