C# NX二次开发-绘制临时箭头

文章详细描述了如何在Revit中通过UFSession的Disp方法绘制临时箭头和带有标签的锥形头,提供了不同显示选项和锚点位置参数。
摘要由CSDN通过智能技术生成

绘制一点临时箭头和一个带标签的临时箭头

 /// <summary>
 /// 绘制临时箭头
 /// UFConstants.UF_DISP_WORK_VIEW_ONLY
 /// UFConstants.UF_DISP_ALL_ACTIVE_MEMBER_VIEWS   (-4)
 /// UFConstants.UF_DISP_ALL_VIEWS_BUT_DRAWING     (-3)
 /// UFConstants.UF_DISP_VIEW_OF_LAST_CURSOR       (-2)
 /// UFConstants.UF_DISP_ALL_ACTIVE_VIEWS          (-1)
 /// UFConstants.UF_DISP_WORK_VIEW_ONLY              0
 /// anchor 0 = Anchor point at base of staff
 /// anchor 1 = Anchor point at tip of arrowhead
 /// anchor 2 = Anchor point at base of arrowhead
 /// </summary>

  void DrawConehead(Vector3d vec, Point3d point, int display = UFConstants.UF_DISP_WORK_VIEW_ONLY, int anchor = 0)
 {
   var uf = UFSession.GetUFSession();
   uf.Disp.Conehead(display, point.ToArray(), vec.ToArray(), anchor);
 }

 /// <summary>
 /// 绘制临时箭头
 /// UFConstants.UF_DISP_WORK_VIEW_ONLY
 /// UFConstants.UF_DISP_ALL_ACTIVE_MEMBER_VIEWS   (-4)
 /// UFConstants.UF_DISP_ALL_VIEWS_BUT_DRAWING     (-3)
 /// UFConstants.UF_DISP_VIEW_OF_LAST_CURSOR       (-2)
 /// UFConstants.UF_DISP_ALL_ACTIVE_VIEWS          (-1)
 /// UFConstants.UF_DISP_WORK_VIEW_ONLY              0
 /// anchor 0 = Anchor point at base of staff
 /// anchor 1 = Anchor point at tip of arrowhead
 /// anchor 2 = Anchor point at base of arrowhead
 /// </summary>
 void DrawConehead(Vector3d vec, Point3d point, string label, int display = UFConstants.UF_DISP_WORK_VIEW_ONLY, int anchor = 0)
 {
   var uf = UFSession.GetUFSession();
   uf.Disp.LabeledConehead(display, point.ToArray(), vec.ToArray(), anchor, label);
 }

评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值