Ejemplo n.º 1
0
        public static string PointCoordsHanger(string p, Element element)
        {
            XYZ location = ((LocationPoint)element.Location).Point;

            Parameter offsetFromLvlPar    = element.LookupParameter("PipeOffsetFromLevel");
            double    PipeOffsetFromLevel = offsetFromLvlPar.AsDouble();
            XYZ       modLocation         = new XYZ(location.X, location.Y, location.Z + PipeOffsetFromLevel);

            return(" " + p + "=" + NtrConversion.PointStringMm(modLocation));
        }
Ejemplo n.º 2
0
        public static string PointCoords <T>(string p, T subj)
        {
            switch (subj)
            {
            case Connector c:
                return(" " + p + "=" + NtrConversion.PointStringMm(c.Origin));

            case Element element:
                return(" " + p + "=" + NtrConversion.PointStringMm(((LocationPoint)element.Location).Point));

            case XYZ point:
                return(" " + p + "=" + NtrConversion.PointStringMm(point));

            default:
                return("PointCoords in DataWriter does not handle this type of data!");
            }
        }