2 Replies Latest reply on Jan 8, 2013 1:16 PM by bearnina

    Global changes to Anchored Frames?

    Art Campbell Level 3

      Has anyone run across a plug-in or FrameScript that applies the same set of global properties to all anchored frames in a file or book?


      I'm working on a legacy document and I need to change all anchored frames to have a 1 pt black rule, right align, have the same width, and be set to Below Current Line.
      Bonus points for setting the graphic inside to 0/0 offset.


      (ImpGraph does some of this for newly imported graphics, but this is applying changes to existing frames... more of a global S&R operation.)




        • 1. Re: Global changes to Anchored Frames?
          Michael Müller-Hillebrand-basb7I Level 2

          Hi Art,


          This is a really short script (without bonus points). Like this:


          Local lvObj lvDoc(ActiveDoc) lvCount(0) lvColor;

          Get Object DocObject(lvDoc) Type(Color) Name('Black') NewVar(lvColor);


          Set lvObj = lvDoc.FirstGraphicInDoc;

          Loop While(lvObj)

            If (lvObj.ObjectName = 'AFrame')

              Set lvCount = lvCount + 1;

              Set lvObj.Pen = FillBlack;

              Set lvObj.BorderWidth = 1; // metrics in pt

              Set lvObj.Color = lvColor;

              Set lvObj.Alignment = AlignRight;

              Set lvObj.AnchorType = AnchorBelow;

              Set lvObj.Width = 35mm;


            Set lvObj = lvObj.NextGraphicInDoc;

          Display '# of changes: ' + lvCount;
          Careful: Untested!
          - Michael

          • 2. Re: Global changes to Anchored Frames?
            bearnina Level 1

            Did anyone use this script with success? I need to re-align all the graphics in some docs to the left, but not make any other changes. I'm thinking I can use just the alignment command in this script to accomplish this.