3D PLM PPR Hub Open Gateway |
Configuration Management |
Creating and Using MilestonesWorking with a program and milestones |
Use Case |
AbstractThis article discusses the CAAVpiMilestones use case. This use case explains how to create programs and milestones, and how to use them in Configuration Management. |
This use case is intended to help you make your first steps in programming the ENOVIA Configuration Management. Its main intent is to create a program and milestones, and use them in Configuration Management.
[Top]
CAAVpiMilestones is a use case of the CAAVPMInterfaces.edu framework that illustrates VPMInterfaces framework capabilities.
[Top]
The goal of CAAVpiMilestones case is to show how to use Configuration Management interfaces to create a program, that is, an entity that aggregates milestones. Using milestones in Configuration Management is then demonstrated. The effects of a milestone value's modification is explained.
More precisely CAAVpiMilestones:
[Top]
To launch CAAVpiMilestones, you will need to set up the build time environment, then compile CAAVpiMilestones along with its prerequisites, set up the run time environment, and then execute the use case [1].
Launch the use case as follows:
e:>CAAVpiMilestones |
$ CAAVpiMilestones |
[Top]
The CAAVpiMilestones use case is made of a single class named CAAVpiMilestones located in the CAAVpiMilestones.m module of the CAAVPMInterfaces.edu framework:
Windows | InstallRootDirectory\CAAVPMInterfaces.edu\CAAVpiMilestones.m\ |
Unix | InstallRootDirectory/CAAVPMInterfaces.edu/CAAVpiMilestones.m/ |
where InstallRootDirectory
is the directory where the CAA CD-ROM
is installed.
[Top]
There are six main steps in CAAVpiMilestones Code:
We will now comment each of these sections in detail.
[Top]
CAAVpiMilestones creates two simple product trees, made of one product root class (prefix is uidPRC), and under it, two item instances (prefix is uidII ). The creation process won't be detailed here, as it's not the purpose of this use case, but a prerequisite. Please refer to Product Structure samples to get more explanations about Product Structure management.
On each of this two product trees, a configurable root and a configurable view are created. Please refer to the use case Configuring a Product Structure [2] to get more information.
[Top]
... //--Create Program CATICfgProgram_var Program; CATUnicodeString ProgName("Program1"); ret = CfgManager->CreateProgram(ProgName,Program); if FAILED(ret) return ret; //--Create MileStone CATICfgMileStone_var MileStone1; CATUnicodeString name_MS1("MileStone1"); ret = Program->CreateMileStone(name_MS1,MileStone1); if FAILED(ret) return ret; ... |
The configuration manager is used to create a program. A program aggregates milestones under its unique name.
To create milestones, a smart pointer to CATICfgProgram is needed. Here, a milestone under "Program1" is created.
A milestone is a label referencing a value used in modification effectivities. It is useful to use a milestone instead of a real value, so as to quicker modify all the effectivities impacted by a value change.
[Top]
... //--Milestones Initialization. Creation of Normal Value is needed. CATICfgNormalValue_var NV1; int Range = 20; ret = CfgManager->CreateNormalValue(Range,Range,NV1); if FAILED(ret) return ret; ret = MileStone1->SetDefaultNV(NV1); if FAILED(ret) return ret; ... |
A milestone is initialized using a normal value and the SetDefaultNV
method.
A milestone can take different values, depending on the configurable root to which its program is attached.
It is thus possible to give a default value that will apply when attaching the program to the configurable root.
[Top]
... //--Program Attachement ret = ConfigurableRootA->AttachProgram(Program); if FAILED(ret) return ret; ... |
This essential step links the program and milestones under it to the configurable root.
A milestone value (of type MilestoneValue) is created, and set with the default value defined for the milestone.
This MilestoneValue is unique for the pair: ConfigurableRoot - Milestone.
[Top]
... //--Define Effectivity1 : [MileStone1, 100] int StartRange1 = 20; int EndRange1 = 100; CATICfgBasicEffectivity_var BasEff1; ret = CfgManager->CreateBasicEffectivity(BasEff1); if FAILED(ret) return ret; ret = BasEff1->SetRangeInterval(StartRange1, EndRange1); if FAILED(ret) return ret; ret = BasEff1->SetStartMilestone(MileStone1); if FAILED(ret) return ret; CATICfgEffectivity_var Effectivity1; ret = CfgManager->CreateEffectivity(Effectivity1); if FAILED(ret) return ret; ret = Effectivity1->AddEffectivity(BasEff1); if FAILED(ret) return ret; ... |
Please refer to the use case CAAVpiConfigurateStructure to get more information about creation of the basic effectivity and effectivities.
To define a milestone on a basic effectivity, the SetStartMileStone
(or/and SetEndMilestone
) method is used.
[Top]
... //-- Create new Normal value CATICfgNormalValue_var NV1bis; int Range1bis = 50; //new value ret = CfgManager->CreateNormalValue(Range1bis,Range1bis,NV1bis); if FAILED(ret) return ret; //-- Query MileStoneValue CATICfgMileStoneValue_var MileStoneValue1; ret = ConfigurableRootA->QueryMileStoneValueByMileStone(MileStone1,MileStoneValue1); if FAILED(ret) return ret; //-- Modify Milestone Value ret = MileStoneValue1->SetNV(NV1bis); if FAILED(ret) return ret; ... |
An important advantage of using milestones is the possibility to change their value. Thus, each effectivity impacted by these milestones is automatically refreshed. In case of large scale engineering project, a date type milestone can be used to set a specific value at the end of the design phase. This milestone will then be used in a large number of part instances' effectivities. If the date changes, there is no need to update each effectivity, but only the milestone value.
First, a normal value must be created with the expected new value for milestone.
Then, the unique milestone value for the pair Configurable Root - Milestones is retrieved.
Finally, this milestone value is modified using the SetNV
method.
[Top]
This use case has demonstrated the way to create a program and milestones and use them in Configuration Management.
[Top]
[1] | Building and Launching a CAA V5 Use Case |
[2] | Configuring a Product Structure and Using Filters |
[Top] |
Version: 1 [Apr 2001] | Document created |
[Top] |
Copyright © 2001, Dassault Systèmes. All rights reserved.