Vector Functions

DM_VECTOR is a sequence container representing an array that can change in size. DM_VECTOR provides dynamic and automatic allocation and reallocation. User’s responsibility is to create and delete DM_VECTOR.

The DM_VECTOR API is comparable to the DM_2D_ARRAY API—the functionality is similar.

CADMATIC recommends using DM_VECTOR instead of A_ALLOC in all new script code, because DM_VECTOR has automatic allocation and a wider set of functionality. Notice, however, that the DM_VECTOR data type is not compatible with the A_ALLOC data type; these cannot be mixed in code, and in array type arguments to extern functions you must use the data type which is specified for the argument in the documentation of the extern function.

For example usage, see %PMS_HOME%\dm\macro\Examples\DM_VECTOR_and_2D_ARRAY.mac.

For example usage of selecting and multiselecting data stored in DM_VECTOR, see %PMS_HOME%\dm\macro\Examples\DEMO_LWComponent.mac.