Distinguished Contributor
Posts: 188
Registered: ‎09-18-2005
Message 1 of 2 (223 Views)

Civil 3D VB.net API

223 Views, 1 Replies
10-20-2005 07:50 AM
Here's a snipet of code I'm adapting from VBA to vb.net from one of the civil3d webcasts to adjust the elevation of points in a point group to a surface elevation.

Everything seems to be working except the following line of code:

Surf = m_oAeccApp.Surfaces

There seems to be a problem setting surf to the surfaces object.

Private Sub ButtonRefresh_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ButtonRefresh.Click
If IsNothing(m_oAcadApp) = False Then
m_oAeccApp = m_oAcadApp.GetInterfaceObject(m_sAeccAppProgId)
m_oAeccDoc = m_oAeccApp.ActiveDocument
m_oAeccDb = m_oAeccDoc.Database
'Populate Dropdowns
Dim PtGroup As AeccLandLib.AeccPointGroups
Dim PtGroupList() As Object
PtGroup = m_oAeccDoc.PointGroups
l = PtGroup.Count
ReDim PtGroupList(l - 1)
For m = 0 To l - 1
PtGroupList(m) = PtGroup.Item(m).Name
Next m
Me.ComboBoxPtGroup.Text = PtGroup.Item(0).Name
Me.ComboBoxPtGroup.DataSource = BubbleSort(PtGroupList)

Dim Surf As AeccLandLib.AeccSurfaces
Dim SurfList() As Object
Surf = m_oAeccApp.Surfaces
j = Surf.Count
If j > 0 Then
ReDim SurfList(j - 1)
For k = 0 To j - 1
SurfList(k) = Surf.Item(k).Name
Me.ComboBoxSurf.DataSource = BubbleSort(SurfList)
Me.ComboBoxSurf.Text = SurfList(0)
Else : Me.ComboBoxSurf.Text = ""
End If

End If
'End population of dropdowns

End Sub
End Class

Thanks in advance
Distinguished Contributor
Posts: 188
Registered: ‎09-18-2005
Message 2 of 2 (223 Views)

Re: Civil 3D VB.net API

10-20-2005 09:29 PM in reply to: saluki
The line of code in question should be:

Surf = m_oAeccDoc.Surfaces
Post to the Community

Have questions about Autodesk products? Ask the community.

New Post
Do you have 60 seconds to spare? The Autodesk Community Team is revamping our site ranking system and we want your feedback! Please click here to launch the 5 question survey. As always your input is greatly appreciated.