I have been trying to add a LabelCurve to a Member with no success. Unfortunately a dotPeek at AecbBldSrvMgd.dll only exposes a thin managed wrapper so I couldn't really find anything useful with it. I have experience adding MVBlock references via .NET however I am not sure if an Anchor is required here. Listening to the Database Appended/Modified events while adding a LabelCurve via the built-in command shows that no new Anchor is added to the database. Here is what I have however it doesn't work. Nothing is visually added to the Member.
<Extension> Public Sub Add(LCS As LabelCurveStyle, Member As Member)
Dim Lock = Document.LockDocument
Dim T = Database.TransactionManager.StartTransaction
Try
Dim BTR As BlockTableRecord = T.GetObject(Database.CurrentSpaceId, OpenMode.ForWrite)
Member = T.GetObject(Member.ObjectId, OpenMode.ForWrite)
Dim LC As New LabelCurve
LC.SetToStandard(Database)
LC.SetDatabaseDefaults(Database)
LC.StyleId = LCS.Id
LC.CurveId = Member.Id
LC.SetDefaultLayer()
LC.LayoutCurveNodes.AddLayoutCurveNode(0)
BTR.AppendEntity(LC)
T.AddNewlyCreatedDBObject(LC, True)
T.Commit()
Catch ex As System.Exception
MsgBox(ex.tostring)
Finally
Lock.Dispose()
T.Dispose()
End Try
End Sub