NXOpen::Session *theSession = NXOpen::Session::GetSession();
NXOpen::Part* workPart = theSession->Parts()->Work();
NXOpen::CAM::HoleDrilling* holeDrilling = dynamic_cast<NXOpen::CAM::HoleDrilling*>(NXObjectManager::Get(operation));
NXOpen::CAM::HoleDrillingBuilder* holeDrillingBuilder = workPart->CAMSetup()->CAMOperationCollection()->CreateHoleDrillingBuilder(holeDrilling);
NXOpen::CAM::FBM::FeatureGeometry *featureGeometry = holeDrillingBuilder->GetFeatureGeometry();
featureGeometry->ReorderFeatures(NXOpen::CAM::FBM::FeatureGeometry::SortOrderClosest);//SortOrderShortestPath最短刀轨,SortOrderPrimaryDirection主方向