Announcements

Community notifications may experience intermittent interruptions between 10–12 November during scheduled maintenance. We appreciate your patience.

Alignment GripOverrule Fatal Error

Alignment GripOverrule Fatal Error

s.makarov
Explorer Explorer
1,285 Views
6 Replies
Message 1 of 7

Alignment GripOverrule Fatal Error

s.makarov
Explorer
Explorer

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);
}

0 Likes
1,286 Views
6 Replies
Replies (6)
Message 2 of 7

Anonymous
Not applicable

Hi s.makarov,  

 

I did a quick test using your code snippet in Civil 3D 2013 on Win7 x64.

 

I created a Line and then converted the same to an Alignment using _AeccCreateAlignmentEntities command.

Tried the GripOverrule code. I didn't see any crash.

 

Then created another Alignment using the Alignment creation tool with tangents and curves. I dodn't see any crash on this too.

 

Could you check these two scenarios at your end ? Is the crash specific to any particular DWG file ?

 

Thanks,

0 Likes
Message 3 of 7

s.makarov
Explorer
Explorer

Hi ParthaPS!

Thank you for responding to my request.

 

The problem appears on different computers with different operating systems (Windows 7 x64 SP1, Windows XP x32 SP3) and different versions of the Civil 3D (Civil 3D 2012 SP2.1 x64 (IDSU), Civil 3D 2013 SP1 x32, Civil 3D 2013 SP1 x64).

 

In attachments the error description from one computer and dump from another computer, and the VS2010 solution, which I use for Civil 3D 2013 SP1 x64. The dump file was too large for this forum, if you need it - I'll break it into several parts.

 

I create Alignment using the Alignment creation tool with one tangent, and then I load AlignmentOverrule.dll with NETLOAD and V_PLAN command call in the command prompt. Then I select Alignment and move mouse pointer to the one GripPoint based on 100.0, 100.0, 0.0 position. When I move mouse after hover on GripPoint (sometimes earlier) appears error message.

 

What's I coding wrong?

Help please.

0 Likes
Message 4 of 7

augusto.goncalves
Alumni
Alumni

Hi Makarov,

 

Sorry I missed reply this on the post

 

As you mentioned, this is working on other entities. Actually I tried the same code on Polylines like the Alignment and work fine. You may notice that the grip point of the alignment is a little different, so I'm guessing that this objects are related somehow.

 

I'll working with some colleagues on Civil 3D engineer team to find a answer for this. Will post the results here.

 

Regards,



Augusto Goncalves
Twitter @augustomaia
Autodesk Developer Network
0 Likes
Message 5 of 7

augusto.goncalves
Alumni
Alumni

Hi Makarov

 

Unfortunately the Alignment object will not support custom grip points with overrule. Sorry for the bad news.

 

 

Regards,



Augusto Goncalves
Twitter @augustomaia
Autodesk Developer Network
0 Likes
Message 6 of 7

s.makarov
Explorer
Explorer

Dear Sirs!

Thank you for your feedback, but the lack of support for this functionality show the problems in the development of Alignment, or the lack of technical information (documentation), which allows to understand what wrong.

Two objects: Alignment and FeatureLine (have no GripOverrule problems using GripData) inherit one class - Feature, but wrapped different AeccDb ... Add another wrapper GripOverrule. Problems can be much less if be available <*.h> and <*.lib> files for programming using ObjectARX  instead of .NET wrappers.

Constant surprises of .NET programming is very tiring. Add to this the need to use COM Interop and all advantages of managed code evaporates. Autodesk is making a mistake by not allowing AEC-ObjectARX. It is strengthening the position of software developers alternative vertical solutions.

Having lost a lot of time to programming AlignmentGripOverrule I was forced to use other facilities with programming to construct the technology design general plans. I was able to build the process chains to simplify the life of engineers, but the problems with corridors generates different thoughts.

0 Likes
Message 7 of 7

Alexey.Terno
Advocate
Advocate

It seems that C3D 2108 does not support overrule of all grips, even AutoCAD object grips.

0 Likes