NX二次开发 UFUN获取尺寸的附加文本 UF_DRF_ask_appended_text
//NX8.0+VS2010
#include <uf_assem.h>
#include <uf_part.h>
#include <uf_obj.h>
#include <uf_modl.h>
#include <uf_view.h>
#include <uf_draw.h>
#include <uf_drf.h>
#include <UF_UGFONT.h>
extern DllExport void ufsta(char* param, int* returnCode, int rlen)
{
if (UF_initialize())
return;
//遍历所有尺寸
tag_t dim_tag = NULL_TAG;
UF_OBJ_cycle_objs_in_part(UF_PART_ask_display_part(), UF_dimension_type, &dim_tag);//遍历所有尺寸
while (dim_tag != NULL_TAG)
{
//获取尺寸的附加文本
int num_text = 0;
UF_DRF_appended_text_p_t appended_text;
UF_DRF_ask_appended_text(dim_tag, &num_text, &appended_text);
UF_DRF_appended_text_location_t loca = appended_text->location;//获得附加文本位置
int num = appended_text->num_lines;//获得附加文本行数
for (int i = 0; i < num; i++)
{
ch