APSF //- Set a given field in the plan document to a given value, for either all objects or just (un)highlighted objects. //- //- Paul Rodman, July 2008 //- //- V1.0 24 July 2008 //- Initial release dim which,field,i as integer dim fields(-1),s,value as string dim ok as boolean SetChoiceParameter("Objects to process",which,"All objects","Highlighted objects only","UnHighlighted objects only") fields.Append "ID" fields.Append "Name" fields.Append "Type" fields.Append "Spectral" fields.Append "Notes" for i=1 to 4 s="User "+Str(i) if Userheading(i)<>s then s=s+" ("+UserHeading(i)+")" fields.Append s next SetPopupParameter("Field to change",field,fields) SetStringParameter("Value",value) if not EditParameters("Set Plan Field") then return which=GetChoiceParameter("Objects to process") field=GetPopupParameter("Field to change") value=GetStringParameter("Value") for i=1 to nObjects ok=true select case which case 1 // Highlighted ok=Obj(i).IsHighlighted case 2 ok=not Obj(i).IsHighlighted end select if ok then select case field case 0 Obj(i).ID=value case 1 Obj(i).Name=value case 2 Obj(i).Type=value case 3 Obj(i).Spectral=value case 4 Obj(i).Notes=value else Obj(i).User(i-4)=value end select end if next