기본 프로젝트 속성으로 작업합니다
기본 프로젝트 속성
Microsoft Project를 사용하면 사용자가 프로젝트 설정 프로세스 속도를 높이는 기본 프로젝트 속성을 설정할 수 있습니다. 기본 속성은 새 작업이 시작되고 마감되는시기를 정의하고 기본 연장 시간 및 표준 급여 요금 등을 설정합니다. C ++ 용 작업은 이러한 기능을 지원합니다.
Project는 프로젝트의 기본 속성을 관리하기위한 여러 속성을 노출시킵니다.
DefaultStartTime : 새 작업의 기본 시작 시간은 DateTime 값을 가져옵니다.
defaultFinishTime : 새로운 작업의 기본 마감 시간은 DateTime 값을 가져옵니다.
DefaultFixedCostaccral : 과제의 기본 고정 비용 발생은 CostaccrualType 열거로 정의 된 값 중 하나를 취합니다.
DefaultStandardRate : 기본 표준 급여 요율은 두 배를 차지합니다.
defaultovertimerate : 기본 초과 근무 수당은 두 배를 가져옵니다.
DefaultTaskevMethod : 기본 작업 획득 값 메소드는 exedValuemethodtype 열거로 정의 된 값 중 하나를 취합니다.
DefaultTaskType : 프로젝트의 기본 작업 유형은 taskType 열거로 정의 된 값 중 하나를 취합니다.
Microsoft Project의 기본 프로젝트 정보를 보려면 :
Open a project.
On the Tools menu, click Options.
Here, you can see the settings for the default standard and overtime rates.
Go to the Schedule tab.
Here, you can see the settings for the default task type and default task start time.
**Default project information in Microsoft Project, as written by Aspose.Tasks **
Reading Default Properties
The code example given below demonstrates how to read a project’s default properties and writes them to a console window.
1// The path to the documents directory.
2System::String dataDir = RunExamples::GetDataDir(System::Reflection::MethodBase::GetCurrentMethod(ASPOSE_CURRENT_FUNCTION)->get_DeclaringType().get_FullName());
3
4// Create project
5System::SharedPtr<Project> project = System::MakeObject<Project>(dataDir + u"DefaultProperties.mpp");
6
7// Display default properties
8System::Console::WriteLine(System::String(u"New Task Default Start: ") + project->Get<System::DateTime>(Prj::DefaultStartTime()).ToShortDateString());
9System::Console::WriteLine(System::String(u"New Task Default Type: ") + System::ObjectExt::ToString(project->Get<TaskType>(Prj::DefaultTaskType())));
10System::Console::WriteLine(System::String(u"Resouce Default Standard Rate: ") + System::Convert::ToString(project->Get<double>(Prj::DefaultStandardRate())));
11System::Console::WriteLine(System::String(u"Resource Default Overtime Rate: ") + System::Convert::ToString(project->Get<double>(Prj::DefaultOvertimeRate())));
12System::Console::WriteLine(System::String(u"Default Task EV Method: ") + System::ObjectExt::ToString(project->Get<EarnedValueMethodType>(Prj::DefaultTaskEVMethod())));
13System::Console::WriteLine(System::String(u"Default Cost Accrual: ") + System::ObjectExt::ToString(project->Get<CostAccrualType>(Prj::DefaultFixedCostAccrual())));
Writing Default Properties
The code example given below demonstrates how to set a project’s default properties.
1// The path to the documents directory.
2System::String dataDir = RunExamples::GetDataDir(System::Reflection::MethodBase::GetCurrentMethod(ASPOSE_CURRENT_FUNCTION)->get_DeclaringType().get_FullName());
3
4// Create a project instance and Set default properties
5System::SharedPtr<Project> project = System::MakeObject<Project>();
6project->Set<NullableBool>(Prj::ScheduleFromStart(), NullableBool::to_NullableBool(true));
7project->Set(Prj::StartDate(), System::DateTime::get_Now());
8project->Set(Prj::DefaultStartTime(), project->Get<System::DateTime>(Prj::StartDate()));
9project->Set<TaskType>(Prj::DefaultTaskType(), Aspose::Tasks::TaskType::FixedDuration);
10project->Set<double>(Prj::DefaultStandardRate(), 15.0);
11project->Set<double>(Prj::DefaultOvertimeRate(), 12.0);
12project->Set<EarnedValueMethodType>(Prj::DefaultTaskEVMethod(), Aspose::Tasks::EarnedValueMethodType::PercentComplete);
13project->Set<CostAccrualType>(Prj::DefaultFixedCostAccrual(), Aspose::Tasks::CostAccrualType::Prorated);
14
15// Save the project to XML format
16project->Save(dataDir + u"WriteDefaultProperties_out.xml", Aspose::Tasks::Saving::SaveFileFormat::XML);