UF_initialize();
tag_t ObjectTag = NULL_TAG;
tag_t view_tag = NULL_TAG;
UF_OBJ_disp_props_t disp_props;
int Type, SubType, quantity=0;
char msg[256];
//实体
UF_OBJ_cycle_objs_in_part(UF_PART_ask_display_part(), UF_solid_type, &ObjectTag); //UF_solid_type移动到1层
while (ObjectTag != NULL_TAG)
{
quantity++;
UF_OBJ_ask_type_and_subtype(ObjectTag, &Type, &SubType);
if (Type == UF_solid_type)
{
UF_OBJ_set_layer(ObjectTag, 1);
}
UF_OBJ_cycle_objs_in_part(UF_PART_ask_display_part(), UF_solid_type, &ObjectTag);
}
//直线
UF_OBJ_cycle_objs_in_part(UF_PART_ask_display_part(), UF_line_type, &ObjectTag); //UF_line_type移到10层
while (ObjectTag != NULL_TAG)
{
quantity++;
UF_OBJ_ask_display_properties(ObjectTag,&disp_props);
UF_OBJ_ask_type_and_subtype(ObjectTag, &Type, &SubType); if (Type == UF_line_type &&disp_props.color==1 &&disp_props.font==UF_OBJ_FONT_SOLID )//白色直线移动到10层
{
UF_OBJ_set_layer(ObjectTag, 10);
}
if (Type == UF_line_type &&disp_props.color!=1 &&disp_props.font==UF_OBJ_FONT_SOLID )//非白色直线移动到11层
{
UF_OBJ_set_layer(ObjectTag, 11);
}
if (Type == UF_line_type &&disp_props.font==UF_OBJ_FONT_DASHED)//虚线移动到12层
{
UF_OBJ_set_layer(ObjectTag, 12);
}
if (Type == UF_line_type &&disp_props.font==UF_OBJ_FONT_CENTERLINE)//4->中心线移动到255层
{
UF_OBJ_set_layer(ObjectTag, 255);
}
UF_OBJ_cycle_objs_in_part(UF_PART_ask_display_part(), UF_line_type, &ObjectTag);
}
//圆弧
UF_OBJ_cycle_objs_in_part(UF_PART_ask_display_part(), UF_circle_type, &ObjectTag); //UF_circle_type移到10层
while (ObjectTag != NULL_TAG)
{
quantity++;
UF_OBJ_ask_display_properties(ObjectTag,&disp_props);
UF_OBJ_ask_type_and_subtype(ObjectTag, &Type, &SubType); if (Type == UF_circle_type &&disp_props.color==1 &&disp_props.font==UF_OBJ_FONT_SOLID )//白色圆弧移动到10层
{
UF_OBJ_set_layer(ObjectTag, 10);
}
if (Type == UF_circle_type &&disp_props.color!=1 &&disp_props.font==UF_OBJ_FONT_SOLID )//白色圆弧移动到10层
{
UF_OBJ_set_layer(ObjectTag, 11);
}
if (Type == UF_circle_type &&disp_props.font==UF_OBJ_FONT_DASHED)//虚线移动到12层
{
UF_OBJ_set_layer(ObjectTag, 12);
}
if (Type == UF_circle_type &&disp_props.font==UF_OBJ_FONT_CENTERLINE)//4->中心线移动到255层
{
UF_OBJ_set_layer(ObjectTag, 255);
}
UF_OBJ_cycle_objs_in_part(UF_PART_ask_display_part(), UF_circle_type, &ObjectTag);
}
//样条曲线
UF_OBJ_cycle_objs_in_part(UF_PART_ask_display_part(), UF_spline_type, &ObjectTag);//UF_spline_type移动到10层UF_spline_type while (ObjectTag != NULL_TAG)
{
quantity++;
UF_OBJ_ask_display_properties(ObjectTag,&disp_props);
UF_OBJ_ask_type_and_subtype(ObjectTag, &Type, &SubType);
if (Type == UF_spline_type &&disp_props.color==1 &&disp_props.font==UF_OBJ_FONT_SOLID )
{
UF_OBJ_set_layer(ObjectTag, 10);
} if (Type == UF_spline_type &&disp_props.color!=1 &&disp_props.font==UF_OBJ_FONT_SOLID )
{
UF_OBJ_set_layer(ObjectTag, 11);
}
if (Type == UF_spline_type &&disp_props.font==UF_OBJ_FONT_DASHED)//虚线移动到12层
{
UF_OBJ_set_layer(ObjectTag, 12);
}
if (Type == UF_spline_type &&disp_props.font==UF_OBJ_FONT_CENTERLINE)//4->中心线移动到255层
{
UF_OBJ_set_layer(ObjectTag, 255);
}
UF_OBJ_cycle_objs_in_part(UF_PART_ask_display_part(), UF_spline_type, &ObjectTag);
}
//注释阴影等
UF_OBJ_cycle_objs_in_part(UF_PART_ask_display_part(), UF_drafting_entity_type, &ObjectTag);//UF_drafting_entity_type移动到256层 while (ObjectTag != NULL_TAG)
{
quantity++;
UF_OBJ_ask_type_and_subtype(ObjectTag, &Type, &SubType);
if (Type == UF_drafting_entity_type)
{
UF_OBJ_set_layer(ObjectTag, 256);
}
UF_OBJ_cycle_objs_in_part(UF_PART_ask_display_part(), UF_drafting_entity_type, &ObjectTag);
}
//点
UF_OBJ_cycle_objs_in_part(UF_PART_ask_display_part(), UF_point_type, &ObjectTag);//UF_point_type移动到256层UF_spline_type while (ObjectTag != NULL_TAG)
{
quantity++;
UF_OBJ_ask_type_and_subtype(ObjectTag, &Type, &SubType);
if (Type == UF_point_type)
{
UF_OBJ_set_layer(ObjectTag, 256);
}
UF_OBJ_cycle_objs_in_part(UF_PART_ask_display_part(), UF_point_type, &ObjectTag);
}
//坐标
UF_OBJ_cycle_objs_in_part(UF_PART_ask_display_part(), UF_coordinate_system_type, &ObjectTag);//移动到256层 while (ObjectTag != NULL_TAG)
{
quantity++;
UF_OBJ_ask_type_and_subtype(ObjectTag, &Type, &SubType);
if (Type == UF_coordinate_system_type)
{
UF_OBJ_set_layer(ObjectTag, 256);
}
UF_OBJ_cycle_objs_in_part(UF_PART_ask_display_part(), UF_coordinate_system_type, &ObjectTag);
} UF_LAYER_set_all_but_work(4);
UF_LAYER_set_status(1,1);
UF_LAYER_set_status(10,2); sprintf(msg,"循环了%d次",quantity);
uc1601(msg,1);
UF_VIEW_fit_view(view_tag,0.8);
UF_terminate();

  

