ExternalCommandDataJournalData Property |
A data map that can be used to read and write data to the Autodesk Revit journal file.
Namespace: Autodesk.Revit.UIAssembly: RevitAPIUI (in RevitAPIUI.dll) Version: 25.0.0.0 (25.0.0.0)
Syntaxpublic IDictionary<string, string> JournalData { get; set; }
Public Property JournalData As IDictionary(Of String, String)
Get
Set
public:
property IDictionary<String^, String^>^ JournalData {
IDictionary<String^, String^>^ get ();
void set (IDictionary<String^, String^>^ value);
}
member JournalData : IDictionary<string, string> with get, set
Property Value
IDictionaryString,
String
RemarksThe data map is a string to string map that can be used to store data in the Revit journal
file at the end of execution of the external command. If the command is then executed from the journal
file during playback this data is then passed to the external command in this Data property so the
external command can execute with this passed data in a UI-less mode, hence providing non interactive
journal playback for automated testing purposes. For more information on Revit's journaling features
contact the Autodesk Developer Network.
Examplevoid WriteJournalData(ExternalCommandData commandData)
{
IDictionary<String, String> dataMap = commandData.JournalData;
dataMap.Clear();
dataMap.Add("Name", "Autodesk.Revit");
dataMap.Add("Information", "This is an example.");
dataMap.Add("Greeting", "Hello Everyone.");
}
void ReadJournalData(ExternalCommandData commandData)
{
IDictionary<String, String> dataMap = commandData.JournalData;
String prompt = "Name: " + dataMap["Name"];
prompt += "\nInformation: " + dataMap["Information"];
prompt += "\nGreeting: " + dataMap["Greeting"];
TaskDialog.Show("Revit",prompt);
}
Private Sub WriteJournalData(commandData As ExternalCommandData)
Dim dataMap As IDictionary(Of [String], [String]) = commandData.JournalData
dataMap.Clear()
dataMap.Add("Name", "Autodesk.Revit")
dataMap.Add("Information", "This is an example.")
dataMap.Add("Greeting", "Hello Everyone.")
End Sub
Private Sub ReadJournalData(commandData As ExternalCommandData)
Dim dataMap As IDictionary(Of [String], [String]) = commandData.JournalData
Dim prompt As [String] = "Name: " & dataMap("Name")
prompt += vbLf & "Information: " & dataMap("Information")
prompt += vbLf & "Greeting: " & dataMap("Greeting")
TaskDialog.Show("Revit", prompt)
End Sub
No code example is currently available or this language may not be supported.
No code example is currently available or this language may not be supported.
See Also