.NET
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Moving a block that has associated visible text attributes.

6 REPLIES 6
Reply
Message 1 of 7
Anonymous
443 Views, 6 Replies

Moving a block that has associated visible text attributes.

Ok, I am more than sure I am missing something simple.

I am using managed classes to insert multiple block references into modelspace. I wish to insert a block and then move it (change its Position) which I can do. The problem is that my attributes associated with this block reference do not move.

Could someone please point me at the correct function(s)?
6 REPLIES 6
Message 2 of 7
Anonymous
in reply to: Anonymous

Well, it seems I may have posted too soon.

I moved the block reference THEN updated the attribute reference and all is well (so far).
Message 3 of 7
foruma000256
in reply to: Anonymous

IF you move the block reference using a transformation matrix, THEN it should move all the attribute references as well. TransformBy should be used for move and rotate all the time.

Example:

Dim point As Point3d = AbsoluteLocation
Dim matM As New Matrix3d
Dim pStart As Point3d = brLabel.Position
Dim vDiff As New Vector3d(point.X - pStart.X, point.Y - pStart.Y, point.Z - pStart.Z)
matM = Matrix3d.Displacement(vDiff)
brLabel.TransformBy(matM)


Also there are more advanced ways to do point/vector math built into the point and vector objects.

jvj
Message 4 of 7
Anonymous
in reply to: Anonymous

Ah-ha! Thank you for the guidance.
Message 5 of 7
Anonymous
in reply to: Anonymous

Interesting.

Now when I use a function with TransformBy() the blockreference I insert does not seem to be present! It doesn't make it into the block def table as it did before (as such does not appear in modelspace, paperspace or anywhere). ....
Message 6 of 7
foruma000256
in reply to: Anonymous

Strange indeed. Can you post that code here? There are several posibilities, but seeing your code will narrow them down.
Message 7 of 7
JanetDavidson
in reply to: Anonymous

Hello askrius.

Maybe too lat but

I am having this problem as well. I don't know how to fix it and what do you mean by updating attributes.

Regards,

Janet.

 

 

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

Post to forums  

Autodesk DevCon in Munich May 28-29th


Autodesk Design & Make Report

”Boost