Developer Documentation Library > Data Model > Accessing the UNICOM Intelligence Data Model > Working with the Metadata Model > MDM custom properties > Setting UNICOM Intelligence Interviewer - Paper looks in the MDM Document
 
Setting UNICOM Intelligence Interviewer - Paper looks in the MDM Document
UNICOM Intelligence Interviewer - Paper formats paper questionnaires quickly and easily, taking advantage of the features of Microsoft Word. Central to UNICOM Intelligence Interviewer - Paper are looks and look groups.
A look is a blueprint for how questionnaire items are to appear in a printed questionnaire. A look controls which information that is held in the metadata for the questionnaire item is displayed, and how that information is positioned and formatted. You can think of looks as templates for the questionnaire items.
A look group is a collection of looks that are designed to be used together to format a questionnaire.
UNICOM Intelligence Interviewer - Paper stores look information in custom properties. The look group that has been applied to the specified routing context is stored in a custom property of the routing context called LookGroup, and the looks that are applied to individual questions and information items are stored in a variable-level custom property called LookName.
Example: Displaying the look and look group custom properties
The following mrScriptBasic code provides an example of displaying the look and look group custom properties stored in an MDM Document after it has been used with UNICOM Intelligence Interviewer - Paper:
Dim MyDocument, MyVariable, MyObject, LookName

Set MyDocument = CreateObject("MDM.Document")

MyDocument.Open("C:\Program Files\IBM\SPSS\DataCollection\7\DDL\Data\Mdd\museum_qq.mdd", , _
MDMLib.openConstants.oREAD)

Debug.Log("Look group: " + MyDocument.RoutingContexts.Item["Paper"].Properties["LookGroup"]["Question"])

For Each MyObject In MyDocument.Fields
If MyObject.ObjectTypeValue = MDMLib.ObjectTypesConstants.mtClass Then
For Each MyVariable In MyObject.Fields
LookName = MyVariable.Properties["LookName"]["Question"]
If LookName <> "" Then
Debug.Log(MyVariable.Name + ": " + LookName)
End If
Next
Else
LookName = MyObject.Properties["LookName"]["Question"]
Debug.Log(MyObject.Name + ": " + LookName)
End If
Next
Here are the first lines of some typical output. You see the custom property values only if you have previously used the museum_qq.mdd sample Document with UNICOM Intelligence Interviewer - Paper.
Look group: Contemporary
Serial: Contemporary::Numeric Box:
title: Contemporary::Statement:
head1: Contemporary::Statement:
entranc: Contemporary::1 Column Narrow:
intro: Contemporary::Statement:
gender: Contemporary::1 Column Narrow:
age: Contemporary::1 Column Narrow:
educati: Contemporary::1 Column Narrow:
school: Contemporary::1 Column Narrow:
biology: Contemporary::1 Column Narrow:
certifi: Contemporary::1 Column Narrow:
before: Contemporary::1 Column Narrow:
visits: Contemporary::Numeric Box:
Example: Changing the look or look group that is applied
Sometimes you might want to change the look group applied to a document or the looks applied to particular questions outside of UNICOM Intelligence Interviewer - Paper. The following mrScriptBasic example sets the LookName custom property on the interes question to the 2 Column look in the Contemporary look group. This means that the next time you open the Document in UNICOM Intelligence Interviewer - Paper, this look is automatically applied to the question:
Dim MyDocument, MyVariable

Set MyDocument = CreateObject("MDM.Document")

MyDocument.Open("C:\Program Files\IBM\SPSS\DataCollection\7\DDL\Data\Mdd\museum_qq.mdd", , _
MDMLib.openConstants.oREADWRITE)

Set MyVariable = MyDocument.Fields["interes"]
MyVariable.Properties.Item["LookName"]["Question"] = "Contemporary::2 Column:"

MyDocument.Save("C:\Program Files\IBM\SPSS\DataCollection\7\DDL\Output\museum_qq.mdd")
MyDocument.Close()
Hiding categories that are not valid for UNICOM Intelligence Interviewer - Paper
To hide categories that are not valid for Paper, create a HideInPaper custom property in the Question context, and then set its value to True.
See also
MDM custom properties
Custom properties in use in UNICOM Intelligence products
Creating and reading custom properties
Working with the Metadata Model