예제 #1
0
파일: PAAModel.cs 프로젝트: wzfxue/Revit
        /// <summary>
        /// 获取 线族
        /// </summary>
        public static FamilySymbol GetLineFamily(this PAATextType type, Document doc)
        {
            switch (type)
            {
            case PAATextType.Option1:
                return(PAAContext.Get_MultipleLineOnLine(doc));

            case PAATextType.Option2:
                return(PAAContext.Get_MultipleLineOnEdge(doc));

            default:
                throw new NotImplementedException("暂不支持该类型");
            }
        }
예제 #2
0
파일: PAAModel.cs 프로젝트: wzfxue/Revit
        /// <summary>
        /// 获取文本的定位
        /// </summary>
        /// <param name="textType">定位方式</param>
        /// <param name="currentFontHeight">字体高度</param>
        /// <param name="verticalFix">垂直修正</param>
        /// <param name="verticalVector">垂直向量</param>
        /// <param name="start">横线起点</param>
        /// <param name="end">横线终点</param>
        /// <returns></returns>
        public static XYZ GetTextLocation(this PAATextType textType, double currentFontHeight, XYZ verticalVector, XYZ start, XYZ end)
        {
            switch (textType)
            {
            case PAATextType.Option1:
                return(start + (currentFontHeight / 3) * verticalVector);    //+ verticalFix) * verticalVector;

            case PAATextType.Option2:
                return(end);

            default:
                throw new NotImplementedException("未支持系类定位方案");
            }
            //return textType == PAATextType.OnEdge ? end + (currentFontHeight / 2 + verticalFix) * verticalVector : start + (currentFontHeight + verticalFix) * verticalVector;
        }
예제 #3
0
파일: PAAModel.cs 프로젝트: wzfxue/Revit
 /// <summary>
 /// 获取定位对应的横线宽度
 /// </summary>
 /// <param name="textType"></param>
 /// <returns></returns>
 public static double GetLineWidth(this PAATextType textType)
 {
     return(textType == PAATextType.Option2 ? 200 : 1000);
 }