Share

AcDbObject::dxfOutFields

C++

Acad::ErrorStatus dxfOutFields(
    AcDbDxfFiler* filer
) const;

Description

This function is called by dxfOut(). Its purpose is to allow the object to write out its data.

There is a fixed set of steps that should be followed when implementing your own version of this function:

1. Call assertReadEnabled().

2. Call the parent class's dxfOutFields(), passing it pFiler. If this returns Acad::eOk, then continue; otherwise immediately return whatever the parent class's dwgInFields() returned.

3. Use pFiler->writeItem(AcDb::kDxfSubclass, ), where is a string that is typically your class's name, but can be any string you wish up to 256 bytes long. This same string is used in dxfInFields().

4. Use pFiler to call the appropriate AcDbDxfFiler methods to write out the object's data items along with the appropriate group code values (see table below).

Following these steps results in all base classes having their implementations of this function called as well, thus writing out all the object's data in class hierarchical order.

The actual AcDbObject::dxfOutFields() implementation takes care of writing out the object's handle as well as its persistent reactor, extension dictionary, and xdata information.

This function should return Acad::eOk if successful. In your own custom class implementations of this function, it's easiest to just return pFiler->filerStatus().

Here are the DXF group code ranges for object representation:

From To Data Type
1 4 text
6 9 text
10 17 point or vector (3 reals)
38 59 real
60 79 16-bit integer
90 99 32-bit integer
100 100 subclass data marker
102 102 text
140 149 real
170 179 16-bit integer
210 219 3 reals
270 279 16-bit integer
280 289 8-bit integer
300 309 text
310 319 binary chunk
320 329 handle
330 339 soft pointer ID
340 349 hard pointer ID
350 359 soft owner ID
360 369 hard owner ID

Parameters

Parameters Description
pFiler Passed in pointer to filer to use to write out the object's data

Links

AcDbRasterImageDef

Was this information helpful?