Hi John,
Unzip the attached file and read it with "Paint"
Regards,
Laurie Comerford
jcoon wrote:
> Laurie
> what e-mail should I use?
> zip file is about 2 meg
>
> john
> "Laurie" wrote in message
> news:6321937@discussion.autodesk.com...
> Hi John,
>
> Assemble the one I put in the post into the correct format. Due to spam
> issues I'm not prepared to post a directly usable Email address here.
>
> 2Mb on a direct email is not an issue.
>
>
> Regards,
>
>
> Laurie Comerford
>
> jcoon wrote:
>
>> Laurie
>>
>> what e-mail do I use? zip is about 2 meg
>>
>> john
>>
>> "Laurie" wrote in message
>> news:6320480@discussion.autodesk.com...
>> Hi John,
>>
>> I'm sort of tied up for the next couple of days, so won't have time to
>> think this through thoughoughly.
>>
>> Could you send me a stripped down drawing containing a sample surface
>> model you use for the air craft clearance
>>
>> Also a stripped down drawing as supplied to you containing AutoCAD
>> points and lastly a stripped down point file of the type you get from
>> the client.
>>
>> I'll put something together to show possibilities.
>>
>> laurie
>> dot
>> comerford
>> at
>> westnet
>> dot
>> com
>> dot
>> au
>>
>> Regards,
>>
>>
>> Laurie Comerford
>> jcoon wrote:
>>
>>
>>> Laurie,
>>>
>>> The routines I have reads each point and sample a selected surface. It
>>> determines if the point elevation is above the surface and if it is is
>>> places a block, it also checks to see if the object is within ten feet of
>>> the surface.
>>> if the object is within ten feet below it places a different block. it
>>> also
>>> writes out the station and offset of each tagged object.
>>>
>>> Laurie, I normally get a drawing that contains AutoCAD points at
>>> elevation
>>> or a text file with the northing, easting, elevation & desc. I convert
>>> the
>>> AutoCAD points to aecpoints or I write the points into a drawing so I can
>>> identify the objects later by the point number from the excel file
>>> output..
>>> any ideas of how to do that from an external file. would I just read the
>>> point number from the text file?
>>>
>>> How would check the surface elevation from a text file?
>>>
>>> Have a great day,
>>> John
>>>
>>> Set objSurf.name by selection onscreen or by listbox
>>>
>>> Dim dblNorth As Double
>>> Dim dblEast As Double
>>> Dim dblElev As Double
>>> Dim dblDesc As String
>>> Dim dblInsPnt(3) As Double
>>> Dim intInputFile As Integer
>>> Open "C:\temp\pointsin.csv" For Output As 1# 'Open file for output
>>>
>>> Do While Not EOF(intInputFile)
>>> 'read sequential, delimited values from the input file and store them
>>> as
>>> Input #intInputFile, dblNorth, dblEast,dblElev, dblDesc
>>>
>>> 'the following lines store the insertion point obtained above in an
>>> array
>>> dblInsPnt(0) = dblNorth
>>> dblInsPnt(1) = dblEast
>>> dblInsPnt(2) = dblElev
>>> dblInsPnt(3) = dblDesc
>>>
>>> 'get surface elevation at location from array obtained from text file
>>>
>>> 'check if above or withing ten feet of surface test
>>> Loop
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>> "Laurie" wrote in message
>>> news:6319781@discussion.autodesk.com...
>>> Hi John,
>>>
>>> Surely virtually all of these points started off in an external file(s).
>>>
>>> I would not put them in the drawing, but process the source files.
>>>
>>> By having them in the drawing, you are creating an enormous useless
>>> overhead. Surely you notice moving around and doing anything in the
>>> drawing is slow.
>>>
>>> Here's a couple of alternative approaches to your design analysis.
>>>
>>> Allowing that points on tower tops etc in your surface model will create
>>> "an envelope" in the surface by linking to the nearest ground points
>>> this would lead to a conservative analysis method.
>>>
>>> 1 Build a surface model, then the surface model has can be used to
>>> "Intersectwith" a set of flight path bounding polylines. (I guess you
>>> have already used these polylines (or the logical equivalent) to build
>>> the flight control surfaces - so the second method becomes much more
>>> attractive.
>>>
>>> Programming very simple as you only need a selection set of the
>>> polylines and do an "intersectwith" for each polyline
>>>
>>> 2 Create a volume surface between the surface built from the points and
>>> the flight control surfaces.
>>>
>>> This would give an immediate and readily visible analysis.
>>>
>>> Programming required "Nil"
>>>
>>>
>>> Regards,
>>>
>>>
>>> Laurie Comerford
>>>
>>> jcoon wrote:
>>>
>>>
>>>
>>>> Laurie, Christopher
>>>>
>>>> Thank you for helping me with this point selection test. I'm trying to
>>>> covert some old Land routines to C3D until I can eventually move these
>>>> to
>>>> dot net.
>>>>
>>>> Laurie, The reason for the test is to confirm that the approach path (
>>>> highway) to a runway is clear of obstructions, that includes sampling
>>>> 2-10
>>>> miles of ground points, trees and any other objects like cell phone
>>>> towers
>>>> to that approach. Because of that I routinely need to sample over 100k
>>>> of
>>>> points against control surfaces to identify penetration to those
>>>> surfaces..
>>>>
>>>> With the modified filter and changing the count to long I now get the
>>>> expected results. Only thing remaining is to see if I can add a progress
>>>> bar. I normally push the selection to the command line so the user can
>>>> see
>>>> that the routine has not halted becuase it takes a short amount of time
>>>> to
>>>> sample these points against the control surfaces. if the point is a
>>>> penetration I collect the point number,
>>>> northing,easting,elevation,description and what surface name it
>>>> penetrates.
>>>>
>>>> Thanks for all your help.
>>>> John
>>>>
>>>> "Laurie" wrote in message
>>>> news:6319608@discussion.autodesk.com...
>>>> Hi John,
>>>>
>>>> A couple of comments.
>>>>
>>>> Why are you selecting blocks as well as AEC Points?
>>>>
>>>> The filter command you need for AEC Points is:
>>>> {code}
>>>>
>>>> Dim ftype(0) As Integer
>>>> Dim fdata(0) As Variant
>>>> ftype(0) = 0: fdata(0) = "AECC_COGO_POINT"
>>>>
>>>> {code}
>>>> I presume this is test code, but I simply can't picture why a drawing
>>>> would have 100,000 points in it. Assuming they were regularly spaced at
>>>> minimum spacing to suit the label display size and there was no other
>>>> data you would need about 50 A1 drawing sheets just to plot them legibly
>>>>
>>>> {code}
>>>> " Elev= " & oPoint.Description
>>>> {code}
>>>> seems a bit weird. I would have expected:
>>>> {code}
>>>> " Elev= " & oPoint.Elevation
>>>> {code}
>>>>
>>>> In the posted code you do not use the Civil 3D objects oCivilApp,
>>>> oDocument and oAeccDatabase
>>>>
>>>> The following still works
>>>> {code}
>>>>
>>>> 'module
>>>> Function GetBaseCivilObjects() As Boolean
>>>> Dim oApp As AcadApplication
>>>> Set oApp = ThisDrawing.Application
>>>> ' NOTE - Always specify the version number.
>>>> Const sAppName = "AeccXUiLand.AeccApplication.7.0"
>>>> ' Set g_oCivilApp = oApp.GetInterfaceObject(sAppName)
>>>> If (oApp.GetInterfaceObject(sAppName) Is Nothing) Then
>>>> ' If (g_oCivilApp Is Nothing) Then
>>>> MsgBox "Error creating Civil 3D environment, program will exit"
>>>> GetBaseCivilObjects = False
>>>> Exit Function
>>>> End If
>>>> ' Set g_oDocument = g_oCivilApp.ActiveDocument
>>>> ' Set g_oAeccDatabase = g_oDocument.Database
>>>> GetBaseCivilObjects = True
>>>> End Function
>>>>
>>>> {code}
>>>>
>>>> For purposes of testing I put 10,000 points in a drawing and the code
>>>> ran OK for me, taking about 3.7 seconds
>>>>
>>>> By redefining the filter, I was guaranteed not to include anything in
>>>> the selection set but Civil 3D points, but for safety added:
>>>>
>>>> {code}
>>>> If TypeOf oPoint Is AeccPoint Then
>>>> ThisDrawing.Utility.Prompt vbCrLf & "Command: PT= " & oPoint.Number
>>>> & " N= " & oPoint.NORTHING & " E= " & oPoint.EASTING & " Elev= " &
>>>> oPoint.Elevation & vbCrLf
>>>> End If
>>>> {code}
>>>>
>>>> Curiously the code then ran about 2% faster even though it had to
>>>> evaluate the If statement
>>>>
>>>> I tried redefining oPoint as an AeccPoint instead of a variant, - code
>>>> ran marginally faster, perhaps 1%
>>>>
>>>>
>>>>
>>>> Regards,
>>>>
>>>>
>>>> Laurie Comerford
>>>> jcoon wrote:
>>>>
>>>>
>>>>
>>>>
>>>>> Can anyone see why I'd get an overflow error selecting points. I've
>>>>> used
>>>>> this same basic selection type in Land and never got and error when
>>>>> selecting 100 thousand points.
>>>>> how should I iterate thru points in civil 3D?
>>>>>
>>>>>
>>>>> John
>>>>>
>>>>> Private Sub CommandButton1_Click()
>>>>> hide
>>>>> If (GetBaseCivilObjects() = False) Then
>>>>> Exit Sub
>>>>> End If
>>>>>
>>>>> Dim oPoint As Variant
>>>>> Dim ssetObj As AcadSelectionSet
>>>>> Dim i As Integer
>>>>> Dim icount As Integer
>>>>>
>>>>> Dim ftype(0 To 3) As Integer
>>>>> Dim fdata(0 To 3) As Variant
>>>>> ftype(0) = -4: fdata(0) = "
>>>>> ftype(1) = 0: fdata(1) = "AECC_COGO_POINT"
>>>>> ftype(2) = 0: fdata(2) = "INSERT"
>>>>> ftype(3) = -4: fdata(3) = "or>"
>>>>>
>>>>> Set ssetObj = ThisDrawing.SelectionSets.Add("SSet")
>>>>> ssetObj.SelectOnScreen ftype, fdata
>>>>> MsgBox "count is " & ssetObj.Count & vbCrLf
>>>>>
>>>>> 'i is the number of items in the selection set of aec points
>>>>> For i = 0 To ssetObj.Count - 1
>>>>> Set oPoint = ssetObj.Item(i)
>>>>>
>>>>> On Error Resume Next
>>>>> ThisDrawing.Utility.Prompt vbCrLf & "Command: PT= " & oPoint.Number
>>>>> &
>>>>> "
>>>>> N= " & oPoint.NORTHING & " E= " & oPoint.EASTING & " Elev= " &
>>>>> oPoint.Description
>>>>>
>>>>> Next i
>>>>> ssetObj.Delete
>>>>> UserForm1.Show
>>>>> End Sub
>>>>>
>>>>>
>>>>> 'module
>>>>> Function GetBaseCivilObjects() As Boolean
>>>>> Dim oApp As AcadApplication
>>>>> Set oApp = ThisDrawing.Application
>>>>> ' NOTE - Always specify the version number.
>>>>> Const sAppName = "AeccXUiLand.AeccApplication.7.0"
>>>>> Set g_oCivilApp = oApp.GetInterfaceObject(sAppName)
>>>>> If (g_oCivilApp Is Nothing) Then
>>>>> MsgBox "Error creating " & sAppName & ", exit."
>>>>> GetBaseCivilObjects = False
>>>>> Exit Function
>>>>> End If
>>>>> Set g_oDocument = g_oCivilApp.ActiveDocument
>>>>> Set g_oAeccDatabase = g_oDocument.Database
>>>>> GetBaseCivilObjects = True
>>>>> End Function
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>