NX二次开发-Block UI C++界面Specify Point(指定点)控件的获取(持续补充)

Specify Point(指定点)控件的获取

 1     NX9+VS2012
 2     
 3     #include 
 4     #include 
 5 
 6 
 7     UF_initialize();
 8 
 9     //获取点XYZ坐标
10     PropertyList *SelectPoint1Props = point0->GetProperties();
11     Point3d SelectPoint1 = SelectPoint1Props->GetPoint("Point");
12     delete SelectPoint1Props;
13     SelectPoint1Props = NULL;
14 
15     //得到的是Point3d类型,使用时直接 .X,.Y,.Z,来获得XYZ坐标。
16     //转换
17     char msg[256];
18     sprintf_s(msg, "X:%f,Y:%f,Z:%f", SelectPoint1.X, SelectPoint1.Y, SelectPoint1.Z);
19 
20     //打印点坐标
21     UF_UI_open_listing_window();
22     UF_UI_write_listing_window(msg);
23 
24     UF_terminate();

NX二次开发-Block UI C++界面Specify Point(指定点)控件的获取(持续补充)_第1张图片

你可能感兴趣的:(NX二次开发-Block UI C++界面Specify Point(指定点)控件的获取(持续补充))