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

Civil 3D VB.net API

218 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 (218 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
Need installation help?

Start with some of our most frequented solutions or visit the Installation and Licensing Forum to get help installing your software.