ObjectARX 2007: AcEdJig problem

Discussion in 'AutoCAD' started by hyperandey, Feb 7, 2007.

  1. hyperandey

    hyperandey Guest

    I am using AcEdJig class to move/copy customized points. It works fine
    in AutoCAD R15.0 and R16.0 but once I upgraded my codes to R.17.0 (I
    did some unicode stuff changes on R.17.0 version, autocad 2007). It
    just crashed when I used AcEdJig.

    My codes are as follows:


    class ObjectJig : public AcEdJig
    {
    public:
    ObjectJig();
    ~ObjectJig();
    virtual AcDbEntity *entity() const;
    virtual DragStatus sampler();
    virtual Adesk::Boolean update();
    virtual DragStatus Run(CString Prompt);

    void setTransform(AcGeMatrix3d trans);
    void addObject(AcDbObjectId id);
    void addObjects(AcDbObjectIdArray &ids);

    void applyTransform();

    private:

    TransformedObjects mTransObject;
    AcGeMatrix3d mTransform;

    };

    class MoveJig : public ObjectJig
    {
    public:
    virtual DragStatus sampler();
    virtual DragStatus Run(CString Prompt);

    void setRefPoint(AcGePoint3d pt) {mRefPoint = pt;}

    private:
    AcGePoint3d mRefPoint;
    AcGePoint3d mPoint;
    };

    ........// implementation of class function

    //********************************************
    AcEdJig::DragStatus MoveJig::Run(CString Prompt)
    //********************************************
    {
    AcEdJig::DragStatus status;
    mPoint = mRefPoint;
    setDispPrompt(Prompt);

    status = drag();

    if(status == AcEdJig::kNormal)
    applyTransform();

    return status;
    }



    I debugged into the AcEdJig function, the program crashes inside
    AcEdJig::DragStatus MoveJig::Run(CString Prompt) at status = drag();.
    It is so strange as R15.0 and R16.0 version works fine for this
    function but R17.0 version crashes at this function. Anyone Any ideas
    about this problem. Thanks in advance.
     
    hyperandey, Feb 7, 2007
    #1
Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.