- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
I'm trying to create a grip overrule for a specific type of block and so far I have been running into issues of stack overflowing? I tried to follow this sort of templet while making some changes.
This is what I have so far
public override bool IsApplicable(RXObject overruledSubject)
{
try
{
if (overruledSubject.GetType() != typeof(BlockReference))
return false;
BlockReference block = overruledSubject as BlockReference;
return block.IsInstanceOf("Left stretch");//need to make more robust for any panel type
}
catch(Autodesk.AutoCAD.Runtime.Exception e)
{
return false;
}
}
public override void GetGripPoints(Entity entity, GripDataCollection grips, double curViewUnitSize, int gripSize, Vector3d curViewDir, GetGripPointsFlags bitFlags)
{
try
{
base.GetGripPoints(entity, grips, curViewUnitSize, gripSize, curViewDir, bitFlags);
GripDataCollection borderGrips = ComputeBorderGrips(entity);
foreach(var t in borderGrips) grips.Add(t);
}
catch(Exception e)
{
base.GetGripPoints(entity, grips, curViewUnitSize, gripSize, curViewDir, bitFlags);
}
}
I seem to get stuck in a loop at line 22 where I call base.GetGripPoints(). It then goes to IsApplicable() and loops until a stackoverflow occurs.
Any help would be greatly appreciated.
Solved! Go to Solution.