Share

AcDbJoinEntityPE Class

Class Hierarchy

AcRxObject
    AcDbJoinEntityPE

C++

class AcDbJoinEntityPE : public AcRxObject;

File

dbJoinEntityPE.h

Description

AcDbJoinEntityPE is the joinEntity protocol extension class. The methods of the class allow you to join an entity or entities in the given primary entity. The entities that support this protocol extension include: AcDbLine, AcDbArc, AcDbPolyline, AcDb2dPolyline, AcDb3dPolyline, and AcDbSpline. Applications can implement this protocol extension for other entity types.

Example

// Define the protocol extension class

class AcDMyEntityPE : public AcDbJoinEntityPE {

public:

virtual Acad::ErrorStatus joinEntity(AcDbEntity* pPrimaryEntity, AcDbEntity* pSecondaryEntity) const;

virtual Acad::ErrorStatus joinEntities(AcDbEntity* pPrimaryEntity, const AcArray& otherEntities, AcArray& joinedEntities) const;

};

// Initialize the protocol extension class, just like any other AcRxObject (not shown)

// Use the class AcDbMyEntity myEntity1, myEntity2;

// add code to set properties of these two entities

AcDbJoinEntityPE* pJoinPE = AcDbJoinEntityPE::cast(myEntity1.queryX(AcDbJoinEntityPE::desc()));

if (pJoinPE != NULL) {

Acad::ErrorStatus es = pJoinPE->joinEntity(&myEntity1, &myEntity2);

if (Acad::eOk == es) {

// myEntity1 should updated

}

}

Links

AcDbJoinEntityPE Methods

Was this information helpful?