选择一个组件,在屏幕中间显示组件的定位点信息,其代码如下:
/// <summary>
/// 在屏幕中显示组件定位点的信息
/// </summary>
/// <param name="component"></param>
public static void DisplayPosition(Component component)
{
Point3d point3D = new Point3d();
Matrix3x3 matrix3X3 = new Matrix3x3();
component.GetPosition(out point3D, out matrix3X3);
#region 在屏幕中心点处显示轴向
uFDisp.Refresh();
NXOpen.View workView = theSession.Parts.Work.Views.WorkView;
Point3d absolutePoint3D = workView.AbsoluteOrigin;
double[] coord = new double[3] { absolutePoint3D.X, absolutePoint3D.Y, absolutePoint3D.Z };
double[] endLine = new double[3] { point3

本文介绍了如何在NX二次开发过程中,利用C#编程实现选择组件后,将该组件的定位点信息显示在屏幕中央的操作步骤和代码示例。
订阅专栏 解锁全文

被折叠的 条评论
为什么被折叠?



