.NET
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Reply
Message 1 of 2
v_shanmugasundaram
304 Views, 1 Reply

Entity move

hi all,
could anybody tell me how to move an entity by using vb.net?
it's very urgent.

thanks in advance
1 REPLY 1
Message 2 of 2
Anonymous
in reply to: v_shanmugasundaram

Hey,

I use the TransformBy() method of the block reference. This code is in C#
and rotates the entity as well as moving it, but maybe you can learn
something from it. There are some methods for creating a matrix that just
moves it instead of rotating it. I'd check out the methods of Matrix3d.

-C

// I set this stuff first
Point3d origin = new Point3d(0, 0, 0);
Point3d newLocation;
Vector3d xVector;
Vector3d yVector;
Vector3d oldX = new Vector3d(1, 0, 0);
Vector3d oldY = new Vector3d(0, 1, 0);
Vector3d oldZ = new Vector3d(0, 0, 1);

// This actually performs the rotation
Matrix3d m = Matrix3d.AlignCoordinateSystem(origin, oldX, oldY, oldZ,
location, xVector, yVector, xVector.CrossProduct(yVector));
bref.TransformBy(m);


wrote in message
news:4938352@discussion.autodesk.com...
hi all,
could anybody tell me how to move an entity by using vb.net?
it's very urgent.

thanks in advance

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