Message 1 of 14
AutoCAD suddenly closes without any message or error while jigging
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Hello to every one. happy new year in advance.
I have an issue with jigging a couple of entities. my class inherits from DrawJig.
in this class I have some heavy calculation per mouse movement. some times, not always, AutoCAD suddenly closes without any prior notice, message or error.
it doesn't crash and show the error message. it just suddenly closes.
I have two methods called in my sampler, one gets PromptPointOptions and the other manipulates some objects after I have the new jigRes point:
public Point3d UpdatePosition(Point3d position)
{
if(Dim1 is null)
{
_movingPoint = position;
return _movingPoint;
}
else
{
var reflectedOnBaseLine = _wallsAndSoffit.BaseLine.line.GetClosestPointTo(position, true);
Dim1.XLine2Point = reflectedOnBaseLine;
Dim1.DimLinePoint = Dim1.XLine1Point.Add(_dimLinePointVector);
_movingPoint = position;
return reflectedOnBaseLine;
}
}
public JigPromptPointOptions GetJigPromptPointOptions()
{
var output = new JigPromptPointOptions();
if (_guideLine1 is null)
{
output.UseBasePoint = false;
var message = "\nInsert Sprinkler or[use Dimension / New wall or soffit]:";
var keyword = "D N";
output.SetMessageAndKeywords(message, keyword);
return output;
}
else
{
output.Message = "\nInsert Sprinkler or enter distance:";
output.UseBasePoint = true;
output.BasePoint = _guideLine1.GetClosestPointTo(_movingPoint,true);
}
return output;
}
this is the sampler itself:
protected override SamplerStatus Sampler(JigPrompts prompts)
{
if (_showMoreInfo)
{
var infoForm = new InformationForm("More Info",
_meshInfo.dict,
Design_Assistant.Properties.Resources.Base_Pendent_Rquired_Icon);
infoForm.ShowDialog();
_showMoreInfo = false;
}
var jigResult = prompts.AcquirePoint(_jigOptions.GetJigPromptPointOptions());
switch (jigResult.Status)
{
case PromptStatus.OK:
Sprinkler.Position = _jigOptions.UpdatePosition(jigResult.Value);
GetMeshInfo();
return SamplerStatus.OK;
default:
return SamplerStatus.Cancel;
}
throw new NotImplementedException("Should never reach this point while jig");
}
has any one faced this issue before?
do I have to manually dispose some thing ?