UF_initialize(); //遍历所有尺寸 int type = 0; tag_t DimTag = NULL_TAG; UF_OBJ_cycle_objs_in_part1(UF_PART_ask_display_part(), UF_dimension_type, &DimTag);//遍历所有尺寸 while (DimTag != NULL_TAG) { //获取尺寸的值 int dim_subtype = 0;//尺寸的类型 double dim_origin[3];//原点坐标 UF_DRF_dim_info_p_t dim_info; UF_DRF_ask_dim_info(DimTag, &dim_subtype, dim_origin, &dim_info); string DimValue = dim_info->text_info->text->string; //打印 uc1601(DimValue.c_str(), 1); UF_OBJ_cycle_objs_in_part1(UF_PART_ask_display_part(), UF_dimension_type, &DimTag); } UF_terminate(); Caesar卢尚宇 2019年7月4日