遍历operation
std::ostringstream out; double f8Value; NXOpen::CAM::CAMSetup *camSetup = displayPart->CAMSetup(); NXOpen::CAM::OperationCollection *operColl = camSetup->CAMOperationCollection(); NXOpen::CAM::OperationCollection::iterator it = operColl->begin(); while( it != operColl->end() ) { NXOpen::CAM::Operation *oper = (NXOpen::CAM::Operation*)(*it); out.str(""); out << "Operation: " << oper->Name().GetText() << std::endl; oper->GetFeedRate("Feed Rapid", &f8Value); out << " Rapid Feed Rate: " << f8Value << std::endl; print(out.str().c_str()); it++; } NXOpen::CAM::NCGroup *mctRoot(camSetup->GetRoot(NXOpen::CAM::CAMSetup::ViewMachineTool)); NXOpen::CAM::MachineGroupBuilder *mctGrpBuilder; mctGrpBuilder = camSetup->CAMGroupCollection()->CreateMachineGroupBuilder(mctRoot); out.str(""); out << "Machine: " << mctGrpBuilder->GetObject()->Name().GetText() << std::endl; out << " Rapid Feed Rate: " << mctGrpBuilder->RapidFeed()->Value() << std::endl; print(out.str().c_str()); mctGrpBuilder->Destroy();