点击查看详细介绍

创建折线坐标标注尺寸代码,返回创建的尺寸TAG

nxopen 21天前 79 1

UG NX 二次开发(C、C#、WPF)技术交流群:641226372      UG二次开发(C、C#、WPF)


//创建折线坐标标注尺寸
tag_t CreatDrfZXOrddimension(tag_t viewTag, tag_t ordMarginTag, tag_t objTag, double doglegDistance, double origin[3], double angle)
{
    int type=0, subtype=0;
    UF_OBJ_ask_type_and_subtype(objTag, &type, &subtype);

    UF_DRF_object_t object;
    UF_DRF_init_object_structure(&object);
    object.object_view_tag = viewTag;
    object.object_tag = objTag;

    if (type == UF_point_type)
    {
        object.object_assoc_type = UF_DRF_end_point;
        object.object_assoc_modifier = UF_DRF_first_end_point;
    }
    else if (type == UF_solid_type && subtype == UF_solid_edge_subtype)
    {
        int edgeType=0;
        UF_MODL_ask_edge_type(objTag, &edgeType);
        if (edgeType == UF_MODL_CIRCULAR_EDGE)
        {
            object.object_assoc_type = UF_DRF_arc_center;
            object.object_assoc_modifier = 0;
        }
        else if (edgeType == UF_MODL_LINEAR_EDGE)
        {
            object.object_assoc_type = UF_DRF_end_point;
            object.object_assoc_modifier = UF_DRF_first_end_point;
        }
    }

●●●请先 登陆注册 后查看●●●

    return dimensionTag;
}


0

最新回复 (1)
  • 熊武强 11天前
    1

    好东西,学习一下

请登录后发表新帖