Hi Klaus

Thank you very much. It works great!

IOU.

Cheers

-- 
Yves Barbion • Managing Director • Adobe-Certified FrameMaker Instructor
www.scripto.nu  • skype: yves.barbion  • T: +32 494 12 01 89



On Wed, Apr 8, 2009 at 7:54 PM, Klaus Mueller <[email protected]> wrote:

> Hello Yves,
>
> > Does anyone have a Framescript he/she wishes to
> > share which removes all images from the frames,
> > but which also leaves the AFrames intact?
>
> Find attached the script RemoveGraphicInsets.fsl
> that removes all copied graphics from the current
> document.
> Optionally it deletes also referenced graphics.
> (-> Set gvRemoveReferencedGraphics = True;)
>
> Kind regards,
> Klaus
>
>
> snip  8< - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
>
> //-- Removes graphics from the current doc.
> //-- v0.1, 2009-04-08
> //-- Klaus Müller, itl AG
>
> //-- Remove not only copied insets,
> //-- but also referenced graphics:
> Set gvRemoveReferencedGraphics = False;
>
> Set gvDoc = ActiveDoc;
> If (not gvDoc) LeaveSub; EndIf
>
> //-- Collect graphic insets:
> New IntList NewVar(lvInsetObjList);
> Set lvGraphic = gvDoc.FirstGraphicInDoc;
> Loop While(lvGraphic)
>  If (lvGraphic.ObjectName = 'Inset')
>    If (lvGraphic.InsetFile = '' or gvRemoveReferencedGraphics)
>      New Integer Value(lvGraphic) NewVar(lvInt);
>      Add Member(lvInt) To(lvInsetObjList);
>    EndIf
>  EndIf
>  Set lvGraphic = lvGraphic.NextGraphicInDoc;
> EndLoop
>
> //-- No graphics ...
> If (lvInsetObjList.Count = 0)
>  If (gvRemoveReferencedGraphics)
>    Display 'No graphics found.';
>  Else
>    Display 'No copied graphics found.';
>  EndIf
>  LeaveSub;
> EndIf
>
> //-- Really?
> MsgBox 'Remove '+lvInsetObjList.Count+' graphics '+
>  'from the current document?' Button(lvButton) Mode(YesNo);
> If (lvButton = NoButton) LeaveSub; EndIf
>
> //-- Delete graphics:
> Loop While(lvi <= lvInsetObjList.Count) LoopVar(lvi) InitVal(1) Incr(1)
>  Get Member Number(lvi) From(lvInsetObjList) NewVar(lvInt);
>  New Object IntValue(lvInt) DocObject(gvDoc) NewVar(lvGraphic);
>  Delete Object(lvGraphic);
> EndLoop
>
> snip  8< - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
>
>
>
> //-- Removes graphics from the current doc.
> //-- v0.1, 2009-04-08
> //-- Klaus Müller, itl AG
>
> //-- Remove not only copied insets,
> //-- but also referenced graphics:
> Set gvRemoveReferencedGraphics = False;
>
> Set gvDoc = ActiveDoc;
> If (not gvDoc) LeaveSub; EndIf
>
> //-- Collect graphic insets:
> New IntList NewVar(lvInsetObjList);
> Set lvGraphic = gvDoc.FirstGraphicInDoc;
> Loop While(lvGraphic)
>  If (lvGraphic.ObjectName = 'Inset')
>    If (lvGraphic.InsetFile = '' or gvRemoveReferencedGraphics)
>      New Integer Value(lvGraphic) NewVar(lvInt);
>      Add Member(lvInt) To(lvInsetObjList);
>    EndIf
>  EndIf
>  Set lvGraphic = lvGraphic.NextGraphicInDoc;
> EndLoop
>
> //-- No graphics ...
> If (lvInsetObjList.Count = 0)
>  If (gvRemoveReferencedGraphics)
>    Display 'No graphics found.';
>  Else
>    Display 'No copied graphics found.';
>  EndIf
>  LeaveSub;
> EndIf
>
> //-- Really?
> MsgBox 'Remove '+lvInsetObjList.Count+' graphics '+
>  'from the current document?' Button(lvButton) Mode(YesNo);
> If (lvButton = NoButton) LeaveSub; EndIf
>
> //-- Delete graphics:
> Loop While(lvi <= lvInsetObjList.Count) LoopVar(lvi) InitVal(1) Incr(1)
>  Get Member Number(lvi) From(lvInsetObjList) NewVar(lvInt);
>  New Object IntValue(lvInt) DocObject(gvDoc) NewVar(lvGraphic);
>  Delete Object(lvGraphic);
> EndLoop
>
>
_______________________________________________


You are currently subscribed to Framers as [email protected].

Send list messages to [email protected].

To unsubscribe send a blank email to 
[email protected]
or visit 
http://lists.frameusers.com/mailman/options/framers/archive%40mail-archive.com

Send administrative questions to [email protected]. Visit
http://www.frameusers.com/ for more resources and info.

Reply via email to