'---------------------------------------------------------------- 'SCRIPT: avu-DocCloner 'PROJECT: gavos.apr, avcsus 'DATE: 03-07-96 'AUTHOR: John Ganter, Sandia National Labs, jganter@sandia.gov 'DESC: Clones any Document, requests new Name from user 'DESC2: cleaned-up version of pracCloner 'CALLED BY: [Clone] button 'CALL AS: av.Run("avu-DocCloner", "") 'ARG01: 'RETURNS: 'EXPECTS: an active Document 'CALLS TO: ''''2---------------------------------------------------------------- 'Setup theProj = av.GetProject toClone = av.GetActiveDoc 'Make sure this is a clonable class lstClass = {"View", "Script", "Table", "Chart", "Layout"} theClass = toClone.GetClass.GetClassName 'MsgBox.Info(theClass,"") If (lstClass.FindByValue(theClass) < 0) then exit end 'Get new name theMessage = "Name the new" ++ theClass newName = MsgBox.Input("New name:", theMessage, "") if (newname = nil) then exit end ' Clone and add to project newDoc = toClone.Clone newDoc.SetName(newName) theProj.AddDoc(newDoc) 'Make the new document active theProj.FindDoc(newName).GetWin.Open '----end of script---------------------------------------------------