Distinguished Contributor
Posts: 104
Registered: ‎03-19-2007
Message 1 of 2 (113 Views)

Need help with AnchorEntityToEntity location of anchored object

113 Views, 1 Replies
07-05-2012 05:20 AM

With VB.Net I'm trying to anchor an MVPart to a Railing.

I add the MVPart at a specific location first, and it is located correctly.

Then I attempt to anchor it with AnchorEntityToEntity and it anchors fine but the MVPart moves from where it was originally located.

I repeat this process a few times and all the anchored MVParts are displaced the same.

What am I missing in my code snippet below to get the MVPart to maintain its location?


Using acTrans As Transaction = mydb.TransactionManager.StartTransaction()
    MVPObj = acTrans.GetObject(MVPObjID, OpenMode.ForWrite) ' MultiViewPart
    BeamObj = acTrans.GetObject(BeamObjId, OpenMode.ForRead) 'Railing object
    Dim anc2 As New AecDBS.AnchorEntityToEntity
    anc2.ReferencedEntityId = BeamObjId
    anc2.OwnerId = BeamObjId
End Using



ADN Support Specialist
Posts: 387
Registered: ‎04-30-2009
Message 2 of 2 (108 Views)

Re: Need help with AnchorEntityToEntity location of anchored object

07-05-2012 08:22 AM in reply to: CommCorp

I would suggest you post this question on the AutoCAD Architecture Customization forum


Augusto Goncalves
Autodesk Developer Network
Post to the Community

Have questions about Autodesk products? Ask the community.

New Post
Are You Going To Be @ AU 2014? Feel free to drop by our AU topic post and share your plans, plug a class that you're teaching, or simply check out who else from the community might be in attendance. Ohh and don't forgot to stop by the Autodesk Help | Learn | Collaborate booths in the Exhibit Hall and meet our community team if you get a chance!