/// <summary> /// Encuentra el valor de texto conectado por una línea conectada /// alguna entrada /// </summary> /// <returns>El valor del texto conectado alguna entrada</returns> public String FindTextInput(BBox inputBox) { ObjectIdCollection ids; if (Lab2.Selector.ByBox(inputBox.Min, inputBox.Max, this.LineFilter, out ids)) { Line l = Lab3.DBMan.OpenEnity(ids[0]) as Line; if (SelectByPoint(l.StartPoint, this.TextFilter, out ids)) return (Lab3.DBMan.OpenEnity(ids[0]) as DBText).TextString; else if (SelectByPoint(l.EndPoint, this.TextFilter, out ids)) return (Lab3.DBMan.OpenEnity(ids[0]) as DBText).TextString; else return "0"; } else return "0"; }
/// <summary> /// Crea las cajas de colisión de la aplicación /// </summary> public void Load() { BlockReference blkRef = DBMan.OpenEnity(this.Id) as BlockReference; this.Name = blkRef.Name; Point3d min = blkRef.GeometricExtents.MinPoint, max = blkRef.GeometricExtents.MaxPoint; BoxInputA = new BBox(new Point3d(min.X, (min.Y + max.Y) / 2, 0), new Point3d((min.X + max.X) / 2, max.Y, 0)); BoxInputB = new BBox(min, new Point3d((min.X + max.X) / 2, (min.Y + max.Y) / 2, 0)); BoxOutput = new BBox(new Point3d((min.X + max.X) / 2, min.Y, 0), max); }