Share

acedSSSetKwordCallbackPtr

C++

ACCORE_PORT int acedSSSetKwordCallbackPtr(
    struct resbuf* (*pFunc)(const ACHAR*)
);

File

acedads.h

Description

Provides a pointer to a keyword callback function.

The function acedSSGet() has been extended to allow callers to specify additional keywords available during the user interactive portion of acedSSGet().

When an application-specific keyword is entered and a keyword callback function has been registered via this function, AutoCAD calls the callback function passing in a pointer to the keyword entered.

The callback function that is registered by acedSSSetKwordCallbackPtr() takes the following form:

struct resbuf* fcn(const char* str)

When the callback function is called, the str argument will point to the keyword string entered by the user. This string must not be freed by the callback function!

The callback function should return one of the following values:

  • A linked list of dynamically allocated struct resbufs each one containing an entity name or selection set name to be added to the selection set being created by the current acedSSGet() call.
  • A pointer to a single dynamically allocated struct resbuf with restype == RTSTR and resval.rstring pointing to a dynamically allocated string which is an error message to be displayed to the user
  • NULL to indicate that there are no entities to add to the selection set and no error message to display
If a resbuf or list of resbufs is returned, AutoCAD will release the resbufs and any strings.

Returns

RTNORM is always returned.

Previous Declaration

AutoCAD 2025 and Earlier

int acedSSSetKwordCallbackPtr(struct resbuf* (*pFunc)(const ACHAR*));

Was this information helpful?