Share

acedPutSym

C++

ACCORE_PORT int acedPutSym(
    const ACHAR * sname, 
    struct resbuf * value
);

File

acedads.h

Description

Sets the value of an AutoLISP symbol.

Warning This command can be used in the ARX program environment only when AutoCAD sends the message kInvkSubrMsg to the application.

To set the value of the AutoLISP symbol to nil, make the following assignment:

value->restype = RTNIL;

If sname is not the name of a current symbol, acedPutSym() creates a new AutoLISP symbol with this name and assigns it the value.

Note An acedPutSym() function call can create a new AutoLISP symbol that AutoLISP cannot access--for example, by including illegal characters in the symbol name, such as "pair(s". An acedGetSym() call can access such symbols, but they will cause an error in a future upgrade or release of AutoCAD. Your programs should not rely on this capability.

Parameters

Parameters Description
sname Symbol name
value Pointer to a result-buffer list that contains the value to set the symbol; must contain values of types that can be represented in AutoLISP

Returns

Returns RTNORM if it succeeds; otherwise, it returns RTERROR. When acedPutSym() fails, it sets the system variable ERRNO to a value that indicates the reason for the failure.

Previous Declaration

AutoCAD 2025 and Earlier

int acedPutSym(const ACHAR *sname, struct resbuf *value);

Was this information helpful?