C Macro UG

/** set a bit in bit32. loc from 0~31 */

#define BIT_SET(bit32, loc)     ((bit32) |= (0x1 << (loc)))


/** clear a bit in bit32. loc from 0~31 */

#define BIT_CLEAR(bit32,loc)    ((bit32) &= ~(0x1 << (loc)))


/** check a bit in bit32. loc from 0~31 */
#define BIT_ISSET(bit32,loc)    ((bit32) & (0x1 << (loc)))


/** unused define , for avoid compile error */


#define UNUSED(a)               (void)a
#define UNUSED2(a,b)            (void)a;(void)b
#define UNUSED3(a,b,c)          (void)a;(void)b;(void)c


/** get max between a and b */

#define MAX(a,b)                ((a)>(b)?(a):(b))

/** get min between a and b */

#define MIN(a,b)                ((a)<(b)?(a):(b))


/** calculate the average value */

#define AVG(sum,cnt)                (((cnt)==0)?(0):((sum)/(cnt)))


Eg.

typedef enum LocoTsiTrafficType_e
{
    LOCO_TSI_UDP = 1,
    LOCO_TSI_GTP,
    LOCO_TSI_L2TP,
    LOCO_MAX_TSI_TRAFFIC_TYPE
} LocoTsiTrafficType;

U32 *trafficTypeBits ;

*trafficTypeBits = 0;


BIT_SET(*trafficTypeBits, LOCO_TSI_GTP);