最新文章

  1. C#初步应用
  2. 简述ES5 ES6
  3. PDO数据库抽象层
  4. Windows Azure 使用体验
  5. 异步IO模型和Overlapped结构
  6. IntelliJ IDEA 教程(1)
  7. HBase 协处理器实现二级索引
  8. GOjs版本2.0去除水印
  9. React时间组件(时分秒补0)页面全局引用
  10. [转]Building a REST-Backend for Angular with Node.js & Express
  11. MyBatis基础入门《七》查询参数传入对象
  12. hdu2732 Leapin' Lizards 最大流+拆点
  13. SQL Fundamentals || Single-Row Functions || 日期函数date functions
  14. git的使用方法学习
  15. linux sleep用法
  16. JavaScript的DOM操作获取元素的大小
  17. $一步一步学Matlab(4)——使用Matlab进行初等数学运算
  18. 关于Visual studio 2017安装方法的若干问题
  19. django-cbv模式-csrf中间件
  20. 奔跑吧,OpenStack现场分享:超融合架构如何抹平物理硬件差异?

热门文章

  1. JavaWeb 验证码
  2. ntp子母钟(gps子母钟系统)时钟系统在智能交通系统中的重要性
  3. 关于vCenter6.7 导出的ovf 不能导入vCenter6.5/6.0的问题
  4. 通过 HDU 2048 来初步理解动态规划
  5. 题目集7-9总结性Blog
  6. kali安装CloudKeyKiller-一款阿里云AK泄露工具
  7. android系统源码编译报错问题分析处理--持续更新
  8. 戴尔n4110在win7下无法使用virtualbox的解决方法(应该对win7都有用)
  9. cookie、session入门
  10. win10安装MAT并单独配置jdk11