///////////////////////////////////////////////////////////////////////////////
// Copyright (C) 2002-2025, Open Design Alliance (the "Alliance").
// All rights reserved.
//
// This software and its documentation and related materials are owned by
// the Alliance. The software may only be incorporated into application
// programs owned by members of the Alliance, subject to a signed
// Membership Agreement and Supplemental Software License Agreement with the
// Alliance. The structure and organization of this software are the valuable
// trade secrets of the Alliance and its suppliers. The software is also
// protected by copyright law and international treaty provisions. Application
// programs incorporating this software must include the following statement
// with their copyright notices:
//
// This application incorporates Open Design Alliance software pursuant to a license
// agreement with Open Design Alliance.
// Open Design Alliance Copyright (C) 2002-2025 by Open Design Alliance.
// All rights reserved.
//
// By use of this software, its documentation or related materials, you
// acknowledge and accept the above terms.
///////////////////////////////////////////////////////////////////////////////
//DOM-IGNORE-BEGIN
/*********************************************************/
// Macros description:
/*********************************************************
VAR_DEF(type, VarName,...)
Variable support is generated in OdDbDatabase::getVarName/setVarName()
and OdDbDatabase::get/setSysVar()
RO_VAR_DEF(type, VarName,...)
Read-only
Variable support is generated in OdDbDatabase::getVarName()
and OdDbDatabase::getSysVar()
VAR_DEF_H(type, VarName,...)
Variable support is generated in OdDbDatabase::getVarName/setVarName() only.
If get/setSysVar() is available see QuasiVarDefs.h
Note: Such variables may work differently in OdDbDatabase::get/setXXX()and get/setSysVar()
For example:
There are get/set OdDbDatabase methods for both EXTMIN(MS) and PEXTMIN(PS) but get/setSysVar()
is for EXTMIN only. It works with extents of current space.
RO_VAR_DEF_H(type, VarName,...)
The same as VAR_DEF_H but only OdDbDatabase::getVarName() is generated.
VAR_DEF_2
Similar to VAR_DEF but some special processing in set methods is required
and OdDbDatabase::setVarName() method is implemented manually.
Example - OdDbDatabase::setTEXTSTYLE() also changes TEXTSIZE.
And OdDbDatabase::setTEXTSIZE() changes prior size in current Text Style
DICR15VAR
DICR21VAR
DICR24VAR
DICR27VAR
Similar to VAR_DEF. Difference is that in some file versions these variables
present in Database header and in minor file versions they are round-tripped
via Variables Dictionary
MLEADERSTYLE_VAR_DEF
ANNO_VAR_DEF
A special cases of DICR21VAR, used to differentiate CANNOSCALE and CMLEADERSCALE from other usual system variables in some cases.
By default is equal to DICR21VAR.
REGVAR_DEF(type, VarName,...)
Variable support is generated in OdDbHostAppServices (getVarName/setVarName)
and OdDbDatabase::get/setSysVar()
*/
#ifndef RO_VAR_DEF
#define RO_VAR_DEF VAR_DEF /* {Secret} */
#define DOUNDEF_RO_VAR_DEF
#endif
#ifndef RO_VAR_DEF_H
#define RO_VAR_DEF_H RO_VAR_DEF /* {Secret} */
#define DOUNDEF_RO_VAR_DEF_H
#endif
#ifndef VAR_DEF_H
#define VAR_DEF_H VAR_DEF /* {Secret} */
#define DOUNDEF_VAR_DEF_H
#endif
#ifndef DICR15VAR
#define DOUNDEF_DICR15VAR
#define DICR15VAR VAR_DEF /* {Secret} */
#endif
#ifndef DICR21VAR
#define DOUNDEF_DICR21VAR
#define DICR21VAR VAR_DEF /* {Secret} */
#define DOUNDEF_DICR21VAR_H
#define DICR21VAR_H VAR_DEF_H /* {Secret} */
#else
#define DOUNDEF_DICR21VAR_H
#define DICR21VAR_H DICR21VAR /* {Secret} */
#endif
#ifndef DICR24VAR
#define DOUNDEF_DICR24VAR
#define DICR24VAR DICR21VAR /* {Secret} */
#define DOUNDEF_DICR24VAR_H
#define DICR24VAR_H DICR21VAR_H /* {Secret} */
#else
#define DOUNDEF_DICR24VAR_H
#define DICR24VAR_H DICR24VAR /* {Secret} */
#endif
#ifndef DICR27VAR
#define DOUNDEF_DICR27VAR
#define DICR27VAR DICR21VAR /* {Secret} */
#define DOUNDEF_DICR27VAR_H
#define DICR27VAR_H DICR21VAR_H /* {Secret} */
#else
#define DOUNDEF_DICR27VAR_H
#define DICR27VAR_H DICR27VAR /* {Secret} */
#endif
#ifndef ANNO_VAR_DEF
#define DOUNDEF_ANNO_VAR_DEF
#define ANNO_VAR_DEF DICR21VAR /* {Secret} */
#endif
#ifndef MLEADERSTYLE_VAR_DEF
#define DOUNDEF_MLEADERSTYLE_VAR_DEF
#define MLEADERSTYLE_VAR_DEF DICR21VAR /* {Secret} */
#endif
#ifndef VAR_DEF_2
#define DOUNDEF_VAR_DEF_2
#define VAR_DEF_2 VAR_DEF /* {Secret} */
#endif
#ifndef ODTBOOL
#define ODTBOOL bool /* {Secret} */
#endif
#ifndef ODTDIST
#define ODTDIST double /* {Secret} */
#endif
#ifndef ODTORIENT
#define ODTORIENT double /* {Secret} */
#endif
#ifndef ODTUNITLESS4
#define ODTUNITLESS4 double /* {Secret} */
#endif
#ifndef ODTUNITLESS8
#define ODTUNITLESS8 double /* {Secret} */
#endif
#ifndef ODTDB_MEASUREMENTVALUE
#define ODTDB_MEASUREMENTVALUE OdDb::MeasurementValue /* {Secret} */
#endif
#ifndef ODTDB_LINEWEIGHT
#define ODTDB_LINEWEIGHT OdDb::LineWeight /* {Secret} */
#endif
#ifndef ODTDB_JOINSTYLE
#define ODTDB_JOINSTYLE OdDb::JoinStyle /* {Secret} */
#endif
#ifndef ODTDB_UNITSVALUE
#define ODTDB_UNITSVALUE OdDb::UnitsValue /* {Secret} */
#endif
#ifndef ODTDB_PROXYIMAGE
#define ODTDB_PROXYIMAGE OdDb::ProxyImage /* {Secret} */
#endif
#ifndef ODTDB_MEASUREMENTVALUE
#define ODTDB_MEASUREMENTVALUE OdDb::MeasurementValue /* {Secret} */
#endif
#ifndef ODTDB_ENDCAPS
#define ODTDB_ENDCAPS OdDb::EndCaps /* {Secret} */
#endif
#ifndef ODTDB_JOINSTYLE
#define ODTDB_JOINSTYLE OdDb::JoinStyle /* {Secret} */
#endif
#ifndef ODTDB_PLOTSTYLENAMETYPE
#define ODTDB_PLOTSTYLENAMETYPE OdDb::PlotStyleNameType /* {Secret} */
#endif
#ifndef ODDBOBJECTID
#define ODDBOBJECTID OdDbObjectId /* {Secret} */
#endif
#ifndef ODDBHARDPOINTERID
#define ODDBHARDPOINTERID ODDBOBJECTID /* {Secret} */
#endif
#ifndef ODTTEXTSTYLEID
#define ODTTEXTSTYLEID ODDBOBJECTID /* {Secret} */
#endif
#ifndef ODTLAYERID
#define ODTLAYERID ODDBOBJECTID /* {Secret} */
#endif
#ifndef ODTLAYERIDDEF
#define ODTLAYERIDDEF ODTLAYERID /* {Secret} */
#endif
#ifndef ODTLINETYPEID
#define ODTLINETYPEID ODDBOBJECTID /* {Secret} */
#endif
#ifndef ODTDIMSTYLEID
#define ODTDIMSTYLEID ODDBOBJECTID /* {Secret} */
#endif
#ifndef ODTUCSID
#define ODTUCSID ODDBOBJECTID /* {Secret} */
#endif
#ifndef ODTMLSTYLEID
#define ODTMLSTYLEID ODDBOBJECTID /* {Secret} */
#endif
#ifndef ODTDB_TIMEZONE
#define ODTDB_TIMEZONE OdDb::TimeZone /* {Secret} */
#endif
#ifndef ODTDB_SHADOWFLAGS
#define ODTDB_SHADOWFLAGS OdGiSubEntityTraits::ShadowFlags /* {Secret} */
#endif
#ifndef ODVISTYLEID
#define ODVISTYLEID ODDBOBJECTID /* {Secret} */
#endif
#ifndef ODTMATERIALID
#define ODTMATERIALID ODDBOBJECTID /* {Secret} */
#endif
#ifndef ODTDB_LOFTPARAMTYPE
#define ODTDB_LOFTPARAMTYPE OdDb::LoftParamType /* {Secret} */
#endif
#ifndef ODTDB_LOFTNORMALSTYPE
#define ODTDB_LOFTNORMALSTYPE OdDb::LoftNormalsType /* {Secret} */
#endif
#ifndef ODTTABLESTYLEID
#define ODTTABLESTYLEID ODDBOBJECTID /* {Secret} */
#endif
#ifndef ODTMLEADERSTYLEID
#define ODTMLEADERSTYLEID ODDBOBJECTID /* {Secret} */
#endif
#ifndef ODTVIEWDETAILSTYLEID
#define ODTVIEWDETAILSTYLEID ODDBOBJECTID /* {Secret} */
#endif
#ifndef ODTVIEWSECTIONSTYLEID
#define ODTVIEWSECTIONSTYLEID ODDBOBJECTID /* {Secret} */
#endif
#ifndef ODANNOSCALE
#define ODANNOSCALE OdDbAnnotationScalePtr /* {Secret} */
#endif
#ifndef ODTTRANSPARENCYDEF
#define ODTTRANSPARENCYDEF OdCmTransparency
#endif
#ifndef ODTCOLORDEF
#define ODTCOLORDEF OdCmColor
#endif
#ifndef ODCMCOLORINDEX
#define ODCMCOLORINDEX(color) ([] {OdCmColor c; c.setColorIndex(color); return c; })()
#endif
#ifndef VAR_DEF
/* {Secret} */
#define VAR_DEF(a,b,c,d,r1,r2)
/* {Secret} */
#define DOUNDEF_VAR_DEF
#endif
#define SVARS_FUNC_MODIFIER virtual
// Type Name Default Metric default Reserve1 Reserve2
//DOM-IGNORE-END
/**
Type double
Initial value 0.25
Read-Only No
Saved In Database
Versions 26.5+
HPPATHWIDTH specifies the width of new drawn paths to be hatched or filled.
Width is used to define the final shape and size of the closed hatch boundary based on the path drawn and the current alignment specified.
Type OdGePoint3d
Initial value (1.E+20, 1.E+20, 1.E+20)
Read-Only Yes (for getSysVar() and setSysVar() methods)
Saved In Database
Versions R12+
EXTMIN specifies the lower-left corner of the extents of the Model Space.
Access Methods
OdDbDatabase::getSysVar() – returns the lower-left corner of the extents of the current space (Model or Paper).
OdDbDatabase::getEXTMIN() – returns the lower-left corner of the extents of the Model Space.
OdDbDatabase::setEXTMIN() – sets the lower-left corner of the extents of the Model Space.
Note: get(L"EXTMIN") works with values for current Layout and accesses database EXTMIN
or PEXTMIN.
\sa
*/
//OdGePoint3d EXTMIN;
VAR_DEF_H( OdGePoint3d, EXTMIN, (1.E+20, 1.E+20, 1.E+20), (1.E+20, 1.E+20, 1.E+20), (), ValidateNone())
/**
Type OdGePoint3d
Initial value (-1.0E+20, -1.0E+20, -1.0E+20)
Read-Only Yes (for getSysVar() and setSysVar() methods)
Saved In Database
Versions R12+
EXTMAX specifies the upper-right corner of the extents of the Model Space.
Access Methods
OdDbDatabase::getSysVar() – returns the upper-right corner of the extents of the current space (Model or Paper).
OdDbDatabase::getEXTMAX() – returns the upper-right corner of the extents of the Model Space.
OdDbDatabase::setEXTMAX() – sets the upper-right corner of the extents of the Model Space.
Type OdInt16
Initial value 1
Read-Only No
Saved In Database
Versions R12+
ATTMODE controls the display of attributes.
ValueDescription
0 All attributes are invisible
1 Visible attributes are visible, and invisible attributes are invisible.
2 All attributes are visible.
For example, to get the value:
OdResBufPtr pRb = pDb-\>getSysVar(L"CHAMFERA");
double distance1 = pRb-\>getDouble();
odPrintConsoleString(L"nFirst chamfer distance = %g", distance1);
// or //
odPrintConsoleString(L"nFirst chamfer distance = %g", pDb-\>getCHAMFERA());
For example, to set the value:
OdResBufPtr pRb = OdResBuf::newRb(OdResBuf::kRtDouble, 2.5);
pDb-\>setSysVar(L"CHAMFERA", pRb);
// or //
pDb-\>setCHAMFERA(2.5);
Note: Use together with the CHAMFERB variable.
*/
//double CHAMFERA;
VAR_DEF( ODTDIST, CHAMFERA, (0.0), (0.0), (), ValidateEqGr(0.))
/**
Type double
Initial value 0.0
Read-Only No
Saved In Database
Versions 9+
The CHAMFERB variable specifies a default value of the second chamfer distance in drawing units.
For example, to get the value:
OdRusBufPtr pRb = pDb-\>getSysVar(L"CHAMFERB");
double distance2 = pRb-\>getDouble();
odPrintConsoleString(L"nSecond chamfer distance = %g", distance2);
// or //
odPrintConsoleString(L"nSecond chamfer distance = %g", pDb-\>getCHAMFERB());
For example, to set the value:
OdRusBufPtr pRb = OdResBuf::newRb(OdResBuf::kRtDouble, 1.25);
pDb-\>setSysVar(L"CHAMFERB", pRb);
// or //
pDb-\>setCHAMFERB(1.25);
Note: Use together with the CHAMFERA variable.
*/
//double CHAMFERB;
VAR_DEF( ODTDIST, CHAMFERB, (0.0), (0.0), (), ValidateEqGr(0.))
/**
Type double
Initial value 0.0
Read-Only No
Saved In Database
Versions 13+
The CHAMFERC variable specifies a default value of the chamfer length in drawing units.
For example, to get the value:
OdResBufPtr pRb = pDb-\>getSysVar(L"CHAMFERC");
double length = pRb-\>getDouble();
odPrintConsoleString(L"nChamfer length = %g units", length);
// or //
odPrintConsoleString(L"nChamfer length = %g units", pDb-\>getCHAMFERC());
For example, to set the value:
OdResBufPtr pRb = OdResBuf::newRb(OdResBuf::kRtDouble, 2.25);
pDb-\>setSysVar(L"CHAMFERC", pRb);
// or //
pDb-\>setCHAMFERC(2.25);
Note: Use together with the CHAMFERD variable.
*/
//double CHAMFERC;
VAR_DEF( ODTDIST, CHAMFERC, (0.0), (0.0), (), ValidateEqGr(0.))
/**
Type double
Initial value 0.0
Read-Only No
Saved In Database
Versions 13+
The CHAMFERD variable specifies a default value of the chamfer angle in radians.
For example, to get a value:
OdResBufPtr pRb = pDb-\>getSysVar(L"CHAMFERD");
double angle = pRb-\>getDouble();
odPrintConsoleString(L"nChamfer angle = %g radians", angle);
// or //
odPrintConsoleString(L"nChamfer angle = %g radians", pDb-\>getCHAMFERD());
For example, to set a value:
OdResBufPtr pRb = OdResBuf::newRb(OdResBuf::kRtAngle, 0.375);
pDb-\>setSysVar(L"CHAMFERD", pRb);
// or //
pDb-\>setCHAMFERD(0.375);
Note: Use together with the CHAMFERC variable.
*/
//double CHAMFERD;
VAR_DEF( ODTORIENT, CHAMFERD, (0.0), (0.0), (), ValidateNone())
/**
Type bool
Initial value false
Read-Only No
Saved In Database
Versions R13+
DISPSILH controls the display of silhouette curve edges and meshes.
ValueCurve EdgesMeshes
false Not displayed Displayed
true Displayed Not displayed
Type OdDbObjectId
Initial value "Standard" dimension style object ID for Imperial drawings or "ISO-25" dimension style object ID for Metric drawings.
Read-Only No
Saved In Database
Versions R12+
DIMSTYLE specifies the default dimension style for new entities.
Note: DIMASO is obsolete, but is included for compatibility purposes.
\sa
*/
//bool DIMASO;
VAR_DEF( ODTBOOL, DIMASO, (true), (true), (), ValidateBOOL())
/**
Type bool
Initial value true
Read-Only No
Saved In Database
Versions R12+
DIMSHO controls the updating of associative dimension object while dragging.
Type bool
Initial value false
Read-Only No
Saved In Database
Versions R12+
The LIMCHECK system variable determines whether objects are allowed outside the grid limits for model
space or current space (current layout).
ValueDescription
false Objects outside limits are allowed
true Objects outside limits are disallowed
Access Methods
OdDbDatabase::getSysVar() – gets the outside limits status as an instance of tagged data (boolean type)
OdDbDatabase::setSysVar() – sets the outside limits status as an instance of tagged data (boolean type)
OdDbDatabase::getLIMCHECK() – gets the outside limits status as a boolean value
OdDbDatabase::setLIMCHECK() – sets the outside limits status as a boolean value
For example, to get the value:
OdRusBufPtr pRb = pDb-\>getSysVar(L"LIMCHECK");
bool status = pRb-\>getBool();
odPrintConsoleString(L"nOutside limits status = %s", ((status) ? L"On" : L"Off"));
// or //
odPrintConsoleString(L"nObjects outside limits are %s for current space",
(pDb-\>getLIMCHECK()) ? L"disallowed" : L"allowed");
For example, to set the value:
OdRusBufPtr pRb = OdResBuf::newRb(OdOdResBuf::kRtBool, true);
pDb-\>setSysVar(L"LIMCHECK", pRb);
// or //
pDb-\>setLIMCHECK(false);
*/
//bool LIMCHECK;
VAR_DEF_H( ODTBOOL, LIMCHECK, (false), (false), (), ValidateBOOL())
/**
Type bool
Initial value false
Read-Only No
Saved In Database
Versions R12+
SKPOLY controls the generation of polylines during the SKETCH command.
Type OdInt16
Initial value 8
Read-Only No
Saved In Database
Versions R12+
The SPLINESEGS variable stores the number of segments for spline-fit polylines generated by the
PEDIT/Spline command. The value is a non-zero integer number from -32768 to 32767. A negative
value generates circular segments. A positive value generates linear segments. A zero value is not
applicable. Fit-type polylines use arcs as approximating segments.
For example, to get the value:
OdRusBufPtr pRb = pDb-\>getSysVar(L"SPLINESEGS");
OdInt16 number = pRb-\>getInt16();
odPrintConsoleString(L"nNumber of segments = %d", number);
// or //
odPrintConsoleString(L"nNumber of segments = %d", pDb-\>getSPLINESEGS());
For example, to set the value:
OdRusBufPtr pRb = OdResBuf::newRb(OdResBuf::kRtInt16, 60);
pDb-\>setSysVar(L"SPLINESEGS", pRb);
// or //
pDb-\>setSPLINESEGS(120);
*/
//OdInt16 SPLINESEGS;
VAR_DEF( OdInt16, SPLINESEGS, (8), (8), (), ValidateNonZero())
/**
Type OdInt16
Initial value 6
Read-Only No
Saved In Database
Versions R12+
SURFTAB1 specifies the number of tabulations generated in the
M direction by the EDGESURF, REVSURF, RULESURF, and TABSURF
commands.