Macro Language Reference > Macros > Frame > tfmk
  
tfmk
Description
Switches PTC ALD into new frame mode. This changes the mouse cursor to a new frame cursor , which can then be dragged to create a new frame. Clicking the mouse on any other icon returns PTC ALD to normal mode. The macro can also be entered with parameters to draw a new frame of a particular size at a specified position on the page.
* 
When used without any parameters, tfmk is always the last macro to be executed if there are several macros to be carried out. This means that you cannot, for instance, say tfmk:tft "_" . The Draw new frame and... extensions script supplied with PTC ALD uses a script loop to achieve this feature.
 
Example 124. Create a frame of a specified size and position
The example below will make a 30mm x 30mm frame, positioned at 20pt across and 20pt down on the page:
tfmk 20pt,20pt,30mm,30mm
 
Example 125. Create a named frame from an anonymous frame
The steps in this example will created a named frame called “Content Frame” and add it to a page layer.
1. Create a frame on a page in the usual manner, either by using the tfmk macro with size and position parameters, or by drawing one out. Assign a text stream to the frame. Here you have created the anonymous frame.
2. Invoke the tfmk macro again, using the > option, to create a named frame from the anonymous one:
tfmk >"ContentFrame"
The frame is displayed with the name ContentFrame in the frame information bar.
A new .fr tag called ContentFrame has been created within the template. It contains information about the frame size and position, the text stream, columns, etc.
3. Delete the named frame from the current page.
4. Select an empty layer, or ensure the <page> layer is selected and that it does not contain the frame ContentFrame.
5. Invoke the tfmk macro again to add the frame to the selected layer:
tfmk "ContentFrame"
The named frame will appear on the selected layer.
Syntax
tfmk ( ( ( *:L ) | ( :L ) )? name:t )? ( ( left:uh top:uv )? width:uh height:uv )?
*
Indicates that the frame control stream tag name that follows should be read and used as a template, and the frame instance that is created will not maintain any association with the tag.
For example:
tfmk *"name"
The top, left, width and height parameters can be used together with the *"name" to modify the templated frame before it is placed on the layer.
>
Indicates that a new named frame (a frame control stream) is to be created from the currently selected frame, and this frame will then be replaced on the layer by an instance of the named frame. If the target named frame already exists it will be overwritten with the new frame (without warning); if the tag name already exists and is a different type, a dialog box in which you can enter a different name will appear.
For example:
tfmk >"name"
If the name is an empty string (i.e. "") and the currently selected frame is a named frame, the named frame will be replaced on the layer by an anonymous template copy of it, breaking the connection with the named frame; the named frame itself will be unchanged.
For example:
tfmk >""
name
The tag name of frame control stream. If there is a preceding > character, this will be the tag name to create and write to. If not, it will be the tag name to use to create an instance of the frame on the currently selected layer.
Must be declared in double quotes.
For example:
tfmk "name"
left
The horizontal distance from the left page edge to the left edge of the new frame
top
The vertical distance from the top page edge to the top edge of the new frame
width
The width of the new frame
height
The height of the new frame
Additional Information
If a unit of measurement is not specified for the position and size of the frame, PTC ALD will default to the current document unit setting, as set in tdpref.
* 
You can specify a set of default attributes for each frame drawn with this macro. To do this you will need to create a pasteboard called "_fdef_tfmk" using the tpboard macro. Draw a frame on this pasteboard with the required attributes, e.g. background colour, frame rules, and subsequent frames drawn on the page will also have these attributes.
For more information, see Reference Chapter: System Variables.
Related Links