Alignment GripOverrule Fatal Error
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
When you start move after hover on a grip point which created by GripDataCollection.Add(myGripData) in GetGripPoints(Entity entity, GripDataCollection grips, ...) appears Fatal Error: Unhandled e0434353h Exception at fdbebccdh.
I try Overrule GripPoints for Alignment. For FeatureLine it works.
Possible, the reason is that Alignment is AlignmentEntityCollection and different approach is required.
Please help me to solve the problem.
public class GripVectorOverrule : GripOverrule
{
// A static pointer to our overrule instance
static public GripVectorOverrule theOverrule = new GripVectorOverrule();
public override void GetGripPoints(Entity entity,
GripDataCollection grips,
double curViewUnitSize,
int gripSize,
Vector3d curViewDir,
GetGripPointsFlags bitFlags)
{
myGripData data = new myGripData();
data.GripPoint = newPoint3d(0.0, 0.0, 0.0);
grips.Add(data);
}
}
public class myGripData : GripData
{
public bool result;
public myGripData()
{
result = false;
base.DrawAtDragImageGripPoint = true;
base.RubberBandLineDisabled = true;
}
public new bool AutoDelete
{
get { return result; }
}
}
[CommandMethod("Test")]
public void OverruleStart()
{
ObjectOverrule.AddOverrule(RXClass.GetClass(typeof(Alignment)),
GripVectorOverrule.theOverrule, true);
}