Beispiel #1
0
        /***************************************************/
        /**** Private Methods                           ****/
        /***************************************************/

        private static void AssignmentWarning(IFAssignment lusasAssignment)
        {
            if (lusasAssignment.getDatabaseObject() is IFPoint)
            {
                Engine.Base.Compute.RecordWarning(
                    lusasAssignment.GetType().ToString() + " does not support assignment to points, these have not been pulled");
            }
            else if (lusasAssignment.getDatabaseObject() is IFLine)
            {
                Engine.Base.Compute.RecordWarning(
                    lusasAssignment.GetType().ToString() + "  does not support assignment to lines, these have not been pulled");
            }
            else if (lusasAssignment.getDatabaseObject() is IFSurface)
            {
                Engine.Base.Compute.RecordWarning(
                    lusasAssignment.GetType().ToString() + " does not support assignment to surfaces, these have not been pulled");
            }
        }
        /***************************************************/
        /**** Private Methods                           ****/
        /***************************************************/

        private void DeletePointAssignments(object[] lusasAttributes)
        {
            for (int i = 0; i < lusasAttributes.Count(); i++)
            {
                IFAttribute lusasAttribute   = (IFAttribute)lusasAttributes[i];
                object[]    lusasAssignments = lusasAttribute.getAssignments();
                for (int j = 0; j < lusasAssignments.Count(); j++)
                {
                    IFAssignment lusasAssignment = (IFAssignment)lusasAssignments[j];
                    IFGeometry   lusasGeometry   = (IFGeometry)lusasAssignment.getDatabaseObject();
                    if (lusasGeometry is IFPoint)
                    {
                        Engine.Base.Compute.RecordWarning(lusasAttribute.getName() + " has been deleted because it was assigned to a point");
                        d_LusasData.Delete(lusasAttribute);
                        break;
                    }
                }
            }
        }