NX二次开发源码分享: 获取所有零件导航器上PMI的信息
NX二次开发源码分享: 获取所有零件导航器上PMI的信息目前没有函数做这个,通过 KF 里面的方法实现
private static string get_pmi_part_navigator_name(NXOpen.Annotations.Pmi thePmi)
{
string ruleName;
theUFSession.Cfi.GetUniqueFilename(out ruleName);
workPart.RuleManager.CreateDynamicRule("root:", ruleName,
"Any", "mqc_askPMIObjectsInformation({" + thePmi.Tag + "});", "");
string theValue = workPart.RuleManager.EvaluateAnyAsString(ruleName + ":");
workPart.RuleManager.DeleteDynamicRule("root:", ruleName);
string[] infos = theValue.Split(new Char[]{','});
string theName = (infos.Trim().Trim(new Char[]{'"'}) +
"(" + infos.Trim() + ")").Replace("PMI ", "");
return theName;
}
页:
[1]