I am trying to manipulate some code where the intersections of 
     overlapping polygons are drawn as a table.  Here's the code:
     Sub MakeReg
       Dim brushStyle As Brush
        Dim penStyle As Pen
       Dim oObj As Object
       Dim rArea As Integer
       Dim rPerimeter As Integer   
        If TableInfo(TempHold,TAB_INFO_NROWS) < 2 Then
         Note "At Least 2 Region Objects Must Have Been Selected."
                Dialog Title "Choose Parameters"
                        Control StaticText   Position 10,10    Title "File 
                        Control EditText     Position 15,20    Into 
     gsIntTable Value gsIntTable Width 100 ID 1
                        Control StaticText   Position 10,40    Title "Fill 
                        Control BrushPicker  Position 15,50    Value 
     CurrentBrush() Width 20 Height 20 Into brushStyle
                        Control StaticText   Position 60,40    Title "Line 
                        Control PenPicker    Position 65,50    Value 
     CurrentPen() Width 20 Height 20 Into penStyle
                        Control OKButton     Calling ChkFile
                        Control CancelButton    
                If CommandInfo(CMD_INFO_DLG_OK) Then 
                        Set Event Processing Off
                        Create Table gsIntTable (ID Integer, AREA Integer, 
     Perimeter Integer)
                        Create Map For gsIntTable
                        Set Style Brush brushStyle
                        Set Style Pen penStyle
                        Create Object As Intersect From TempHold Into 
     Variable oObj
                        rArea = Area(oObj, "sq mi")
                        rPerim = Perimeter(oObj, "nmi")
           If ObjectInfo(oObj,OBJ_INFO_NPNTS) = 0 Then
                                Note "No Common Intersection Found."
                                Drop Table gsIntTable
             Alter Object oObj Info OBJ_INFO_BRUSH, brushStyle
             Alter Object oObj Info OBJ_INFO_PEN, penStyle
             Insert Into gsIntTable (Obj) Values (oObj, rArea, rPerim)
                                Run Menu Command M_ANALYZE_UNSELECT
                                Commit Table gsIntTable
                                Add Map Auto Layer gsIntTable
             Set Map Layer gsIntTable Editable On
                        End If                  'was int found
                        gbStartProc = False
                        Alter Menu Item MakeReg Disable
                        Alter Menu Item BeginAccum text "&Begin 
                        Drop Table TempHold
                End If                          'ok hit
        End If                                  'more than 1 obj selected
     End Sub
     Basically what I am trying to do is Find out what the Area and 
     Perimeter is of the new Object created by an intersection and write it 
     to the new table created called TempHold.  I can make the table with 
     the correct columns but I keep getting a message that says:  "Number 
     of columns in selection must be equal to the number of columns being 
     Any ideas?  I think I may be close.
     Todd McNeil
     GIS Specialist
     Annapolis, Maryland
To unsubscribe from this list, send e-mail to [EMAIL PROTECTED] and put
"unsubscribe MAPINFO-L" in the message body, or contact [EMAIL PROTECTED]

Reply via email to