.NET

Reply
Contributor
v_shanmugasundaram
Posts: 11
Registered: ‎08-18-2005
Message 1 of 2 (165 Views)

Entity move

165 Views, 1 Replies
08-24-2005 11:22 PM
hi all,
could anybody tell me how to move an entity by using vb.net?
it's very urgent.

thanks in advance
*Carlos
Message 2 of 2 (165 Views)

Re: Entity move

08-25-2005 04:30 PM 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
Announcements
Are you familiar with the Autodesk Expert Elites? The Expert Elite program is made up of customers that help other customers by sharing knowledge and exemplifying an engaging style of collaboration. To learn more, please visit our Expert Elite website.
Need installation help?

Start with some of our most frequented solutions or visit the Installation and Licensing Forum to get help installing your software.