首页 > 其他分享 >遍历operation

遍历operation

时间:2022-10-26 17:04:01浏览次数:49  
标签:遍历 CAMSetup camSetup NXOpen CAM operation operColl out

    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();

 

标签:遍历,CAMSetup,camSetup,NXOpen,CAM,operation,operColl,out
From: https://www.cnblogs.com/liuxiaoqing1/p/16829029.html

相关文章