// =========================================================================== // Copyright 2018 Autodesk, Inc. All rights reserved. // // Use of this software is subject to the terms of the Autodesk license // agreement provided at the time of installation or download, or which // otherwise accompanies this software in either electronic or hard copy form. // =========================================================================== // // // Creation Date: 14 July 1996 // // Procedure Name: // listHistoryShapes // // Description: // Given an object, get all the shapes under it and give the history // chain for all of those (including the object itself). // // If you specify positive $levels, that is how many levels of // recursion you will get; if you want all the nodes, give it -1. // // Note that the results will get appended to the array, so if // you have something in $result array and you want it overwritten, // make sure you use clear(). // // If the original is a shape, you get its chain only once; if its // a transform, you get the chain for the transform and all of the // shapes under it. // // Return Value: // Number of nodes found. // global proc int listHistoryShapes( string $original, string $result[], int $levels ) { $result = `listHistory -il 1 -lv $levels -bf -lf true $original`; return size($result); }