我正在学习NX二次开发,用的是Visual Studio 2019,ug版本是12.0,开发平台是c++,uf函数为主nxopen函数为辅。需要你辅助我开发,重点注意开发模版是c++,优先使用uf函数,要求你先搞清楚你提供给我的代码真实有效性,语句与标点符号的正确位置,避免出现ug12.0没有提供的接口成员出现!确保所有方法调用都符合 NX12 的 API 签名,深度思考下再回答,每次回答前先回顾下前面的所有对话避免问题重复出现,每行代码都用中文注解具体意思与作用。int daoqiaotool::apply_cb() { int errorCode = 0; try { // 获取NX会话和工作部件 NXOpen::Session* theSession = NXOpen::Session::GetSession(); NXOpen::Part* workPart = theSession->Parts()->Work(); NXOpen::UI* theUI = NXOpen::UI::GetUI(); // ===== 1. 获取用户界面输入参数 ===== // 获取出料边曲线 std::vector<NXOpen::Curve*> dischargeCurves; if (chuliao_edge) { std::unique_ptr<NXOpen::BlockStyler::PropertyList> props(chuliao_edge->GetProperties()); std::vector<NXOpen::TaggedObject*> selObjs = props->GetTaggedObjectVector("SelectedObjects"); for (NXOpen::TaggedObject* obj : selObjs) { if (NXOpen::Curve* curve = dynamic_cast<NXOpen::Curve*>(obj)) { dischargeCurves.push_back(curve); // 将选中的曲线添加到出料边曲线列表 } } } // ====== 1. 获取选中的边对象 ====== std::vector<NXOpen::Edge*> selectedEdges; if (bianjie_edge) { // 直接获取选中的对象 std::vector<NXOpen::TaggedObject*> selObjs = bianjie_edge->GetSelectedObjects(); // 遍历所有选中对象,筛选出边类型 for (NXOpen::TaggedObject* obj : selObjs) { if (NXOpen::Edge* edge = dynamic_cast<NXOpen::Edge*>(obj)) { selectedEdges.push_back(edge); } } } // 获取出料沉桥值 double materialThickness = 0.0; if (expression_clcq) { std::unique_ptr<NXOpen::BlockStyler::PropertyList> props(expression_clcq->GetProperties()); materialThickness = props->GetDouble("Value"); // 从表达式控件获取数值 } // 获取倒桥角度值 double currentAngle = 0.0; if (expression_dqjiaodu) { std::unique_ptr<NXOpen::BlockStyler::PropertyList> props(expression_dqjiaodu->GetProperties()); currentAngle = props->GetDouble("Value"); // 从表达式控件获取数值 } // 获取倒斜角深度值 double daoxieValue = 0.0; if (expression_daoxie) { std::unique_ptr<NXOpen::BlockStyler::PropertyList> props(expression_clcq->GetProperties()); materialThickness = props->GetDouble("Value"); // 从表达式控件获取数值 } // 获取矢量方向(默认Z轴方向) NXOpen::Vector3d directionVector(0.0, 0.0, 1.0); if (vector0) { std::unique_ptr<NXOpen::BlockStyler::PropertyList> props(vector0->GetProperties()); directionVector = props->GetVector("Vector"); // 获取用户指定的矢量方向 } //获取ui枚举索引值 int iType = 0; iType = this->enum0->GetProperties()->GetEnum("Value"); if (iType == 0) { try { // 设置撤销标记 NXOpen::Session::UndoMarkId markId = theSession->SetUndoMark( NXOpen::Session::MarkVisibilityVisible, "倒桥工具操作"); // ===== 1. 验证输入参数 ===== if (dischargeCurves.empty()) { throw std::runtime_error("请选择出料边曲线"); } if (selectedEdges.empty()) { throw std::runtime_error("请选择边界边"); } // ===== 2. 创建主拉伸构建器 ===== NXOpen::Features::ExtrudeBuilder* extrudeBuilder = workPart->Features()->CreateExtrudeBuilder(nullptr); // 创建截面对象(使用与参考代码相同的参数) NXOpen::Section* section = workPart->Sections()->CreateSection( 0.001, 0.001, 0.05); // 距离公差0.001mm,角度公差0.05度 extrudeBuilder->SetSection(section); // ===== 3. 添加曲线到截面(按照参考代码模式)===== // 选择第一条出料边曲线作为拉伸截面 NXOpen::Curve* curveForExtrude = dischargeCurves[0]; // 创建曲线选择规则 std::vector<NXOpen::Curve*> sectionCurves; sectionCurves.push_back(curveForExtrude); NXOpen::SelectionIntentRule* curveRule = workPart->ScRuleFactory()->CreateRuleCurveDumb(sectionCurves); // 获取曲线中点作为帮助点(使用UF函数计算) NXOpen::Point3d helpPoint(0.0, 0.0, 0.0); { tag_t curveTag = curveForExtrude->Tag(); UF_EVAL_p_t evaluator = NULL; double limits[2]; if (UF_EVAL_initialize(curveTag, &evaluator) == 0) { if (UF_EVAL_ask_limits(evaluator, limits) == 0) { // 确保参数范围正确 if (limits[0] > limits[1]) std::swap(limits[0], limits[1]); // 计算中点参数 double midParam = (limits[0] + limits[1]) / 2.0; double midPoint[3]; // 计算中点坐标 if (UF_EVAL_evaluate(evaluator, 0, midParam, midPoint, NULL) == 0) { helpPoint = NXOpen::Point3d(midPoint[0], midPoint[1], midPoint[2]); } } // 释放评估器资源 UF_EVAL_free(evaluator); } } // 添加曲线到截面(使用参考代码参数) std::vector<NXOpen::SelectionIntentRule*> rules; rules.push_back(curveRule); section->AddToSection( rules, // 曲线规则集合 curveForExtrude, // 主要曲线对象 nullptr, // 不指定曲线起点 nullptr, // 不指定曲线终点 helpPoint, // 帮助点(中点) NXOpen::Section::ModeCreate // 创建模式 ); // 设置拉伸方向 NXOpen::Point3d origin(0.0, 0.0, 0.0); NXOpen::Direction* extrudeDirection = workPart->Directions()->CreateDirection( origin, directionVector, NXOpen::SmartObject::UpdateOptionWithinModeling ); extrudeBuilder->SetDirection(extrudeDirection); // ===== 5. 设置拉伸范围 ===== NXOpen::GeometricUtilities::Limits* limits = extrudeBuilder->Limits(); limits->StartExtend()->Value()->SetRightHandSide(std::to_string(materialThickness).c_str()); limits->EndExtend()->Value()->SetRightHandSide("100"); // 固定结束位置100mm // ===== 6. 设置拔模 ===== extrudeBuilder->Draft()->SetDraftOption( NXOpen::GeometricUtilities::SimpleDraft::SimpleDraftTypeSimpleFromStart); extrudeBuilder->Draft()->FrontDraftAngle()->SetRightHandSide(std::to_string(currentAngle).c_str()); extrudeBuilder->Draft()->BackDraftAngle()->SetRightHandSide("0"); // ===== 7. 动态拔模方向判断(使用边界边投影)===== bool draftDirectionPositive = true; std::string projectionResultMsg = "投影验证: "; // 存储结果消息 try { // 设置撤销标记 NXOpen::Session::UndoMarkId tempMark = theSession->SetUndoMark( NXOpen::Session::MarkVisibilityInvisible, "临时投影验证"); // 创建临时拉伸体进行投影验证 NXOpen::Features::ExtrudeBuilder* tempBuilder = workPart->Features()->CreateExtrudeBuilder(nullptr); // 创建临时截面(独立资源) NXOpen::Section* tempSection = workPart->Sections()->CreateSection( 0.001, 0.001, 0.05); // 距离公差0.001mm,角度公差0.05度 tempBuilder->SetSection(tempSection); // 添加曲线到临时截面(与主截面相同) std::vector<NXOpen::Curve*> tempSectionCurves; tempSectionCurves.push_back(curveForExtrude); NXOpen::SelectionIntentRule* tempCurveRule = workPart->ScRuleFactory()->CreateRuleCurveDumb(tempSectionCurves); std::vector<NXOpen::SelectionIntentRule*> tempRules; tempRules.push_back(tempCurveRule); // 添加曲线到临时截面 tempSection->AddToSection( tempRules, curveForExtrude, nullptr, nullptr, helpPoint, // 使用之前计算的中点 NXOpen::Section::ModeCreate ); // 设置临时拉伸方向(与主拉伸相同) tempBuilder->SetDirection(extrudeDirection); // 设置临时拉伸范围 NXOpen::GeometricUtilities::Limits* tempLimits = tempBuilder->Limits(); tempLimits->StartExtend()->Value()->SetRightHandSide("0"); tempLimits->EndExtend()->Value()->SetRightHandSide("100"); // ===== 6. 设置拔模 ===== tempBuilder->Draft()->SetDraftOption( NXOpen::GeometricUtilities::SimpleDraft::SimpleDraftTypeSimpleFromStart); tempBuilder->Draft()->FrontDraftAngle()->SetRightHandSide(std::to_string(currentAngle).c_str()); tempBuilder->Draft()->BackDraftAngle()->SetRightHandSide("0"); // 设置布尔操作类型为创建(避免影响模型) tempBuilder->BooleanOperation()->SetType( NXOpen::GeometricUtilities::BooleanOperation::BooleanTypeCreate); // 提交临时拉伸特征 NXOpen::NXObject* tempBodyObj = tempBuilder->Commit(); if (!tempBodyObj) { throw std::runtime_error("临时拉伸体创建失败"); } // 获取临时体的Body对象 NXOpen::Body* tempBody = nullptr; if (NXOpen::Features::Extrude* extrudeFeature = dynamic_cast<NXOpen::Features::Extrude*>(tempBodyObj)) { std::vector<NXOpen::Body*> bodies = extrudeFeature->GetBodies(); if (!bodies.empty()) { tempBody = bodies[0]; } } if (!tempBody) { throw std::runtime_error("无法获取临时拉伸体"); } // 获取边界边(使用第一条) tag_t boundaryEdgeTag = selectedEdges[0]->Tag(); // 创建曲线链表 uf_list_p_t curveList = NULL; UF_MODL_create_list(&curveList); UF_MODL_put_list_item(curveList, boundaryEdgeTag); // 获取临时体的面 uf_list_p_t faceList = NULL; tag_t tempBodyTag = tempBody->Tag(); if (UF_MODL_ask_body_faces(tempBodyTag, &faceList) != 0) { throw std::runtime_error("无法获取临时体的面"); } // 归一化投影方向 double dirMagnitude = sqrt(directionVector.X * directionVector.X + directionVector.Y * directionVector.Y + directionVector.Z * directionVector.Z); if (dirMagnitude > 1e-6) { double projDirection[3] = { directionVector.X / dirMagnitude, directionVector.Y / dirMagnitude, directionVector.Z / dirMagnitude }; // 尝试原始方向投影 tag_t projCurve = NULL_TAG; int projStatus = UF_MODL_create_proj_curves( curveList, faceList, 0, projDirection, &projCurve ); // 判断投影结果并构建结果消息 if (projStatus == 0 && projCurve != NULL_TAG) { draftDirectionPositive = true; projectionResultMsg += "成功 - 使用正拔模方向"; UF_OBJ_delete_object(projCurve); } else { draftDirectionPositive = false; projectionResultMsg += "失败 - 使用负拔模方向"; // 添加详细错误信息 char errorBuf[256]; if (projStatus != 0) { snprintf(errorBuf, sizeof(errorBuf), " (错误代码: %d)", projStatus); projectionResultMsg += errorBuf; } else if (projCurve == NULL_TAG) { projectionResultMsg += " (投影曲线为空)"; } } // 清理UF资源 UF_MODL_delete_list(&faceList); UF_MODL_delete_list(&curveList); // 清理临时资源 //// 删除临时拉伸体 //std::vector<NXOpen::TaggedObject*> toDelete; //toDelete.push_back(tempBodyObj); //theSession->UpdateManager()->AddObjectsToDeleteList(toDelete); // 销毁临时构建器和截面 tempBuilder->Destroy(); tempSection->Destroy(); // 删除撤销标记(不保留临时操作) theSession->DeleteUndoMark(tempMark, NULL); } } catch (std::exception& ex) { draftDirectionPositive = true; projectionResultMsg += "异常: " + std::string(ex.what()) + " - 使用默认正方向"; // 显示警告但不中断主流程 theUI->NXMessageBox()->Show("警告", NXOpen::NXMessageBox::DialogTypeWarning, projectionResultMsg.c_str()); } catch (...) { draftDirectionPositive = true; projectionResultMsg += "未知异常 - 使用默认正方向"; theUI->NXMessageBox()->Show("警告", NXOpen::NXMessageBox::DialogTypeWarning, projectionResultMsg.c_str()); } // 在NX列表窗口显示投影结果 theSession->ListingWindow()->Open(); theSession->ListingWindow()->WriteLine(projectionResultMsg.c_str()); // 根据验证结果设置拔模方向 if (!draftDirectionPositive) { extrudeBuilder->Draft()->FrontDraftAngle()->SetRightHandSide( ("-" + std::to_string(currentAngle)).c_str()); projectionResultMsg += "\n拔模角度设置为: -" + std::to_string(currentAngle) + "°"; } else { extrudeBuilder->Draft()->FrontDraftAngle()->SetRightHandSide( std::to_string(currentAngle).c_str()); projectionResultMsg += "\n拔模角度设置为: " + std::to_string(currentAngle) + "°"; } // ===== 8. 设置布尔操作(新建体) ===== extrudeBuilder->BooleanOperation()->SetType( NXOpen::GeometricUtilities::BooleanOperation::BooleanTypeCreate); // ===== 9. 执行拉伸操作 ===== NXOpen::NXObject* feature = extrudeBuilder->Commit(); if (!feature) { throw std::runtime_error("拉伸操作失败"); } // ===== 10. 清理资源 ===== extrudeBuilder->Destroy(); section->Destroy(); // 显示操作成功信息 char finalMsg[512]; sprintf(finalMsg, "操作成功完成!\n" "沉桥值: %.2fmm\n" "倒桥角度: %.2f°\n" "方向: %s\n" "%s", materialThickness, currentAngle, draftDirectionPositive ? "正向" : "反向", projectionResultMsg.c_str()); theUI->NXMessageBox()->Show("倒桥工具", NXOpen::NXMessageBox::DialogTypeInformation, finalMsg); } catch (std::exception& ex) { theUI->NXMessageBox()->Show("错误", NXOpen::NXMessageBox::DialogTypeError, ex.what()); } } else { } //---- Enter your callback code here ----- } catch(exception& ex) { //---- Enter your exception handling code here ----- errorCode = 1; daoqiaotool::theUI->NXMessageBox()->Show("Block Styler", NXOpen::NXMessageBox::DialogTypeError, ex.what()); } return errorCode; }投影验证部分报错:以下是nx日志“&MACRO MENU, 0, UG_LWIN_FILE_EXIT ListingWindowMenuBar ! &MACRO MENU, 0, UG_FILE_RUN_UFUN UG_GATEWAY_MAIN_MENUBAR <Ctrl U> ## ! &MACRO FILE_DIALOG_BEGIN 0, ! filebox with tools_data &MACRO FILE_DIALOG_UPDATE 0 ! 可动态调用的库 (*.dll) &MACRO FILE_DIALOG_END &MACRO FILE_BOX -2,@@@D:\NXopen\BaiduSyncdisk\studio\daoqiaotool\x64\Debug\daoqiaotool.dll@@@D:\NXopen\BaiduSyncdisk\studio\daoqiaotool\x64\Debug\*.DLL@@@ 0 ! Execute User Function Missing resource block. Validation failed but CPP author license exists - D:\NXopen\BaiduSyncdisk\studio\daoqiaotool\x64\Debug\daoqiaotool.dll loaded Skipping UFUNC_EXECUTE check Missing resource block. Validation failed but CPP author license exists - D:\NXopen\BaiduSyncdisk\studio\daoqiaotool\x64\Debug\daoqiaotool.dll loaded Native license authentication passed for D:\NXopen\BaiduSyncdisk\studio\daoqiaotool\x64\Debug\daoqiaotool.dll Successfully loaded dynamic module D:\NXopen\BaiduSyncdisk\studio\daoqiaotool\x64\Debug\daoqiaotool.dll Loaded module d:\nxopen\baidusyncdisk\studio\daoqiaotool\x64\debug\daoqiaotool.dll 7ff8d39e0000 28000 d3008246-41f5ad49-84d14e8a-1373dabb-14 version = 0 Loaded module c:\windows\system32\windowmanagementapi.dll 7ff8e3100000 a1000 cf81caca-eb30bb59-42f6139b-d61729e2-1 version = 0 Loaded module c:\windows\system32\inputhost.dll 7ff8dfb40000 152000 5e2fa9d8-a9e60301-165a6173-8d540f39-1 version = 10.0.19041.5794 Loaded module c:\windows\system32\windows.ui.dll 7ff8dfca0000 13f000 65e64c41-964975f1-59b3c47-ba70c850-1 version = 10.0.19041.5794 Loaded module c:\windows\system32\msftedit.dll 7ff8adcc0000 34c000 1b17eced-89d4d5ce-50d2a5fb-17671516-1 version = 10.0.19041.5915 Block Styler: Could not find the file at daoqiaotool.dlx. The file will be searched in user directories Block Styler: Found the file at D:\Program Files\Siemens\NX2212\MICHTOOLS\application\daoqiaotool.dlx UNDO_UG: Recyclable status of mark 1281 set to False &MACRO ASK_ITEM 1441792 (1 BOOL 0) = 1 ! 显示之前状态 &MACRO ASK_ITEM 1441792 (1 BOOL 0) = 0 ! 显示之前状态 &MACRO ASK_ITEM 2228224 (1 BOOL 0) = 1 ! 显示之前状态 &MACRO ASK_ITEM 2228224 (1 BOOL 0) = 0 ! 显示之前状态 &MACRO ASK_ITEM 4587520 (1 OPTT 0) = 10 0 ! -ZC-axis &MACRO ASK_ITEM 4587520 (1 OPTT 0) = 10 1 ! -ZC-axis &MACRO ASK_ITEM 4587520 (1 OPTT 0) = 10 1 ! -ZC-axis &MACRO ASK_ITEM 4587520 (1 OPTT 0) = 10 0 ! -ZC-axis &MACRO ASK_ITEM 4587520 (1 OPTT 0) = 10 0 ! -ZC-axis &MACRO ASK_ITEM 4587520 (1 OPTT 0) = 10 0 ! -ZC-axis &MACRO EVENT FOCUS_IN 0 0, 3145730, 0, 0, 0! 出料沉桥 &MACRO ASK_ITEM 3145730 (1 STRN 0) = "5" ! 出料沉桥 &MACRO DIALOG_BEGIN "桥位tool-MiCH-明" 0 ! DA2 &MACRO BEG_ITEM 327680 (1 RADI 0) = 0 ! 拔模 &MACRO BEG_ITEM 917504 (1 BOOL 0) = 0 ! Curve &MACRO BEG_ITEM 1441792 (1 BOOL 0) = 0 ! 显示之前状态 &MACRO BEG_ITEM 1703936 (1 BOOL 0) = 0 ! Curve &MACRO BEG_ITEM 2228224 (1 BOOL 0) = 0 ! 显示之前状态 &MACRO BEG_ITEM 3145730 (1 STRN 0) = "5" ! 出料沉桥 &MACRO BEG_ITEM 3801090 (1 OPTM 0) = 1 ! ° &MACRO BEG_ITEM 3801091 (1 STRN 0) = "20" ! 倒桥角度 &MACRO BEG_ITEM 4587520 (1 OPTT 0) = 10 0 ! -ZC-axis &MACRO BEG_ITEM 5570560 (1 OPTM 0) = 10 ! -ZC-axis &MACRO BEG_ITEM 5570562 (1 TOOL 0) = 5 ! -ZC-axis &MACRO BEG_ITEM 6356994 (1 STRN 0) = "65" ! 倒斜深度 &MACRO BEG_ITEM 7274498 (1 BOOL 0) = 1 ! Preview &MACRO ASK_ITEM 917504 (1 BOOL 0) = 0 ! Curve &MACRO ASK_ITEM 917504 (1 BOOL 0) = 1 ! Curve &MACRO EVENT FOCUS_OUT 0 0, 3145730, 0, 0, 0! 出料沉桥 &MACRO ASK_ITEM 3145730 (1 STRN 0) = "5" ! 出料沉桥 &MACRO FOCUS CHANGE IN 1 &MACRO WINDOW RESIZE 1.000000 16.729167 8.458333 -1.000000 -0.505604 1.000000 0.505604 &MACRO CURSOR_EVENT 1001 3,1,100,0 ! single_pt, mb1/0+0, , nn &MACRO CPOS -19.4093596059113,20.686551724138,-30 !!!&MACRO EVENT FOCUS_IN 0 0, 3145730, 0, 0, 0! (Application CB Nested) !!!&MACRO ASK_ITEM 3145730 (1 STRN 0) = "5" ! 出料沉桥 &MACRO CURSOR_EVENT 1001 106,0,201,0 ! motion_pb, mb0/0+0, , nn &MACRO CPOS -18.1962746305419,20.9291687192118,-30 &MACRO EVENT FOCUS_OUT 0 0, 3145730, 0, 0, 0! 出料沉桥 &MACRO ASK_ITEM 3145730 (1 STRN 0) = "5" ! 出料沉桥 &MACRO EVENT FOCUS_IN 0 0, 1703936, 0, 0, 0! Curve &MACRO ASK_ITEM 1703936 (1 BOOL 0) = 0 ! Curve &MACRO EVENT VALUE_CHANGED 0 0, 1703936, 0, 0, 0! Curve &MACRO ASK_ITEM 1703936 (1 BOOL 0) = 1 ! Curve &MACRO ASK_ITEM 917504 (1 BOOL 0) = 1 ! Curve &MACRO ASK_ITEM 917504 (1 BOOL 0) = 0 ! Curve &MACRO ASK_ITEM 1703936 (1 BOOL 0) = 1 ! Curve &MACRO FOCUS CHANGE IN 1 &MACRO WINDOW RESIZE 1.000000 16.729167 8.458333 -1.000000 -0.505604 1.000000 0.505604 &MACRO CURSOR_EVENT 1001 3,1,100,0 ! single_pt, mb1/0+0, , nn &MACRO CPOS -16.0127216748768,27.7224445812808,-30 !!!&MACRO EVENT FOCUS_IN 0 0, 1703936, 0, 0, 0! (Application CB Nested) !!!&MACRO ASK_ITEM 1703936 (1 BOOL 0) = 1 ! Curve &MACRO CURSOR_EVENT 1001 106,0,201,0 ! motion_pb, mb0/0+0, , nn &MACRO CPOS -17.4684236453202,19.9587007389163,-30 &MACRO ASK_ITEM 3145730 (1 STRN 0) = "5" ! 出料沉桥 &MACRO ASK_ITEM 3145730 (1 STRN 0) = "5" ! 出料沉桥 &MACRO ASK_ITEM 3801091 (1 STRN 0) = "20" ! 倒桥角度 &MACRO ASK_ITEM 3801091 (1 STRN 0) = "20" ! 倒桥角度 &MACRO ASK_ITEM 6356994 (1 STRN 0) = "65" ! 倒斜深度 &MACRO ASK_ITEM 6356994 (1 STRN 0) = "65" ! 倒斜深度 &MACRO APPLY 0 0 ! Apply Callback &MACRO APP_ITEM 327680 (1 RADI 0) = 0 ! 拔模 &MACRO APP_ITEM 917504 (1 BOOL 0) = 0 ! Curve &MACRO APP_ITEM 1441792 (1 BOOL 0) = 0 ! 显示之前状态 &MACRO APP_ITEM 1703936 (1 BOOL 0) = 1 ! Curve &MACRO APP_ITEM 2228224 (1 BOOL 0) = 0 ! 显示之前状态 &MACRO APP_ITEM 3145730 (1 STRN 0) = "5" ! 出料沉桥 &MACRO APP_ITEM 3801090 (1 OPTM 0) = 1 ! ° &MACRO APP_ITEM 3801091 (1 STRN 0) = "20" ! 倒桥角度 &MACRO APP_ITEM 4587520 (1 OPTT 0) = 10 0 ! -ZC-axis &MACRO APP_ITEM 5570560 (1 OPTM 0) = 10 ! -ZC-axis &MACRO APP_ITEM 5570562 (1 TOOL 0) = 5 ! -ZC-axis &MACRO APP_ITEM 6356994 (1 STRN 0) = "65" ! 倒斜深度 &MACRO APP_ITEM 7274498 (1 BOOL 0) = 1 ! Preview &MACRO ASK_ITEM 1703936 (1 BOOL 0) = 1 ! Curve &MACRO ASK_ITEM 1703936 (1 BOOL 0) = 0 ! Curve &MACRO MESSAGE_BOX -2 操作成功完成! &MACRO MESSAGE_TEXT 沉桥值: 5.00mm &MACRO MESSAGE_TEXT 倒桥角度: 20.00° &MACRO MESSAGE_TEXT 方向: 反向 &MACRO MESSAGE_TEXT 投影验证: 失败 - 使用负拔模方向 (错误代码: 875033) &MACRO MESSAGE_TEXT 拔模角度设置为: -20.000000° !!!&MACRO ASK_ITEM 3145730 (1 STRN 0) = "5" ! 出料沉桥 !!!&MACRO ASK_ITEM 3145730 (1 STRN 0) = "5" ! 出料沉桥 !!!&MACRO ASK_ITEM 3801091 (1 STRN 0) = "20" ! 倒桥角度 !!!&MACRO ASK_ITEM 3801091 (1 STRN 0) = "20" ! 倒桥角度 !!!&MACRO ASK_ITEM 6356994 (1 STRN 0) = "65" ! 倒斜深度 !!!&MACRO ASK_ITEM 6356994 (1 STRN 0) = "65" ! 倒斜深度 &MACRO END_ITEM 327680 (1 RADI 0) = 0 ! 拔模 &MACRO END_ITEM 917504 (1 BOOL 0) = 0 ! Curve &MACRO END_ITEM 1441792 (1 BOOL 0) = 0 ! 显示之前状态 &MACRO END_ITEM 1703936 (1 BOOL 0) = 0 ! Curve &MACRO END_ITEM 2228224 (1 BOOL 0) = 0 ! 显示之前状态 &MACRO END_ITEM 3145730 (1 STRN 0) = "5" ! 出料沉桥 &MACRO END_ITEM 3801090 (1 OPTM 0) = 1 ! ° &MACRO END_ITEM 3801091 (1 STRN 0) = "20" ! 倒桥角度 &MACRO END_ITEM 4587520 (1 OPTT 0) = 10 0 ! -ZC-axis &MACRO END_ITEM 5570560 (1 OPTM 0) = 10 ! -ZC-axis &MACRO END_ITEM 5570562 (1 TOOL 0) = 5 ! -ZC-axis &MACRO END_ITEM 6356994 (1 STRN 0) = "65" ! 倒斜深度 &MACRO END_ITEM 7274498 (1 BOOL 0) = 1 ! Preview &MACRO DIALOG_END -23, -1 ! 桥位tool-MiCH-明: mtEndEventLoop &MACRO ASK_ITEM 1441792 (1 BOOL 0) = 1 ! 显示之前状态 &MACRO ASK_ITEM 1441792 (1 BOOL 0) = 0 ! 显示之前状态 &MACRO ASK_ITEM 2228224 (1 BOOL 0) = 1 ! 显示之前状态 &MACRO ASK_ITEM 2228224 (1 BOOL 0) = 0 ! 显示之前状态 &MACRO ASK_ITEM 4587520 (1 OPTT 0) = 10 0 ! -ZC-axis &MACRO ASK_ITEM 4587520 (1 OPTT 0) = 10 1 ! -ZC-axis &MACRO ASK_ITEM 4587520 (1 OPTT 0) = 10 1 ! -ZC-axis &MACRO ASK_ITEM 4587520 (1 OPTT 0) = 10 0 ! -ZC-axis &MACRO ASK_ITEM 4587520 (1 OPTT 0) = 10 0 ! -ZC-axis &MACRO ASK_ITEM 4587520 (1 OPTT 0) = 10 0 ! -ZC-axis &MACRO EVENT FOCUS_IN 0 0, 3145730, 0, 0, 0! 出料沉桥 &MACRO ASK_ITEM 3145730 (1 STRN 0) = "5" ! 出料沉桥 &MACRO DIALOG_BEGIN "桥位tool-MiCH-明" 0 ! DA2 &MACRO BEG_ITEM 327680 (1 RADI 0) = 0 ! 拔模 &MACRO BEG_ITEM 917504 (1 BOOL 0) = 0 ! Curve &MACRO BEG_ITEM 1441792 (1 BOOL 0) = 0 ! 显示之前状态 &MACRO BEG_ITEM 1703936 (1 BOOL 0) = 0 ! Curve &MACRO BEG_ITEM 2228224 (1 BOOL 0) = 0 ! 显示之前状态 &MACRO BEG_ITEM 3145730 (1 STRN 0) = "5" ! 出料沉桥 &MACRO BEG_ITEM 3801090 (1 OPTM 0) = 1 ! ° &MACRO BEG_ITEM 3801091 (1 STRN 0) = "20" ! 倒桥角度 &MACRO BEG_ITEM 4587520 (1 OPTT 0) = 10 0 ! -ZC-axis &MACRO BEG_ITEM 5570560 (1 OPTM 0) = 10 ! -ZC-axis &MACRO BEG_ITEM 5570562 (1 TOOL 0) = 5 ! -ZC-axis &MACRO BEG_ITEM 6356994 (1 STRN 0) = "65" ! 倒斜深度 &MACRO BEG_ITEM 7274498 (1 BOOL 0) = 1 ! Preview &MACRO ASK_ITEM 917504 (1 BOOL 0) = 0 ! Curve &MACRO ASK_ITEM 917504 (1 BOOL 0) = 1 ! Curve &MACRO EVENT FOCUS_OUT 0 0, 3145730, 0, 0, 0! 出料沉桥 &MACRO ASK_ITEM 3145730 (1 STRN 0) = "5" ! 出料沉桥 &MACRO CANCEL -30 4981 ! Cancel Callback WEBENGINE BROWSER: Navigating to: HTML data &MACRO EVENT FOCUS_IN 0 0, 3145730, 0, 0, 0! 出料沉桥 &MACRO ASK_ITEM 3145730 (1 STRN 0) = "5" ! 出料沉桥 &MACRO CANCEL 0 0 ! Cancel Callback &MACRO DIALOG_END -3, 0 ! 桥位tool-MiCH-明: CANCEL UNDO_UG: Recyclable status of mark 1281 set to True Unloading D:\NXopen\BaiduSyncdisk\studio\daoqiaotool\x64\Debug\daoqiaotool.dll &MACRO FOCUS CHANGE OUT 1 &MACRO MENU, 0, UG_HELP_SYSTEM_LOG UG_GATEWAY_MAIN_MENUBAR <TopBorderBar->MenuBar->UG_HELP> ## !”
最新发布
08-17
nx报错。以下是日志:“&MACRO WINDOW RESIZE 1.000000 15.781250 7.770833 -1.000000 -0.492409 1.000000 0.492409 &MACRO WINDOW RESIZE 1.000000 15.781250 8.208333 -1.000000 -0.520132 1.000000 0.520132 &MACRO MENU, 0, UG_LWIN_FILE_EXIT ListingWindowMenuBar ! &MACRO MENU, 0, UG_FILE_RUN_UFUN UG_GATEWAY_MAIN_MENUBAR <Ctrl U> ## ! &MACRO FILE_DIALOG_BEGIN 0, ! filebox with tools_data &MACRO FILE_DIALOG_UPDATE 0 ! 可动态调用的库 (*.dll) &MACRO FILE_DIALOG_END &MACRO FILE_BOX -2,@@@D:\NXopen\BaiduSyncdisk\studio\bianjieshunmian\x64\Debug\bianjieshunmian.dll@@@D:\NXopen\BaiduSyncdisk\studio\bianjieshunmian\x64\Debug\*.DLL@@@ 0 ! Execute User Function Missing resource block. Validation failed but CPP author license exists - D:\NXopen\BaiduSyncdisk\studio\bianjieshunmian\x64\Debug\bianjieshunmian.dll loaded Skipping UFUNC_EXECUTE check Missing resource block. Validation failed but CPP author license exists - D:\NXopen\BaiduSyncdisk\studio\bianjieshunmian\x64\Debug\bianjieshunmian.dll loaded Native license authentication passed for D:\NXopen\BaiduSyncdisk\studio\bianjieshunmian\x64\Debug\bianjieshunmian.dll Successfully loaded dynamic module D:\NXopen\BaiduSyncdisk\studio\bianjieshunmian\x64\Debug\bianjieshunmian.dll Loaded module c:\windows\system32\msftedit.dll 7ff88a4f0000 382000 1c36c7d-89f1c85b-bc93204e-b8470fea-1 version = 10.0.22621.5547 Block Styler: Could not find the file at bianjieshunmian.dlx. The file will be searched in user directories Block Styler: Found the file at D:\Program Files\Siemens\NX2212\MICHTOOLS\application\bianjieshunmian.dlx UNDO_UG: Recyclable status of mark 18169 set to False &MACRO ASK_ITEM 851968 (1 BOOL 0) = 1 ! 显示之前状态 &MACRO ASK_ITEM 851968 (1 BOOL 0) = 0 ! 显示之前状态 &MACRO ASK_ITEM 1638400 (1 BOOL 0) = 1 ! 显示之前状态 &MACRO ASK_ITEM 1638400 (1 BOOL 0) = 0 ! 显示之前状态 &MACRO EVENT FOCUS_IN 0 0, 327680, 0, 0, 0! Curve &MACRO ASK_ITEM 327680 (1 BOOL 0) = 0 ! Curve &MACRO DIALOG_BEGIN "边接顺" 0 ! DA2 &MACRO BEG_ITEM 327680 (1 BOOL 0) = 0 ! Curve &MACRO BEG_ITEM 851968 (1 BOOL 0) = 0 ! 显示之前状态 &MACRO BEG_ITEM 1114112 (1 BOOL 0) = 0 ! Face &MACRO BEG_ITEM 1638400 (1 BOOL 0) = 0 ! 显示之前状态 &MACRO BEG_ITEM 2162690 (1 BOOL 0) = 1 ! Preview &MACRO ASK_ITEM 327680 (1 BOOL 0) = 0 ! Curve &MACRO ASK_ITEM 327680 (1 BOOL 0) = 1 ! Curve &MACRO FOCUS CHANGE IN 1 &MACRO WINDOW RESIZE 1.000000 15.781250 8.208333 -1.000000 -0.520132 1.000000 0.520132 &MACRO CURSOR_EVENT 1001 3,1,100,0 ! single_pt, mb1/0+0, , nn &MACRO CPOS -72.8662084123499,3.66423475533645,-33.3619702926314 !!!&MACRO EVENT FOCUS_IN 0 0, 327680, 0, 0, 0! (Application CB Nested) !!!&MACRO ASK_ITEM 327680 (1 BOOL 0) = 1 ! Curve &MACRO EVENT ACTIVATE 0 0, 1114114, 0, 0, 0! &MACRO ASK_ITEM 327680 (1 BOOL 0) = 1 ! Curve &MACRO ASK_ITEM 327680 (1 BOOL 0) = 0 ! Curve &MACRO ASK_ITEM 1114112 (1 BOOL 0) = 0 ! Face &MACRO ASK_ITEM 1114112 (1 BOOL 0) = 1 ! Face &MACRO FOCUS CHANGE IN 1 &MACRO WINDOW RESIZE 1.000000 15.781250 8.208333 -1.000000 -0.520132 1.000000 0.520132 &MACRO CURSOR_EVENT 1001 3,1,100,0 ! single_pt, mb1/0+0, , nn &MACRO CPOS -65.7726108017382,-56.3780021630547,-33.3619702926314 !!!&MACRO EVENT FOCUS_IN 0 0, 327680, 0, 0, 0! (Application CB Nested) !!!&MACRO ASK_ITEM 327680 (1 BOOL 0) = 0 ! Curve &MACRO OK 0 0 ! OK Callback &MACRO ASK_ITEM 1114112 (1 BOOL 0) = 1 ! Face &MACRO ASK_ITEM 1114112 (1 BOOL 0) = 0 ! Face &MACRO MESSAGE_BOX -2 The chamfer cannot be created. &MACRO MESSAGE_TEXT A parameter may be out of the acceptable range, or &MACRO MESSAGE_TEXT the geometry may be such that all faces &MACRO MESSAGE_TEXT could not be properly connected. &MACRO END_ITEM 327680 (1 BOOL 0) = 0 ! Curve &MACRO END_ITEM 851968 (1 BOOL 0) = 0 ! 显示之前状态 &MACRO END_ITEM 1114112 (1 BOOL 0) = 0 ! Face &MACRO END_ITEM 1638400 (1 BOOL 0) = 0 ! 显示之前状态 &MACRO END_ITEM 2162690 (1 BOOL 0) = 1 ! Preview &MACRO DIALOG_END -2, 0 ! 边接顺: OK UNDO_UG: Recyclable status of mark 18169 set to True Unloading D:\NXopen\BaiduSyncdisk\studio\bianjieshunmian\x64\Debug\bianjieshunmian.dll &MACRO MENU, 0, UG_HELP_SYSTEM_LOG UG_GATEWAY_MAIN_MENUBAR <TopBorderBar->MenuBar->UG_HELP> ## ! ”
08-16
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值