Object data to Aeccpoints

Object data to Aeccpoints

Anonymous
Not applicable
461 Views
1 Reply
Message 1 of 2

Object data to Aeccpoints

Anonymous
Not applicable

I want to be able to attach object data to a cogopoint, becuase we are having problems with the attribute data disappearing from the point. Here is what I have so far but getting a Autodesk.Gis.Map.MapException error thrown. 

 

oAeccApp = oAcadApp.GetInterfaceObject("AeccXUiLand.AeccApplication.9.0")
oAeccDoc = oAeccApp.ActiveDocument
oAeccDB = oAeccApp.ActiveDocument.Database

Dim oPoints As Autodesk.AECC.Interop.Land.AeccPoints
Dim oPoint As Autodesk.AECC.Interop.Land.AeccPoint
oPoints = oAeccDB.Points

Dim pointLocation As Point3d = Nothing

Dim location(0 To 2) As Double
location(0) = x
location(1) = y
location(2) = z
oPoint = oAeccDoc.Points.Add(CType(location, Object))
oPoint.RawDescription = myPoints(4)

oPoint.Number = pid
Dim id As ObjectId = PointEntity.FromAcadObject(oPoint)
Dim pt As PointEntity = acTrans.GetObject(id, Autodesk.AutoCAD.DatabaseServices.OpenMode.ForWrite, False)
Dim odtable As ObjectData.Table = tables(tablename)

' Create and initialize an record
Dim tblRcd As Record = Record.Create()
odtable.InitRecord(tblRcd)


Dim val As MapValue = tblRcd(0) ' String type

val.Assign(myPoints(0).Trim)


For cnt = 1 To myPoints.GetUpperBound(0) - 3

val = tblRcd(cnt)
val.Assign(myPoints(cnt + 3))


Next


val = tblRcd(12)
val.Assign(Path.GetFileName(CSV_FileName))


table.AddRecord(tblRcd, id)  ''Autodesk.Gis.Map.MapException is thrown here

0 Likes
462 Views
1 Reply
Reply (1)
Message 2 of 2

Anonymous
Not applicable

I solved this by importing the points first and then running through the csv again to apply the object data.

0 Likes