.NET
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Civil 3D VB.net API

1 REPLY 1
Reply
Message 1 of 2
saluki
394 Views, 1 Reply

Civil 3D VB.net API

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
Next
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
1 REPLY 1
Message 2 of 2
saluki
in reply to: saluki

The line of code in question should be:

Surf = m_oAeccDoc.Surfaces

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Autodesk DevCon in Munich May 28-29th


Autodesk Design & Make Report

”Boost