zoukankan      html  css  js  c++  java
  • Revit API 创建带箭头的标注

     
    [Transaction(TransactionMode.Manual)]
    [Regeneration(RegenerationOption.Manual)]
    public class cmd : IExternalCommand
    {
        public Result Execute(ExternalCommandData cmdData, ref string msg, ElementSet elements)
        {
            UIDocument uiDoc = cmdData.Application.ActiveUIDocument;
            Document doc = uiDoc.Document;
            Selection sel = uiDoc.Selection;

            Transaction ts = new Transaction(doc, "http://revit.5d6d.com");
            ts.Start();

            XYZ xyzOrigin = sel.PickPoint();
            XYZ pt1 = sel.PickPoint();
            XYZ pt2 = sel.PickPoint();
            //
            XYZ baseVec = new XYZ(000);
            XYZ upVec = new XYZ(000);
            double dWidth = 0.16;
            TextAlignFlags textAlign = TextAlignFlags.TEF_ALIGN_LEFT | TextAlignFlags.TEF_ALIGN_TOP;

            TextNote textNote = doc.Create.NewTextNote(
                doc.ActiveView, xyzOrigin, baseVec, upVec, dWidth, textAlign
                , TextNoteLeaderTypes.TNLT_STRAIGHT_L, TextNoteLeaderStyles.LCS_ONE_SEG_LINE, pt1, pt2, "标注");

            ts.Commit();

            return Result.Succeeded;
        }
    }
    url:http://greatverve.cnblogs.com/p/TextNoteLeader.html
  • 相关阅读:
    hdu 1856 More is better
    hdu 1014 Uniform Generator
    hdu 1412 {A} + {B}
    hdu 1022 Train Problem I
    hdu 1027 Ignatius and the Princess II
    hdu 2377 Bus Pass
    POJ 1141 Brackets Sequence
    guava学习,集合专题
    org.apache.commons等常用工具学习
    utf-8mb4和排序规则
  • 原文地址:https://www.cnblogs.com/greatverve/p/TextNoteLeader.html
Copyright © 2011-2022 走看看