How to: Use "M" to Create Custom Icons and Display Names

[This is prerelease documentation and is subject to change in future releases. Blank topics are included as placeholders.]

To configure a new data experience for Microsoft code name “Quadrant”, you can use Microsoft code name “M” to create new icons. Using “M”, you can also customize the display names of entities.

To create a new extent

  1. Open the Ipad.exe (Intellipad) tool.

  2. Copy and paste the following code into the application.

    module TaskAndPersonModule
    {
        Tasks : Task* 
        {
            {Name => "Complete Work-Items",      
               Estimate => 2,
               DueDate=>2009-02-25,
               Owner => People.KimA
             },
            {Name => "Write Design Documents",   
               Estimate => 1,
               DueDate=>2009-02-25,
               Owner => People.JeffH
            }
        }
    
        People : Person*
        {
            KimA    {FirstName => "Kim",     
                            LastName => "Akers",
                            Alias => "KimA",
                            Discipline => "Developer"
             },
            JeffH   {FirstName => "Jeff",    
                           LastName => "Hay",
                            Alias => "JeffH",
                             Discipline => "Test"
            },
            SimonP  {FirstName => "Tude",   
                               LastName => "Palma",
                               Alias => "TPalma",      
                               Discipline => "PM"
                           }
        }
    
        type Task
        {
            Name : Text => "Enter a Task";
            Estimate : Double?;
            DueDate : Date?;
            Owner : People;
            Id : Integer64 => AutoNumber();
        } where identity Id;
    
        type Person
        {
            FirstName : Text?;
            LastName : Text?;
            Alias : Text?;
            Discipline : Text?;
            Id : Integer64 => AutoNumber();
        } where identity Id;
    }
    
  3. Save the file as TasksAndPeople.m.

  4. Open a command prompt (Cmd.exe), and set the path to the installation path of the “Oslo” binary files.

    set PATH=%PATH%;"c:\Program Files\Microsoft Oslo\1.0\bin"
    
  5. Build the model using the following command line:

    m.exe TasksAndPeople.m -target:Repository
    
  6. Use the output from the command with the next command line:

    mx.exe install TasksAndPeople.mx -database:Repository
    

To create the configuration

  1. In the Ipad.exe application, paste the following code.

    The CustomGeometryPath value was generated using Microsoft Expression Blend to create a new icon.

    /*
    Create a ViewerHint for Tasks
    */
    
    module Quadrant.SchemaExtensions
    {
       import Quadrant.SchemaExtensions;
    
       // Viewer Hint
       ViewerHintCatalogTypes
       {
          ViewerHintForTasks
          {
             Host => ".",
             CatalogName => "Repository",
             SchemaName => "TaskAndPersonModule",
             TypeOrAssociationName => "Tasks",
             ViewerHint =>
             {
                DescriptionProperty => "Name",
                GroupingProperty => "",
                SpatialProperty => "",
                StaticEntityIcon => 
                {
                   Name => "TaskIcon",
                   Geometry => "Custom",
                   Fill => "Red",
                   DashStyle => "Solid",
                   StrokeColor => "Black",
                   StrokeThickness => 0.0E0,
                   CustomGeometryPath => @"F1M431.097,1216.2L463.918,1216.2 463.919,1248.2 452.534,1248.2 
                   452.534,1240.2 442.483,1240.2 442.483,1248.2 431.098,1248.2 431.097,1216.2z M434.38,1219.72L434.38,1225.98 
                   440.637,1225.98 440.637,1219.72 434.38,1219.72z M444.38,1219.72L444.38,1225.98 450.637,1225.98 450.637,
                   1219.72 444.38,1219.72z M454.38,1219.72L454.38,1225.98 460.637,1225.98 460.637,1219.72 454.38,1219.72z 
                   M434.38,1229.28L434.38,1235.53 440.637,1235.53 440.637,1229.28 434.38,1229.28z M444.38,1229.28L444.38,
                   1235.53 450.637,1235.53 450.637,1229.28 444.38,1229.28z M454.38,1229.28L454.38,1235.53 460.637,1235.53 
                   460.637,1229.28 454.38,1229.28z"
                }                               
             }         
          }
       }
    }
    
  2. Save the file as TasksAndPeopleConfiguration.m.

  3. Build the model using the following command line. (The QuadrantModels.mx file referenced in the command is in the Oslo SDK binaries ("bin") folder.)

    m.exe TasksAndPeopleConfiguration.m -r:QuadrantModels.mx
    
  4. “Quadrant” configuration data is stored in the “Quadrant” repository, which has a computed name. To determine the name of the “Quadrant” repository, open “Quadrant” and on the Help menu, click Quadrant Repository Connection. The dialog shows Catalog= and the name of the database you should use for installing the configuration (*.mx) file.

  5. Install the configuration using the following command line. (Replace the <Quadrant repository name> parameter with the name found in the step 4.)

    mx.exe install TasksAndPeopleConfiguration.mx –database <Quadrant repository name>
    
  6. Close “Quadrant”.

    Adding data to the “Quadrant” schema will not be recognized unless “Quadrant” is restarted.

Viewing the data in "Quadrant"

After the new data experience has been compiled and the new schemas are in the repository, you can view the new data in “Quadrant”.

To view the new data

  1. Open “Quadrant”.

  2. Open the repository explorer.

  3. Expand the Catalog node.

  4. Expand the Microsoft.Samples node.

  5. Find the TasksAndPersonModule node.

  6. Click the TasksAndPersonModule node.

  7. From the right pane, drag and drop the Tasks icon to an empty space on the workspace. The new icon appears in each row.

  8. On the Edit menu, click Insert Item.

    A new row appears in the table with the default text "Enter a Task" in the Name column.

See Also

Concepts

Customizing the Data Viewing Experience

Fill out a survey about this topic for Microsoft.