Editing entities in an ARX / DBX architecture

Editing entities in an ARX / DBX architecture

Anonymous
Not applicable
609 Views
2 Replies
Message 1 of 3

Editing entities in an ARX / DBX architecture

Anonymous
Not applicable
Hello,

I would be pleased if someone could make me clear in a little contradictionary question.
I created a cust entity, defined worldDraw, getGripPoints, moveGripPointsAt functions in dbx module, then implemented an AcEdJig in arx module for entity creation. Everything works fine but there is one thing I could not solve yet:

I would like to define a custom grip point so, that when a user clicks on it, an mfc window appears with parameter settings and custom editing functions. My problem is that grip points are defined in the DBX module but the custom mfc window is located in the ARX module (it uses arx dependent functions). In the DBX / ARX architecture it is not allowed to reference an ARX object from the dbx module, so now I'm stuck.

By the way it was always a little bit confusing for me why should I implement grip point handling in the DBX module... It is a kind of user input and according to the DBX / ARX architecture user input should be handled in the ARX module. For me it would be much more logical, if grip points could be implemented with an AcEdJig-like object in the ARX module.

Thanks in advance!
0 Likes
610 Views
2 Replies
Replies (2)
Message 2 of 3

Torokze
Enthusiast
Enthusiast
Take a look at dbappgrip.h.
0 Likes
Message 3 of 3

Anonymous
Not applicable
Have you successfully defined a custom AcDbAppEntityGrips?

I derive a AcDbAppMyEntityGrips from AcDbAppEntityGrips,
and register AcRxService as sample ProtocolReactors, but it does not work when an entity selected.

1. Implement
class AcDbAppCompEntityGrips : public AcDbAppEntityGrips

2. Register
if (!pGrips)
{
pGrips = new AcDbAppCompEntityGrips();
ACRX_PROTOCOL_REACTOR_LIST_AT(AcDbEntity::desc(),
AcDbAppCompEntityGrips::desc())->addReactor(pGrips);
}

3. the dbappgrip.h header say it is only called when elaborating grips for an AcDbBlockReference, so I try to assoiate it to a BlockReference, it doe not work too, why?

ACRX_PROTOCOL_REACTOR_LIST_AT(AcDbBlockReference::desc(),
AcDbAppCompEntityGrips::desc())->addReactor(pGrips);


///
/// Currently only called when elaborating grips for an AcDbBlockReference.
///

///
0 Likes