Next: , Previous: , Up: GNU LibreDWG   [Contents][Index]


7 Functions

You can use LibreDWG immediately upon loading, without any particular initialization. Only when using some see dynapi functions you might need to initialize the version via dwg_api_init_version(&dwg), when you need other formats than r2000 and you call an API function which does not store the version internally. Most do. This limitation will soon be fixed.

You usually use one set of functions - either decoding or encoding - at a time. All functions use the common data types (see Types). All functions return an error code, and the high-level functions for multiple objects add the error bitmask, which is sorted by severity. When the error exceeds DWG_ERR_CRITICAL, processing is stopped.

The new see dynapi has dynamic get and set functions for all objects and its fields. You can get and set a property value from any object pointer by the object name and the field name.