.NET

Reply
Contributor
tdunn3
Posts: 18
Registered: ‎09-13-2007
Message 1 of 2 (142 Views)

Object data to Aeccpoints

142 Views, 1 Replies
08-06-2012 04:53 PM

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

Contributor
tdunn3
Posts: 18
Registered: ‎09-13-2007
Message 2 of 2 (113 Views)

Re: Object data to Aeccpoints

08-08-2012 06:03 AM in reply to: tdunn3

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

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.