Share

acedGetEnv

C++

inline int acedGetEnv(
    const ACHAR * sym, 
    ACHAR * var, 
    size_t nBufLen
);

File

acedads.h

Description

Deprecated. Retrieves the value of an environment variable. Looks first in the AutoCAD-specific FixedProfile/General section of the registry:

HKEY_CURRENT_USER
    Software
        Autodesk
            AutoCAD
                R25.0
                    <Install ID>
                        FixedProfile
                            General

If an entry is not found in the registry, retrieves the value from the Windows system environment table.

Note: This function will not work for AutoCAD sysvars. For AutoCAD sysvars, use acedGetVar().

If acedGetEnv() succeeds, it returns RTNORM; otherwise it returns RTERROR. This function is the complement of the acedSetEnv() function.

Parameters

Parameters Description
sym Input environment variable name to get, which is case sensitive in all environments (AutoLISP, ObjectARX, Managed .NET and VBA/ActiveX)
var Output preallocated buffer to be filled in with environment variable value (a buffer size of 1024 bytes should be sufficient)
nBuflen Size of the buffer length

Previous Declaration

int acedGetEnv(const ACHAR * sym, ACHAR * var);

Use Instead

ACCORE_PORT int acedGetEnv(const ACHAR * sym, AcString & sResult);

Was this information helpful?