I'm not sure about changing the crosshair, but you can drag a jig around the
cursor. This example drags a circle.
using System;
using Autodesk.AutoCAD.Runtime;
using Autodesk.AutoCAD.EditorInput;
using Autodesk.AutoCAD.Geometry;
using Autodesk.AutoCAD.DatabaseServices;
using Autodesk.AutoCAD.GraphicsInterface;
using Autodesk.AutoCAD.ApplicationServices;
namespace AU2005.AcadApi
{
//Pages 12 & 13
//New class derrived from the DrawJig class
public class JigExample : DrawJig
{
#region private member fields
private Point3d previousCursorPosition;
private Point3d currentCursorPosition;
private Entity entityToDrag;
#endregion
[CommandMethod("StartJig")]
public void StartJig()
{
//Initialize cursor position
//Use the geometry library to create a new 3d point object
previousCursorPosition = new Point3d (0,0,0);
entityToDrag = new Circle(new Point3d(0,0,0), new Vector3d (0,0,1), 6);
Application.DocumentManager.MdiActiveDocument.Editor.Drag(this);
}
//You must override this method
protected override SamplerStatus Sampler(JigPrompts prompts)
{
//Get the current cursor position
PromptPointResult userFeedback = prompts.AcquirePoint();
currentCursorPosition = userFeedback.Value;
if (CursorHasMoved())
{
//Get the vector of the move
Vector3d displacementVector =
currentCursorPosition.GetVectorTo(previousCursorPosition);
//Transform the circle to the new location
entityToDrag.TransformBy(Matrix3d.Displacement(displacementVector));
//Save the cursor position
previousCursorPosition = currentCursorPosition;
return SamplerStatus.OK;
}
else
{
return SamplerStatus.NoChange;
}
}
//You must override this method
protected override bool WorldDraw(WorldDraw draw)
{
draw.Geometry.Draw(entityToDrag);
return true;
}
private bool CursorHasMoved ()
{
return !(currentCursorPosition == previousCursorPosition);
}
}
}
--
Bobby C. Jones
http://www.acadx.com
"James Stergar" wrote in message
news:5027068@discussion.autodesk.com...
I've seen other Acad applications that put a circle around a crosshair to
represent the bounding area of a block reference when placing it. I've read
through everything in the Acad Managed Class Reference help file and cannot
find a way. Can somebody point me in the right direction?
Thanks in advance,
James