Namespace:
Autodesk.Revit.DB
ProjectInfo
Class
Description:
An object that represents a Project Information within the Autodesk Revit project.
An object that represents a Project Information within the Autodesk Revit project.
Remarks:
This object derived from the Element base object and such supports all the methods of that object such as the ability to retrieve the parameters of that object.
This object derived from the Element base object and such supports all the methods of that object such as the ability to retrieve the parameters of that object.
Examples
ProjectInfo projectInfo = document.ProjectInformation;
if (null != projectInfo)
{
string message = "Project information:";
//get the project name
message += "\nName: " + projectInfo.Name;
string newName = "My project";
//set the project name
projectInfo.Name = newName;
message += "\nProject Name after set: " + projectInfo.Name;
//get the project number
message += "\nNumber: " + projectInfo.Number;
string newNumber = "TestNumber";
//set the project number
projectInfo.Number = newNumber;
message += "\nProject Number after set: " + projectInfo.Number;
//get the status of the project
message += "\nStatus: " + projectInfo.Status;
string newStatus = "TestStatus";
//set the project status
projectInfo.Status = newStatus;
message += "\nProject status after set: " + projectInfo.Status;
//get the address of the project
message += "\nAddress: " + projectInfo.Address;
string newAddress = "TestAddress";
//set the project address
projectInfo.Address = newAddress;
message += "\nProject address after set: " + projectInfo.Address;
//get the client name of the project
message += "\nClient Name: " + projectInfo.ClientName;
string newClient = "TestClientName";
//set the client name
projectInfo.ClientName = newClient;
message += "\nProject client name after set: " + projectInfo.ClientName;
//get the gbXmlSetting of the project
EnergyDataSettings energyDataSetting = EnergyDataSettings.GetFromDocument(document);
message += "\nBuilding type: " + energyDataSetting.BuildingType.ToString();
TaskDialog.Show("Revit",message);
}