Specify Point(指定点)控件的获取
1 NX9+VS2012 2 3 #include <uf.h> 4 #include <uf_ui.h> 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();
高版本获取方式