1 Reply Latest reply on Jun 20, 2017 6:18 PM by philmodjunk

    Import or Copy a layout form ?

    Fulvio Di Rosa

      Can i import or copy a Layout form from a fmp12 database to an other and after change every table/fields/triggers references to new value but saving all graphics created in original ?

        • 1. Re: Import or Copy a layout form ?
          philmodjunk

          You cannot copy or import a layout. You can select all objects on a layout, change to a different layout in the same or a different file and paste the copied objects. This does not reproduce the same set of layout parts or their dimensions and the table occurrence context and the fields present in the tables are not likely to be the same. Neither does this copy over value lists or any scripts that triggers or buttons perform.

           

          So, with care, it can be done, but there are limits and you usually have to do some repair to the pasted layout objects before it's fully functional.

           

          1. A generalized outline that minimizes the "fixes" needed:
          2. If pasting to a new file, replicate any value lists needed first.
          3. Copy and paste all layout objects and paste to the target layout. Do not try to fix anything or even position them accurately.
          4. Identify and import each and every script performed by any trigger or button on the layout.
          5. Now delete the pasted objects. You pasted them so that any scripted references to layout objects didn't break when they were imported.
          6. Use the inspector's position tab to determine the height of each layout part. Go to the target layout and set up corresponding layout parts exactly the same height as the original.
          7. Go into Manage Database in the target layout and, if needed, rename the target layout's table occurrence to be exactly the same as the source layout's. Rename any fields in the associated table to match as well. You can change these names back when done.
          8. Now select all layout objects and copy. If you can't see the top and left values for the selected objects on the inspector's position tab, group your objects and note these values.
          9. Paste the objects onto the target layout and again use the inspector to reproduce the same top and left values. Again, with most versions except 16, you'll need to temporarily group the pasted objects to see and adjust their position.

           

          Now test your layout and fix anything that doesn't work.