MapInfo Products KnowledgeBase
Product:
MapInfo
Version:
4.x\5.x\6.x
Platform:
Win9x\NT\2000
Category:
Layout Window
Summary:
How to create a Layout template with a current date stamp.
Question:
Is it possible to create a layout window that when accessed, will display the current date?
Answer:
The procedure for this will involve creating a workspace template that consists of a blank layout with a date stamp. Once the workspace is created, it can then be used to set up maps for printing in other workspaces.
1. Choose Window>New Layout Window. Choose File>Page Setup to set the desired page size and orientation.
2. Choose File>New Table. In the New Table dialog, select Open New Mapper. Click Create.
3. In the New Table dialog, simply add a field called ID. The contents of the table are not important in this case. Next, click the Create button. When prompted to save the table, select a directory, and assign a name to the table like 'Date_Stamp'.
4. Once the new Map Window appears, the Date_Stamp layer should already be editable.
The next step involves creating a point object with no style that can be labeled with an expression that uses the MapBasic CurDate() function.
5. Choose Options>Symbol Style. In the Symbol style dialog, make the symbol type 'N' for None:
6. Once the symbol style has been set to None, click on the symbol push button tool
, and then click inside the blank Map Window. After clicking inside the Map Window (or dropping your invisible point), save the Date_Stamp table (File>Save Table).
7. Next, choose Map>Layer Control. Place a check in the Autolabel box and then click the Label button:
8. In the Date_Stamp Label Options dialog, click on the Label With drop down list box and choose Expression. Select or type in the CurDate() function. Click OK.
9. Back in the Date_Stamp Label Options dialog, select the desired font size and style. Click OK.
Now that the date appears in the Map Window:
the Map Window can be added to the blank layout as a frame.
10. Using the Frame tool
located in the Drawing tool pad, draw a frame on the layout in the desired location for the date to appear. When the Frame Object dialog comes up, make sure the window being added is the Date_Stamp Map. Click OK:
11. Lastly, choose File>Save Workspace. For easy distribution, save the workspace file in the same directory as the Date_Stamp table.
Now every time the workspace is opened, the layout will appear with the current date. Feel Free to add a logo as well!
Last Modified:
02/26/2004 09:33:41 AM
Document URL:
http://testdrive.mapinfo.com/techsupp/miprod.nsf/kbase_by_product/DCBA1A476A24948E85256A96007958E4
How to create a Layout template with a current date stamp.^DCBA1A476A24948E85256A96007958E4^Y