Session* theSession = Session::GetSession(); Part* workPart(theSession->Parts()->Work()); UI* theUI = UI::GetUI(); CAM::CylinderMillingBuilder* cylinderMillingBuilder1; cylinderMillingBuilder1 = workPart->CAMSetup()->CAMOperationCollection()->CreateCylinderMillingBuilder(dynamic_cast<CAM::CylinderMilling*>(theUI->SelectionManager()->GetSelectedTaggedObject(0))); CAM::HoleMachiningCutParameters* holeMachiningCutParameters1; holeMachiningCutParameters1 = cylinderMillingBuilder1->CuttingParameters(); CAM::FBM::FeatureGeometry* featureGeometry1; featureGeometry1 = cylinderMillingBuilder1->GetFeatureGeometry(); CAM::FBM::MachiningFeatureGeometry* machiningFeatureGeometry1(dynamic_cast<CAM::FBM::MachiningFeatureGeometry*>(featureGeometry1)); CAM::GeometrySetList* geometrySetList1; geometrySetList1 = machiningFeatureGeometry1->GeometryList(); for (int i = 0; i < geometrySetList1->Length(); i++) { CAM::FBM::FeatureSet* featureSet; featureSet = machiningFeatureGeometry1->GetFeatureSet(i); CAM::FBM::Feature* feature; feature = featureSet->GetFeature(); feature->OverrideAttributeValue("START_DIAMETER", feature->GetAttributeDoubleValue("DIAMETER_1")); //p(feature->GetAttributeDoubleValue("DIAMETER_1"));//直径 p(feature->GetAttributeDoubleValue("START_DIAMETER"));//起始直径 } NXObject* nXObject1; nXObject1 = cylinderMillingBuilder1->Commit(); cylinderMillingBuilder1->Destroy();