APSF,0,,-1,-1;-1;-1;-1;-1;-00;-00;-0;-;+;+1.5.3;-;;-3C.apcat|3rd Cambridge Radio Source Catalogue;-3C.apcat|3rd Cambridge Radio Source Catalogue;-3C.apcat|3rd Cambridge Radio Source Catalogue;+;+ ' ' Create new plan document with highlighted objects from ' the current plan document. ' ' By Michael Portuesi (mportuesi@yahoo.com). ' ' Home page: ' http:// www.jotabout.com/portuesi/astro/mixmaster.html ' ' $Id: MakePlanFromHighlighted.txt 42 2006-10-21 18:56:07Z portuesi $ ' dim sourcePlanIdx as Integer dim newPlanIdx as Integer dim newPlanTitle as String dim newPlanObject as APPlanObject dim sourcePlanObject as APPlanObject dim sourcePlanData as APPlanObjectData dim idx as Integer dim objectCount as Integer try ' Note current document sourcePlanIdx = CurrentPlanNumber() ' Create a new plan document newPlanIdx = NewPlan( "", false, true ) if ( newPlanIdx <= 0 ) then Print "Error: Could not create new document" return end if ' Iterate through 'current' document SelectPlan( sourcePlanIdx ) objectCount = nObjects for idx = 0 to objectCount ' Make sure we're referring to the source plan SelectPlan( sourcePlanIdx ) sourcePlanObject = Obj( idx ) ' Copy over highlighted objects to 'new' document if ( sourcePlanObject.IsHighlighted ) then ' "hold" data from the source object sourcePlanData = sourcePlanObject.Contents ' Go to new plan and make a new object SelectPlan( newPlanIdx ) newPlanObject = NewObject() ' copy source data to new object in new document newPlanObject.Contents = sourcePlanData ' TODO what to do about user observations. end if next idx Print "Make Plan From Highlighted processing complete." catch Print "Make Plan From Highlighted encountered an unexpected error while processing." end try