Based on your help file reference I'm guessing that this is in C3D2010. I
don't see anything wrong with the snip you've posted. The following small
test command, using the same sample code, executes without error here, so I
don't think there's a problem with the internal C3D code.
This is about all I've got at this time.
{code}
Imports System
Imports Autodesk.AutoCAD.Interop
Imports Autodesk.AutoCAD.ApplicationServices
Imports Autodesk.AutoCAD.Runtime
Imports Autodesk.AECC.Interop
Imports Autodesk.AECC.Interop.Land
Imports Autodesk.AECC.Interop.UiLand
Public Class Class1
_
Public Sub TestMe()
Dim m_AcadApp As AcadApplication
m_AcadApp = Application.AcadApplication()
Dim m_oAeccApp As New AeccApplication()
m_oAeccApp.Init(m_AcadApp)
Dim oDocument As AeccDocument
oDocument = m_oAeccApp.ActiveDocument
ImportPointsfromFile(oDocument)
m_oAeccApp = Nothing
End Sub
Sub ImportPointsfromFile(ByVal oDocument As AeccDocument)
Dim oPoints As AeccPoints
Dim oImportOptions As New AeccPointImportOptions
Dim sFilename As String
Dim sFileFormat As String
Dim iCount As Integer
oPoints = oDocument.Points
sFilename = "C:\My Documents\SamplePointFile.txt"
sFileFormat = "PENZ (space delimited)"
oImportOptions.PointDuplicateResolution =
AeccPointDuplicateResolutionType.aeccPointDuplicateOverwrite
iCount = oPoints.ImportPoints(sFilename, sFileFormat,
oImportOptions)
' Export the files to a separate file.
Dim oExportOptions As New AeccPointExportOptions
sFilename = "C:\My Documents\SamplePointFile2.txt"
oExportOptions.ExpandCoordinateData = True
oPoints.ExportPoints(sFilename, sFileFormat, oExportOptions)
End Sub
End Class
{code}
"dotela" wrote in message news:6215484@discussion.autodesk.com...
> I am working on an app in Vis Studio 2008 to bring a survey text file into
> a DWG. I am getting an error on the AeccPointImportOptions variable of
> the Points.ImportPoints function. This code I actually copied verbatim
> out of the civil_api_developers_guide.pdf p. 39. I get no compile errors,
> but get the error in the attached pic when the code runs.
>
> Any ideas?
>