AutoCAD Architecture Customization
Welcome to Autodesk’s AutoCAD Architecture Customization Forums. Share your knowledge, ask questions, and explore popular AutoCAD Architecture Customization topics.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Need help with AnchorEntityToEntity location of anchored object

0 REPLIES 0
Reply
Message 1 of 1
jshimkus
271 Views, 0 Replies

Need help with AnchorEntityToEntity location of anchored object

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.SetToStandard(mydb)
    anc2.SubSetDatabaseDefaults(mydb)
    anc2.ReferencedEntityId = BeamObjId
    anc2.OwnerId = BeamObjId
    MVPObj.SetAnchor(anc2)
    acTrans.Commit()
End Using

 

0 REPLIES 0

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Autodesk Design & Make Report

”Boost