Пример #1
0
 public TextCurveObject(TextCurveObject OBJ)
 {
     StationStart = OBJ.StationStart;
     StationEnd   = OBJ.StationEnd;
     StationText  = OBJ.StationText;
     PointStart   = OBJ.PointStart;
     PointCenter  = OBJ.PointCenter;
     PointEnd     = OBJ.PointEnd;
     CurveLength  = OBJ.CurveLength;
     CurveRadius  = OBJ.CurveRadius;
 }
Пример #2
0
        private double ExtractLandXmlCurve(List <TextObjects> textObjectFromLandXml, double stationStart, Curve Cs)
        {
            var LS          = Cs.staStart;
            var StartPoint  = (Cs.Items[0] as PointType).Text;
            var CenterPoint = (Cs.Items[1] as PointType).Text;
            var EndPoint    = (Cs.Items[2] as PointType).Text;

            XYZ PointPI = null;

            if (Cs.Items.Count() > 3)
            {
                var PI = (Cs.Items[3] as PointType).Text;
                PointPI = ExtractPoint(PI);
                var Radius      = Cs.radius;
                var CurveLength = Cs.length;

                double stationEnd = stationStart + Cs.length;

                XYZ PointStart  = ExtractPoint(StartPoint);
                XYZ PointCenter = ExtractPoint(CenterPoint);
                XYZ PointEnd    = ExtractPoint(EndPoint);

                TextCurveObject CUrveEle   = new TextCurveObject(stationStart, stationEnd, stationStart, PointStart, PointCenter, PointEnd, PointPI, Radius, CurveLength);
                var             ElementCnv = CUrveEle.ConvertInsertpointsToInternal();
                Arc             HS         = Arc.Create(ElementCnv.PointStart, ElementCnv.PointEnd, ElementCnv.PointPI);


                textObjectFromLandXml.Add(CUrveEle);

                using (Transaction se = new Transaction(uiDoc.Document, "New Tra"))
                {
                    se.Start();
                    uiDoc.Document.Create.NewDetailCurve(uiDoc.ActiveView, HS);
                    se.Commit();
                }
            }

            return(stationStart);
        }