The extent to which proxy entities can be edited is determined by the parent application. This determination is made when the class is created with the ACRX_DXF_DEFINE_MEMBERS macro. The PROXY_FLAGS argument defines the types of edits that can be made to the entity if it becomes a proxy. The valid options for PROXY_FLAGS, and their associated values, are listed in the following table.
Proxy flags options |
|
---|---|
Option |
Value |
kNoOperation |
0 |
kEraseAllowed |
0x1 |
kTransformAllowed |
0x2 |
kColorChangeAllowed |
0x4 |
kLayerChangeAllowed |
0x8 |
kLinetypeChangeAllowed |
0x10 |
kLinetypeScaleChangeAllowed |
0x20 |
kVisibilityChangeAllowed |
0x40 |
kAllAllowedBits |
0x7F |
Note that kNoOperation means none of the other options listed here.
You can logically OR PROXY_FLAG options to permit a combination of editing operations.
As proxy entities only encapsulate data below the AcDbEntity base class level, any changes made to color, layer, linetype, linetype scale, and visibility will be written out as part of the proxy entity data. Rigid body transformations (such as move, scale, and rotate) cannot be applied until the parent application is present. When a transformation is applied to a proxy, the transformation is made to the graphics metafile, and a copy of the transformation matrix is saved in a custom record in the proxy entity's extension dictionary. If multiple transformations are performed, the matrix is updated to reflect the cumulative transformation. When the custom entity is returned to memory with its parent application, AutoCAD calls the entity's transformBy() function, passes it the transformation matrix data, and removes the custom data storage record from the extension dictionary. In effect, the transformation is deferred until the parent application is present to apply the transformation to the custom entity.