PyDb.pyi
class ACIcolorMethod Class
kACIbyBlock: ClassVar[Self]
kACIforeground: ClassVar[Self]
kACIbyLayer: ClassVar[Self]
kACIclear: ClassVar[Self]
kACIstandard: ClassVar[Self]
kACImaximum: ClassVar[Self]
kACInone: ClassVar[Self]
kACIminimum: ClassVar[Self]
kACIfrozenLayer: ClassVar[Self]
class AbstractViewTable Class
def __init__(self, id: PyDb.ObjectId, mode: PyDb.OpenMode, erased: bool) -> None:
def __reduce__(self) -> Any:
def add(self, val: PyDb.AbstractViewTableRecord) -> ObjectId:
This function adds the record pointed to by pRecord to both the database containing the
table and the table itself. If the addition succeeds, recordId is set to the AcDbObjectId
of the pRecord once it has been added to the database. Possible return ErrorStatus codes
are: Acad::eOk, Acad::eOutOfMemory, Acad::eDuplicateRecordName, Acad::eNoDatabase (if the
AbstractViewTable is not in a database).
def cast(otherObject: PyRx.RxObject) -> AbstractViewTable:
def className() -> str:
def cloneFrom(otherObject: PyRx.RxObject) -> AbstractViewTable:
def desc() -> PyRx.RxClass:
Returns a pointer to the AcRxClass object representing the specific class, or most recent
parent class explicitly registered with ObjectARX of either the pointer type used to invoke
it or the class qualifier used with it. (Remember that when a static member function is
invoked via a pointer, the pointer type, not the object type, determines which
implementation of the function is invoked.) When working with a pointer to an object and
the proper AcRxClass object for the class of the object pointed to is desired, the
AcRxObject::isA() function should be used, since it is a virtual non-static method and is
therefore not pointer type dependent. Caching the value of the pointer returned by this
method is acceptable, provided the application knows that the AcRxClass object pointed to
by the returned pointer was created by an ObjectARX application that will not be unloaded.
class AbstractViewTableRecord Class
def __init__(self, id: PyDb.ObjectId, mode: PyDb.OpenMode, erased: bool) -> None:
This class is the base class for the AcDbViewTableRecord and AcDbViewportTableRecord
classes.
def __reduce__(self) -> Any:
def ambientLightColor(self) -> Color:
Returns the ambient light color for the viewport. A color of black (RGB 0,0,0) is
equivalent to no ambient light.
def backClipDistance(self) -> float:
This function returns the distance (along the camera-target line) from the target to the
back clipping plane. Positive values indicate that the clipping plane is in front of the
target (that is, between the target and the camera). Negative values indicate the clipping
plane is behind the target. See the AutoCAD DVIEW command documentation for more
information on clipping planes. The back clipping plane distance value is used for DXF
group code 44.
def backClipEnabled(self) -> bool:
This function returns true if the back clipping plane is currently turned on in the
TableRecord; otherwise, returns false. See the AutoCAD DVIEW command documentation for more
information on clipping planes. The back clipping plane On/Off setting is reflected in the
third bit of DXF group code 71 (if bit is set, then back clip is enabled).
def background(self) -> ObjectId:
Returns a const pointer to the background object. Returns null if it has none.
def brightness(self) -> float:
Returns the brightness factor for this viewport.
def cast(otherObject: PyRx.RxObject) -> AbstractViewTableRecord:
def centerPoint(self) -> PyGe.Point2d:
This function returns the center point of the view in DCS coordinates. The center point
value is used for DXF group code 10 in the AcDbViewTableRecord class and group code 12 in
the AcDbViewportTableRecord class.
def className() -> str:
def cloneFrom(otherObject: PyRx.RxObject) -> AbstractViewTableRecord:
def contrast(self) -> float:
Returns the overall contrast factor of the viewport.
def defaultLightingType(self) -> PyGi.DefaultLightingType:
Returns the type of default lighting being used in the viewport.
def desc() -> PyRx.RxClass:
Returns a pointer to the AcRxClass object representing the specific class, or most recent
parent class explicitly registered with ObjectARX of either the pointer type used to invoke
it or the class qualifier used with it. (Remember that when a static member function is
invoked via a pointer, the pointer type, not the object type, determines which
implementation of the function is invoked.) When working with a pointer to an object and
the proper AcRxClass object for the class of the object pointed to is desired, the
AcRxObject::isA() function should be used, since it is a virtual non-static method and is
therefore not pointer type dependent. Caching the value of the pointer returned by this
method is acceptable, provided the application knows that the AcRxClass object pointed to
by the returned pointer was created by an ObjectARX application that will not be unloaded.
def elevation(self) -> float:
This function returns the elevation of the UCS plane for the view or viewport table record.
This function returns 0 if called for an AcDbViewTableRecord that has no associated UCS.
def frontClipAtEye(self) -> bool:
This function returns true if the front clipping plane is currently located at the camera;
otherwise, returns false. See the AutoCAD DVIEW command documentation for more information
on clipping planes. The clipping plane at Eye setting is reflected in the fifth bit of DXF
group code 71 (if the bit is not set, the clipping plane is at the camera).
def frontClipDistance(self) -> float:
This function returns the distance (along the camera-target line) from the target to the
front clipping plane. Positive values indicate that the clipping plane is in front of the
target (that is, between the target and the camera). Negative values indicate the clipping
plane is behind the target. See the AutoCAD DVIEW command documentation for more
information on clipping planes. The front clipping plane distance value is used for DXF
group code 43.
def frontClipEnabled(self) -> bool:
This function returns true if the front clipping plane is currently turned On in the
TableRecord; otherwise, returns false. See the AutoCAD DVIEW command documentation for more
information on clipping planes. The front clipping plane On/Off setting is reflected in the
second bit of DXF group code 71 (if the bit is set, front clipping is On).
def getUcs(self) -> tuple[PyGe.Point3d, PyGe.Vector3d, PyGe.Vector3d]:
This function returns eOk unless it is called for an AcDbViewTableRecord and the view does
not have an associated UCS. If this function returns eOk, then origin, xAxis, and yAxis are
set to the UCS that is defined for the view or viewport table record.
def height(self) -> float:
This function returns the height of the view in DCS coordinates. Zooming out within the
viewport (and then resaving the view if it's an AcDbViewTableRecord) will increase this
value. Zooming in (and resaving if appropriate) will decrease this value. The view height
is used for DXF group code 40.
def isDefaultLightingOn(self) -> bool:
Returns true if any kind of default lighting is on.
def isUcsOrthographic(self) -> tuple[bool, PyDb.OrthographicView]:
Returns false if the record's associated UCS does not have an orthographic view whose
reference UCS matches the database's UCSBASE system variable, or if called for an
AcDbViewTableRecord that has no associated UCS. If this function returns true, then view is
set to the orthographic view of the UCS. For more information about UCS orthographic views,
see AcDbUcsTableRecord::setUcsBaseOrigin(), AcDbUcsTableRecord::ucsBaseOrigin(), and the
UCS command's Orthographic option documentation in the AutoCAD Command Reference.
WarningThe database pointer returned by AcDbHostApplicationServices::workingDatabase() at
the time this function is called must point to the pertinent AcDbDatabase object.
Otherwise, this function generates incorrect results.
def isViewOrthographic(self) -> tuple[bool, PyDb.OrthographicView]:
Returns true if the view direction is orthographic relative to the UCSBASE system variable.
If this function returns true, view is set to the orthographic view. For example, if the
current view represents a right view of the UCS specified by UCSBASE, then view is set to
AcDb::kRightView. If this function returns false, view is set to AcDb::kNonOrthoView.
def lensLength(self) -> float:
This function returns the lens length used when perspective mode is on in the TableRecord.
See the AutoCAD DVIEW command documentation for more information on perspective mode and
lens length. The lens length value is used for DXF group code 42.
def perspectiveEnabled(self) -> bool:
This function returns true if perspective mode is currently set to On in the TableRecord.
Otherwise, false is returned. See the AutoCAD DVIEW command documentation for more
information on perspective mode. The perspective mode On/Off setting is reflected in the
first bit of DXF group code 71 (if the bit is set, perspective mode is On).
def setAmbientLightColor(self, val: PyDb.Color) -> None:
Sets the ambient light color for the viewport. Returns Acad::eOk on success.
def setBackClipDistance(self, val: float) -> None:
This function sets the TableRecord to use distance as the distance (along the camera-target
line) from the target to the back clipping plane. Positive values indicate that the
clipping plane is in front of the target (that is, between the target and the camera),
whereas negative values indicate the clipping plane is behind the target. See the AutoCAD
DVIEW command documentation for more information on clipping planes. The back clipping
plane distance value is used for DXF group code 44.
def setBackClipEnabled(self, val: bool) -> None:
If enabled == true, this function sets the back clipping to On in the TableRecord. If
enabled == false, then back clipping is set to Off. See the AutoCAD DVIEW command
documentation for more information on clipping planes. The back clipping plane On/Off
setting is reflected in the third bit of DXF group code 71 (if bit is set then back clip is
enabled).
def setBackground(self, val: PyDb.ObjectId) -> None:
Sets a new background to be associated with this view. To unset, pass in NULL as the object
ID. Returns Acad::eOk on success.
def setBrightness(self, val: float) -> None:
Sets the overall brightness factor for this viewport. Returns Acad::eOk on success.
def setCenterPoint(self, val: PyGe.Point2d) -> None:
This function sets the TableRecord to use center (in DCS coordinates ) as the center point
of the view. The center point value is used for DXF group code 10 in the
AcDbViewTableRecord class and group code 12 in the AcDbViewportTableRecord class.
def setContrast(self, val: float) -> None:
Sets the contrast factor for the viewport. Returns Acad::eOk on success.
def setDefaultLightingOn(self, val: bool) -> None:
Sets the state of default lighting for the viewport. Returns Acad::eOk on success.
def setDefaultLightingType(self, val: PyGi.DefaultLightingType) -> None:
Sets the type of default lighting in the viewport. Returns Acad::eOk on success.
def setElevation(self, val: float) -> None:
This function sets the elevation for the view or viewport table record.
def setFrontClipAtEye(self, val: bool) -> None:
Sets the front clipping plane for perspective views. If atEye == true, then the front
clipping plane is located at the camera (eye) regardless of the frontClipDistance value. If
atEye == false, then the front clipping plane is located using the frontClipDistance value.
See the AutoCAD DVIEW command documentation for more information on clipping planes. The
clipping plane at Eye setting is reflected in the fifth bit of DXF group code 71 (if the
bit is not set, the clipping plane is at the camera).
def setFrontClipDistance(self, val: float) -> None:
This function sets the TableRecord to use distance as the distance (along the camera-target
line) from the target to the front clipping plane. Positive values indicate that the
clipping plane is in front of the target (that is, between the target and the camera).
Negative values indicate the clipping plane is behind the target. See the AutoCAD DVIEW
command documentation for more information on clipping planes. The front clipping plane
distance value is used for DXF group code 43.
def setFrontClipEnabled(self, val: bool) -> None:
If enabled == true, this function sets the front clipping to On in the TableRecord. If
enabled == false, then front clipping is set to Off. See the AutoCAD DVIEW command
documentation for more information on clipping planes. The front clipping plane On/Off
setting is reflected in the second bit of DXF group code 71 (if the bit is set, front
clipping is On).
def setHeight(self, val: float) -> None:
This function sets the TableRecord to use height (in DCS coordinates) as the height of the
view. Zooming out within the viewport (and then resaving the view if it's an
AcDbViewTableRecord) will increase this value. Zooming in (and resaving if appropriate)
will decrease this value. The view height is used for DXF group code 40.
def setLensLength(self, val: float) -> None:
This function sets the TableRecord to use length as the lens length when perspective mode
is on in the TableRecord. See the AutoCAD DVIEW command documentation for more information
on perspective mode and lens length. The lens length value is used for DXF group code 42.
def setPerspectiveEnabled(self, val: bool) -> None:
If enabled == true, this function sets perspective mode to On in the TableRecord. If
enabled == false, then perspective mode is set to Off. See the AutoCAD DVIEW command
documentation for more information on perspective mode. The perspective mode On/Off setting
is reflected in the first bit of DXF group code 71 (if the bit is set, perspective mode is
On).
def setSun(self, retId: PyDb.ObjectId, pSun: PyDb.Object, eraseOldSun: bool) -> None:
Sets the object Id of the AcDbSun object associated with this viewport. Returns Acad::eOk
if the object isn't already associated with another viewport.
def setTarget(self, val: PyGe.Point3d) -> None:
This function sets the TableRecord to use target (in WCS coordinates) as the location of
the view's target. The view target is used for DXF group code 12 in AcDbViewTableRecords
and group code 17 in AcDbViewportTableRecords.
def setUcs(self, origin: PyGe.Point3d, xAxis: PyGe.Vector3d, yAxis: PyGe.Vector3d) -> None:
This function sets the UCS for the view or viewport table record. The new UCS will be
unnamed and is defined by origin, xAxis, and yAxis.
def setUcs(self, view: PyDb.OrthographicView) -> None:
This function sets the UCS for the view or viewport table record. The new UCS will be
unnamed and is defined by origin, xAxis, and yAxis.
def setUcs(self, ucsId: PyDb.ObjectId) -> None:
This function sets the UCS for the view or viewport table record. The new UCS will be
unnamed and is defined by origin, xAxis, and yAxis.
def setUcs(*args) -> None:
This function sets the UCS for the view or viewport table record. The new UCS will be
unnamed and is defined by origin, xAxis, and yAxis.
def setUcsToWorld(self) -> None:
This function sets the UCS for the view or viewport table record to the world UCS.
def setViewDirection(self, viewDirection: PyGe.Vector3d) -> None:
This function sets the TableRecord to use viewDirection (in WCS coordinates) as the vector
from the view's target to the view's camera. The camera is moved to reflect the new
setting. This also represents the point coordinate set by the AutoCAD VPOINT command. See
the AutoCAD VPOINT command documentation for more information on view direction. The view
direction is used for DXF group code 11 in AcDbViewTableRecords and group code 16 in
AcDbViewportTableRecords.
def setViewDirection(self, view: PyDb.OrthographicView) -> None:
This function sets the TableRecord to use viewDirection (in WCS coordinates) as the vector
from the view's target to the view's camera. The camera is moved to reflect the new
setting. This also represents the point coordinate set by the AutoCAD VPOINT command. See
the AutoCAD VPOINT command documentation for more information on view direction. The view
direction is used for DXF group code 11 in AcDbViewTableRecords and group code 16 in
AcDbViewportTableRecords.
def setViewDirection(*args) -> None:
This function sets the TableRecord to use viewDirection (in WCS coordinates) as the vector
from the view's target to the view's camera. The camera is moved to reflect the new
setting. This also represents the point coordinate set by the AutoCAD VPOINT command. See
the AutoCAD VPOINT command documentation for more information on view direction. The view
direction is used for DXF group code 11 in AcDbViewTableRecords and group code 16 in
AcDbViewportTableRecords.
def setViewTwist(self, val: float) -> None:
This function sets the TableRecord to use angle (in radians) as the twist angle of the view
represented by the TableRecord. The twist angle is a rotation around the view's line of
sight (that is, vector from camera to target, which is always perpendicular to the display,
looking from the front of the display towards the back). The zero angle runs horizontally
to the right (that is, the DCS's positive X-axis). For more information about the view
twist angle, see the AutoCAD DVIEW command documentation. The view twist angle is used for
DXF group code 50 in AcDbViewTableRecords and group code 51 in AcDbViewportTableRecords.
def setVisualStyle(self, val: PyDb.ObjectId) -> None:
Sets the visual style for the viewport. Returns Acad::eOk if successful.
def setWidth(self, val: float) -> None:
This function sets the TableRecord to use width (in DCS coordinates) as the width of the
view (in DCS coordinates). Zooming out within the viewport (and then resaving the view if
it's an AcDbViewTableRecord) will increase this value. Zooming in (and resaving if
appropriate) will decrease this value. The view width is used for DXF group code 41 for
AcDbViewTableRecords. For AcDbViewportTableRecords, the DXF group code 41 contains the
ratio of the view width to height.
def sunId(self) -> ObjectId:
Returns the object Id of an AcDbSun object associated with this viewport. If there is no
sun currently associated with this viewport, then it returns kNULL
def target(self) -> PyGe.Point3d:
This function returns an AcGePoint3d that is the WCS location of the view's target. The
view target is used for DXF group code 12 in AcDbViewTableRecords and group code 17 in
AcDbViewportTableRecord s.
def ucsName(self) -> ObjectId:
This function returns the object ID of an AcDbUcsTableRecord if the UCS of the view or
viewport table record is a named UCS. This function will return a null id if the UCS is not
named or if it is called for an AcDbViewTableRecord that has no associated UCS.
def viewDirection(self) -> PyGe.Vector3d:
This function returns an AcGeVector3d that is the vector (in WCS coordinates) from the
view's target to the view's camera. This also represents the point coordinate set by the
AutoCAD VPOINT command. See the AutoCAD VPOINT command documentation for more information
on view direction. The view direction is used for DXF group code 11 in AcDbViewTableRecords
and group code 16 in AcDbViewportTableRecords.
def viewTwist(self) -> float:
This function returns the twist angle (in radians) of the view in the viewport. The twist
angle is a rotation around the view's line of sight. That is, the vector from camera to
target, which is always perpendicular to the display, looking from the front of the display
towards the back). The zero angle runs horizontally to the right (that is, the DCS's
positive X-axis). For more information about the view twist angle, see the AutoCAD DVIEW
command documentation. The view twist angle is used for DXF group code 50 in
AcDbViewTableRecords and group code 51 in AcDbViewportTableRecords.
def visualStyle(self) -> ObjectId:
Returns the object ID of the visual style in effect for this viewport.
def width(self) -> float:
This function returns the width of the view in DCS coordinates. Zooming out within the
viewport (and then resaving the view if it's an AcDbViewTableRecord) will increase this
value. Zooming in (and resaving if appropriate) will decrease this value. The view width is
used for DXF group code 41 for AcDbViewTableRecords. For AcDbViewportTableRecords, the DXF
group code 41 contains the ratio of the view width to height.
class AcCmDialogTabs Class
kACITab: ClassVar[Self]
kTrueColorTab: ClassVar[Self]
kColorBookTab: ClassVar[Self]
class AcGeoMapResolution Class
kCoarse: ClassVar[Self]
kOptimal: ClassVar[Self]
kFine: ClassVar[Self]
kFiner: ClassVar[Self]
class AcGeoMapType Class
kNoMap: ClassVar[Self]
kAerial: ClassVar[Self]
kRoad: ClassVar[Self]
kHybrid: ClassVar[Self]
kBingAerial: ClassVar[Self]
kBingRoad: ClassVar[Self]
kBingHybrid: ClassVar[Self]
kEsriImagery: ClassVar[Self]
kEsriOpenStreetMap: ClassVar[Self]
kEsriStreets: ClassVar[Self]
kEsriLightGray: ClassVar[Self]
kEsriDarkGray: ClassVar[Self]
class AcValue Class
def __init__(self) -> None:
def __init__(self, ival: int) -> None:
def __init__(self, fval: float) -> None:
def __init__(self, sval: str) -> None:
def __init__(self, idval: PyDb.ObjectId) -> None:
def __init__(self, pnt2dval: PyGe.Point2d) -> None:
def __init__(self, pnt3dval: PyGe.Point3d) -> None:
def __init__(*args) -> None:
def __reduce__(self) -> Any:
def className() -> str:
def convertTo(self, dt: PyDb.ValueDataType, vt: PyDb.ValueUnitType) -> bool:
def dataType(self) -> ValueDataType:
def desc() -> PyRx.RxClass:
Returns a pointer to the AcRxClass object representing the specific class, or most recent
parent class explicitly registered with ObjectARX of either the pointer type used to invoke
it or the class qualifier used with it. (Remember that when a static member function is
invoked via a pointer, the pointer type, not the object type, determines which
implementation of the function is invoked.) When working with a pointer to an object and
the proper AcRxClass object for the class of the object pointed to is desired, the
AcRxObject::isA() function should be used, since it is a virtual non-static method and is
therefore not pointer type dependent. Caching the value of the pointer returned by this
method is acceptable, provided the application knows that the AcRxClass object pointed to
by the returned pointer was created by an ObjectARX application that will not be unloaded.
def format(self, val: PyDb.ValueFormatOption) -> str:
def getDouble(self) -> float:
def getFormat(self) -> str:
def getInt32(self) -> int:
def getObjectId(self) -> ObjectId:
def getPoint2d(self) -> PyGe.Point2d:
def getPoint3d(self) -> PyGe.Point3d:
def getString(self) -> str:
def isValid(self) -> bool:
def reset(self, nDataType: PyDb.ValueDataType) -> bool:
def resetValue(self) -> bool:
def setDouble(self, val: float) -> None:
def setFormat(self, val: str) -> bool:
def setInt32(self, val: int) -> None:
def setObjectId(self, id: PyDb.ObjectId) -> None:
def setPoint2d(self, pt: PyGe.Point3d) -> None:
def setPoint3d(self, pt: PyGe.Point2d) -> None:
def setString(self, val: str) -> None:
def setUnitType(self, val: PyDb.ValueUnitType) -> bool:
def unitType(self) -> ValueUnitType:
class AdsName Class
def __init__(self) -> None:
def __reduce__(self) -> Any:
def fromObjectId(self, id: PyDb.ObjectId) -> None:
def toObjectId(self) -> ObjectId:
class AlignedDimension Class
def __init__(self) -> None:
The AcDbAlignedDimension class is used to represent the dimension type that dimensions the
distance between two points located anywhere in space. The dimension's normal vector must
be perpendicular to the line between the two points. The two selected points are also used
as the definition points for the start of the two dimension extension lines.
def __init__(self, xLine1Point: PyGe.Point3d, xLine2Point: PyGe.Point3d, dimLinePoint: PyGe.Point3d) -> None:
The AcDbAlignedDimension class is used to represent the dimension type that dimensions the
distance between two points located anywhere in space. The dimension's normal vector must
be perpendicular to the line between the two points. The two selected points are also used
as the definition points for the start of the two dimension extension lines.
def __init__(self, xLine1Point: PyGe.Point3d, xLine2Point: PyGe.Point3d, dimLinePoint: PyGe.Point3d, dimText: str) -> None:
The AcDbAlignedDimension class is used to represent the dimension type that dimensions the
distance between two points located anywhere in space. The dimension's normal vector must
be perpendicular to the line between the two points. The two selected points are also used
as the definition points for the start of the two dimension extension lines.
def __init__(self, xLine1Point: PyGe.Point3d, xLine2Point: PyGe.Point3d, dimLinePoint: PyGe.Point3d, dimText: str, id: PyDb.ObjectId) -> None:
The AcDbAlignedDimension class is used to represent the dimension type that dimensions the
distance between two points located anywhere in space. The dimension's normal vector must
be perpendicular to the line between the two points. The two selected points are also used
as the definition points for the start of the two dimension extension lines.
def __init__(self, id: PyDb.ObjectId) -> None:
The AcDbAlignedDimension class is used to represent the dimension type that dimensions the
distance between two points located anywhere in space. The dimension's normal vector must
be perpendicular to the line between the two points. The two selected points are also used
as the definition points for the start of the two dimension extension lines.
def __init__(self, id: PyDb.ObjectId, mode: PyDb.OpenMode) -> None:
The AcDbAlignedDimension class is used to represent the dimension type that dimensions the
distance between two points located anywhere in space. The dimension's normal vector must
be perpendicular to the line between the two points. The two selected points are also used
as the definition points for the start of the two dimension extension lines.
def __init__(self, id: PyDb.ObjectId, mode: PyDb.OpenMode, erased: bool) -> None:
The AcDbAlignedDimension class is used to represent the dimension type that dimensions the
distance between two points located anywhere in space. The dimension's normal vector must
be perpendicular to the line between the two points. The two selected points are also used
as the definition points for the start of the two dimension extension lines.
def __init__(*args) -> None:
The AcDbAlignedDimension class is used to represent the dimension type that dimensions the
distance between two points located anywhere in space. The dimension's normal vector must
be perpendicular to the line between the two points. The two selected points are also used
as the definition points for the start of the two dimension extension lines.
def __reduce__(self) -> Any:
def cast(otherObject: PyRx.RxObject) -> AlignedDimension:
def className() -> str:
def cloneFrom(otherObject: PyRx.RxObject) -> AlignedDimension:
def desc() -> PyRx.RxClass:
Returns a pointer to the AcRxClass object representing the specific class, or most recent
parent class explicitly registered with ObjectARX of either the pointer type used to invoke
it or the class qualifier used with it. (Remember that when a static member function is
invoked via a pointer, the pointer type, not the object type, determines which
implementation of the function is invoked.) When working with a pointer to an object and
the proper AcRxClass object for the class of the object pointed to is desired, the
AcRxObject::isA() function should be used, since it is a virtual non-static method and is
therefore not pointer type dependent. Caching the value of the pointer returned by this
method is acceptable, provided the application knows that the AcRxClass object pointed to
by the returned pointer was created by an ObjectARX application that will not be unloaded.
def dimLinePoint(self) -> PyGe.Point3d:
This function returns the definition point (in WCS coordinates) that specifies where the
dimension line will be. This point will be somewhere on the dimension line.
def jogSymbolOn(self) -> bool:
This function returns the jog symbol status. Returns true if the jog symbol is on, false
otherwise.
def jogSymbolPosition(self) -> PyGe.Point3d:
This function returns the jog symbol position.
def oblique(self) -> float:
This function returns the extension line obliquing angle (in radians) for the dimension.
This angle is relative to the line that contains the start points of both extension lines
(xLine1Point and xLine2Point). Positive angles are counterclockwise when looking down the
dimension's OCS Z axis towards the origin. The line containing the two extension line start
points divides the plane containing the dimension into two half-planes. The extension lines
can only be within the half-plane that contains the dimension line definition point.
Therefore, the obliquing angle is periodic with a period of 0 to pi. Obliquing angles
greater than pi will simply be mapped to the equivalent angle in the first period. Negative
angles are periodic over 0 to -pi and result in the same obliquing as the positive angle
that results if pi is added to their first period value (for instance, -pi / 4 is the same
as 3 ( pi / 4). An angle of zero is a special case that is interpreted as 'use the
default,' which is the same as an obliquing angle of pi / 2 (90 degrees). The obliquing
angle is used for DXF group code 52.
def setDimLinePoint(self, pt: PyGe.Point3d) -> None:
This function sets the dimension to use pt (in WCS coordinates) as the definition point
that specifies where the dimension line will be (that is, this point will be somewhere on
the dimension line).
def setJogSymbolOn(self, val: bool) -> None:
This function sets the jog symbol status. Returns Acad::eOk if successful. Otherwise, it
returns Acad::eInvalidInput.
def setJogSymbolPosition(self, pt: PyGe.Point3d) -> None:
Sets the jog symbol position. Returns Acad::eOk if successful.
def setOblique(self, val: float) -> None:
This function sets the dimension to use oblique (in radians) as the extension line
obliquing angle for the dimension. This angle is relative to the line that contains the
start points of both extension lines (xLine1Point and xLine2Point). Positive angles are
counterclockwise when looking down the dimension's OCS Z axis towards the origin. The line
containing the two extension line start points divides the plane containing the dimension
into two half-planes. The extension lines can only be within the half-plane that contains
the dimension line definition point. The obliquing angle is periodic with a period of 0 to
pi. Therefore, obliquing angles greater than pi will simply be mapped to the equivalent
angle in the first period. Negative angles are periodic over 0 to -pi and result in the
same obliquing as the positive angle that results if pi is added to their first period
value (for instance, -pi / 4 is the same as 3 ( pi / 4). An angle of zero is a special case
that is interpreted as 'use the default,' which is the same as an obliquing angle of pi / 2
(90 degrees). The obliquing angle is used for DXF group code 52. This function always
returns Acad::eOk.
def setXLine1Point(self, pt: PyGe.Point3d) -> None:
This function sets the dimension to use pt (in WCS coordinates) as the definition point
that is used as the start point for the first extension line of the dimension. The AutoCAD
DIMEXO dimension variable will affect how the extension line is displayed relative to this
point. The first extension line start point is used for DXF group code 13. This function
always returns Acad::eOk.
def setXLine2Point(self, pt: PyGe.Point3d) -> None:
This function sets the dimension to use pt (in WCS coordinates) as the definition point
that is used as the start point for the second extension line of the dimension. The AutoCAD
DIMEXO dimension variable will affect how the extension line is displayed relative to this
point. The second extension line start point is used for DXF group code 14. This function
always returns Acad::eOk.
def xLine1Point(self) -> PyGe.Point3d:
This function returns the definition point (in WCS coordinates) that is used as the start
point for the first extension line of the dimension. The AutoCAD DIMEXO dimension variable
will affect how the extension line is displayed relative to this point. The first extension
line start point is used for DXF group code 13.
def xLine2Point(self) -> PyGe.Point3d:
This function returns the definition point (in WCS coordinates) that is used as the start
point for the second extension line of the dimension. The AutoCAD DIMEXO dimension variable
will affect how the extension line is displayed relative to this point. The second
extension line start point is used for DXF group code 14.
class AnnoType Class
kMText: ClassVar[Self]
kFcf: ClassVar[Self]
kBlockRef: ClassVar[Self]
kNoAnno: ClassVar[Self]
class AnnotationScale Class
def __init__(self) -> None:
def __reduce__(self) -> Any:
def cast(otherObject: PyDb.ObjectContext) -> AnnotationScale:
def className() -> str:
def copyFrom(self, otherObject: PyRx.RxObject) -> None:
def desc() -> PyRx.RxClass:
Returns a pointer to the AcRxClass object representing the specific class, or most recent
parent class explicitly registered with ObjectARX of either the pointer type used to invoke
it or the class qualifier used with it. (Remember that when a static member function is
invoked via a pointer, the pointer type, not the object type, determines which
implementation of the function is invoked.) When working with a pointer to an object and
the proper AcRxClass object for the class of the object pointed to is desired, the
AcRxObject::isA() function should be used, since it is a virtual non-static method and is
therefore not pointer type dependent. Caching the value of the pointer returned by this
method is acceptable, provided the application knows that the AcRxClass object pointed to
by the returned pointer was created by an ObjectARX application that will not be unloaded.
def getDrawingUnits(self) -> float:
def getIsTemporaryScale(self) -> bool:
def getPaperUnits(self) -> float:
def getScale(self) -> float:
def matchScaleId(self, val: int) -> bool:
def setDrawingUnits(self, val: float) -> None:
def setPaperUnits(self, val: float) -> None:
class AnnotativeStates Class
kTrue: ClassVar[Self]
kFalse: ClassVar[Self]
kNotApplicable: ClassVar[Self]
class Arc Class
def __init__(self) -> None:
The AcDbArc class represents the arc entity within AutoCAD.
def __init__(self, center: PyGe.Point3d, radius: float, startAngle: float, endAngle: float) -> None:
The AcDbArc class represents the arc entity within AutoCAD.
def __init__(self, center: PyGe.Point3d, normal: PyGe.Vector2d, radius: float, startAngle: float, endAngle: float) -> None:
The AcDbArc class represents the arc entity within AutoCAD.
def __init__(self, id: PyDb.ObjectId) -> None:
The AcDbArc class represents the arc entity within AutoCAD.
def __init__(self, id: PyDb.ObjectId, mode: PyDb.OpenMode) -> None:
The AcDbArc class represents the arc entity within AutoCAD.
def __init__(self, id: PyDb.ObjectId, mode: PyDb.OpenMode, erased: bool) -> None:
The AcDbArc class represents the arc entity within AutoCAD.
def __init__(*args) -> None:
The AcDbArc class represents the arc entity within AutoCAD.
def __reduce__(self) -> Any:
def cast(otherObject: PyRx.RxObject) -> Arc:
def center(self) -> PyGe.Point3d:
This function returns the center point of the arc in WCS coordinates. The center point
value is the WCS equivalent of DXF group code 10.
def className() -> str:
def cloneFrom(otherObject: PyRx.RxObject) -> Arc:
def desc() -> PyRx.RxClass:
Returns a pointer to the AcRxClass object representing the specific class, or most recent
parent class explicitly registered with ObjectARX of either the pointer type used to invoke
it or the class qualifier used with it. (Remember that when a static member function is
invoked via a pointer, the pointer type, not the object type, determines which
implementation of the function is invoked.) When working with a pointer to an object and
the proper AcRxClass object for the class of the object pointed to is desired, the
AcRxObject::isA() function should be used, since it is a virtual non-static method and is
therefore not pointer type dependent. Caching the value of the pointer returned by this
method is acceptable, provided the application knows that the AcRxClass object pointed to
by the returned pointer was created by an ObjectARX application that will not be unloaded.
def endAngle(self) -> float:
This function returns the end angle of the arc in radians. The angle is relative to the OCS
X axis for the arc with positive angles going counterclockwise when looking down the Z axis
towards the origin. The OCS X axis is determined by using the arc's normal, the WCS Z axis,
and the arbitrary axis algorithm. The end angle value is used for DXF group code 51.
def getAcGeCurve(self, tol: PyGe.Tol) -> PyGe.CircArc3d:
This is getAcGeCurve, a member of class AcDbCurve.
def length(self) -> float:
This is length, a member of class AcDbArc.
def normal(self) -> PyGe.Vector3d:
This function returns the arc's unit normal vector in WCS coordinates. The normal value is
used for DXF group code 210.
def radius(self) -> float:
This function returns the radius of the arc. The radius value is used for DXF group code
40.
def setCenter(self, val: PyGe.Point3d) -> None:
This function sets center to be the center point for the arc. center must be in WCS
coordinates. The center point value is the WCS equivalent of DXF group code 10. Returns
Acad::eOk if successful, or Acad::eInvalidInput if the data passed in is not acceptable.
def setEndAngle(self, val: float) -> None:
This function sets endAngle as the end angle of the arc. endAngle must be in radians. The
angle is relative to the OCS X axis for the arc with positive angles going counterclockwise
when looking down the Z axis towards the origin. The OCS X axis is determined by using the
arc's normal, the WCS Z axis, and the arbitrary axis algorithm. If the angle is provided
with a negative value, the arc is still drawn counterclockwise but measured in the reverse
direction. For example, an arc specified with 4.7124 radians (270 degrees) is the same as
-1.5708 (-90 degrees). The end angle value is used for DXF group code 51. Returns Acad::eOk
if successful, or Acad::eInvalidInput if the data passed in is not acceptable.
def setNormal(self, val: PyGe.Vector3d) -> None:
This function sets normal to be the normal vector of the plane containing the arc. normal
must be in WCS coordinates and must be non-zero length. The normal value is used for DXF
group code 210. Returns Acad::eOk if successful, or Acad::eInvalidInput if the data passed
in is not acceptable.
def setRadius(self, val: float) -> None:
This function sets radius to be the radius of the arc. radius must be greater than 0. The
radius value is used for DXF group code 40. Returns Acad::eOk if successful, or
Acad::eInvalidInput if the data passed in is not acceptable.
def setStartAngle(self, val: float) -> None:
This function sets startAngle to be the start angle of the arc. startAngle must be in
radians. The angle is relative to the OCS X axis for the arc with positive angles going
counterclockwise when looking down the Z axis towards the origin. The OCS X axis is
determined by using the arc's normal, the WCS Z axis, and the arbitrary axis algorithm. If
the angle is provided with a negative value, the arc is still drawn counterclockwise but
measured in the reverse direction. For example, an arc specified with 4.7124 radians (270
degrees) is the same as -1.5708 (-90 degrees). The start angle value is used for DXF group
code 50. Returns Acad::eOk if successful, or Acad::eInvalidInput if the data passed in is
not acceptable.
def setThickness(self, val: float) -> None:
This function sets the arc's thickness to be thickness. The thickness is the arc's
dimension along its normal vector direction (sometimes called the extrusion direction). The
thickness value is used for DXF group code 39. Returns Acad::eOk if successful, or
Acad::eInvalidInput if the data passed in is not acceptable.
def startAngle(self) -> float:
This function returns the start angle of the arc in radians. The angle is relative to the
OCS X axis for the arc with positive angles going counterclockwise when looking down the Z
axis towards the origin. The OCS X axis is determined by using the arc's normal, the WCS Z
axis, and the arbitrary axis algorithm. The start angle value is used for DXF group code
50.
def thickness(self) -> float:
This function returns the thickness value for the arc. The thickness is the arc's dimension
along its normal vector direction (sometimes called the extrusion direction). The thickness
value is used for DXF group code 39.
def totalAngle(self) -> float:
This is totalAngle, a member of class AcDbArc.
class ArcDimension Class
def __init__(self) -> None:
This class represents an arc length dimension.
def __init__(self, centerPoint: PyGe.Point3d, xLine1Point: PyGe.Point3d, xLine2Point: PyGe.Point3d, arcPnt: PyGe.Point3d) -> None:
This class represents an arc length dimension.
def __init__(self, centerPoint: PyGe.Point3d, xLine1Point: PyGe.Point3d, xLine2Point: PyGe.Point3d, arcPnt: PyGe.Point3d, dimText: str) -> None:
This class represents an arc length dimension.
def __init__(self, centerPoint: PyGe.Point3d, xLine1Point: PyGe.Point3d, xLine2Point: PyGe.Point3d, arcPnt: PyGe.Point3d, dimText: str, id: PyDb.ObjectId) -> None:
This class represents an arc length dimension.
def __init__(self, id: PyDb.ObjectId) -> None:
This class represents an arc length dimension.
def __init__(self, id: PyDb.ObjectId, mode: PyDb.OpenMode) -> None:
This class represents an arc length dimension.
def __init__(self, id: PyDb.ObjectId, mode: PyDb.OpenMode, erased: bool) -> None:
This class represents an arc length dimension.
def __init__(*args) -> None:
This class represents an arc length dimension.
def __reduce__(self) -> Any:
def arcEndParam(self) -> float:
Returns the parameter of the arc being dimensioned corresponding to the arc length
dimension's second definition point.
def arcPoint(self) -> PyGe.Point3d:
Returns a point on the arc length dimension's dimension arc.
def arcStartParam(self) -> float:
Returns the parameter of the arc being dimensioned corresponding to the arc length
dimension's first definition point.
def arcSymbolType(self) -> int:
Returns the type of symbol used within the arc length dimension's text string. A value of 0
indicates that the arc symbol precedes text, 1 indicates that the arc symbol is above text,
and 2 indicates that no arc symbol is used.
def cast(otherObject: PyRx.RxObject) -> ArcDimension:
def centerPoint(self) -> PyGe.Point3d:
Returns the center point of the arc dimensioned by the arc length dimension.
def className() -> str:
def cloneFrom(otherObject: PyRx.RxObject) -> ArcDimension:
def desc() -> PyRx.RxClass:
Returns a pointer to the AcRxClass object representing the specific class, or most recent
parent class explicitly registered with ObjectARX of either the pointer type used to invoke
it or the class qualifier used with it. (Remember that when a static member function is
invoked via a pointer, the pointer type, not the object type, determines which
implementation of the function is invoked.) When working with a pointer to an object and
the proper AcRxClass object for the class of the object pointed to is desired, the
AcRxObject::isA() function should be used, since it is a virtual non-static method and is
therefore not pointer type dependent. Caching the value of the pointer returned by this
method is acceptable, provided the application knows that the AcRxClass object pointed to
by the returned pointer was created by an ObjectARX application that will not be unloaded.
def hasLeader(self) -> bool:
Returns true if this arc length dimension has an extra leader drawn to resolve ambiguity.
Returns false if the arc length dimension has no extra leader drawn.
def isPartial(self) -> bool:
Reserved for future use.
def leader1Point(self) -> PyGe.Point3d:
Returns the start point for the arc length dimension's extra leader, if drawn.
def leader2Point(self) -> PyGe.Point3d:
Returns the end point for the arc length dimension's extra leader, if drawn.
def setArcEndParam(self, val: float) -> None:
Sets the parameter of the arc being dimensioned corresponding to the arc length dimension's
second definition point.
def setArcPoint(self, pt: PyGe.Point3d) -> None:
Sets the point through which the arc length dimension's dimension arc passes.
def setArcStartParam(self, val: float) -> None:
Sets the parameter of the arc being dimensioned corresponding to the arc length dimension's
first definition point.
def setArcSymbolType(self, val: int) -> None:
Sets the type of symbol to use in the arc length dimension's text string. A value of 0
indicates that the arc symbol precedes text, 1 indicates that the arc symbol is above text,
and 2 indicates that no arc symbol is used. This overrides the setting of this value in the
dimension's style.
def setCenterPoint(self, pt: PyGe.Point3d) -> None:
Sets the center point of the arc dimensioned by the arc length dimension.
def setHasLeader(self, val: bool) -> None:
Sets whether the arc length dimension has an extra leader drawn to resolve ambiguity.
def setIsPartial(self, val: bool) -> None:
Reserved for future use.
def setLeader1Point(self, pt: PyGe.Point3d) -> None:
Sets the start point for the arc length dimension's extra leader, if drawn.
def setLeader2Point(self, pt: PyGe.Point3d) -> None:
Sets the end point for the arc length dimension's extra leader, if drawn.
def setXLine1Point(self, pt: PyGe.Point3d) -> None:
Sets the start point for the arc length dimension's first extension line.
def setXLine2Point(self, pt: PyGe.Point3d) -> None:
Sets the start point for the arc length dimension's second extension line.
def xLine1Point(self) -> PyGe.Point3d:
Returns the start point for the arc length dimension's first extension line.
def xLine2Point(self) -> PyGe.Point3d:
Returns the start point for the arc length dimension's second extension line.
class AssocFlags Class
kFirstPointRef: ClassVar[Self]
kSecondPointRef: ClassVar[Self]
kThirdPointRef: ClassVar[Self]
kFourthPointRef: ClassVar[Self]
class AttributeDefinition Class
def __init__(self) -> None:
def __init__(self, position: PyGe.Point3d, text: str, tag: str, prompt: str, styleid: PyDb.ObjectId) -> None:
def __init__(self, id: PyDb.ObjectId) -> None:
def __init__(self, id: PyDb.ObjectId, mode: PyDb.OpenMode) -> None:
def __init__(self, id: PyDb.ObjectId, mode: PyDb.OpenMode, erased: bool) -> None:
def __init__(*args) -> None:
def __reduce__(self) -> Any:
def adjustAlignment(self, val: Database) -> None:
Normally when a text entity is closed, the text's position and alignment points are
adjusted according to the text's justification settings and the text style. But, if the
text entity is embedded in another entity, it will never be closed in which case it won't
automatically be adjusted. Or, if the text is added to a transaction before it's first
close(), and the graphics are flushed to the screen before the outermost transaction ends,
the text will be displayed before the automatic adjustment takes place. This method allows
a way to cause the text to be adjusted on non-database resident text entities or text
entities within transactions. If the text entity is not database resident, then pDb must
not be NULL, otherwise Acad::eNoDatabase will be returned. If the text entity is database
resident, then the entity's database will be used regardless of the value of pDb. When this
method is called, the database used must also be the current working database (as returned
by acdbHostApplicationServices()->workingDatabase()), the text entity must have non-NULL
text string data and a valid text style objectId that resides in the database being used,
otherwise Acad::eInvalidContext will be returned. Returns Acad::eOk if successful.
def cast(otherObject: PyRx.RxObject) -> AttributeDefinition:
def className() -> str:
def cloneFrom(otherObject: PyRx.RxObject) -> AttributeDefinition:
def convertIntoMTextAttributeDefinition(self, val: bool) -> None:
Converts this attribute definition into a multi-line attribute definition. Returns
Acad::eOk if successful; otherwise, returns an AutoCAD error status.
def desc() -> PyRx.RxClass:
Returns a pointer to the AcRxClass object representing the specific class, or most recent
parent class explicitly registered with ObjectARX of either the pointer type used to invoke
it or the class qualifier used with it. (Remember that when a static member function is
invoked via a pointer, the pointer type, not the object type, determines which
implementation of the function is invoked.) When working with a pointer to an object and
the proper AcRxClass object for the class of the object pointed to is desired, the
AcRxObject::isA() function should be used, since it is a virtual non-static method and is
therefore not pointer type dependent. Caching the value of the pointer returned by this
method is acceptable, provided the application knows that the AcRxClass object pointed to
by the returned pointer was created by an ObjectARX application that will not be unloaded.
def fieldLength(self) -> int:
Returns the AcDbAttributeDefinition's field length value. This value is not currently used
within AutoCAD. The field length value is used for DXF group code 73.
def getMTextAttributeDefinition(self) -> MText:
When called on multi-line attribute definitions, it can be called to retrieve a clone of
the internal AcDbMText that's used for the representation of this multi-line attribute
definition. Callers must either delete the returned AcDbMText entity, or put it back under
the control of the attribute definition by calling setMTextAttributeDefinition(). Returns a
non-database-resistent clone of the internal AcDbMText that's used for the representation
of this multi-line attribute definition. Returns NULL when called on a non-multi-line
attribute definition.
def isConstant(self) -> bool:
Returns Adesk::kTrue if the AcDbAttributeDefinition object is set to be constant. This
function reflects the setting on bit 2 of DXF group code 70. That is, if bit 2 is set, then
no AcDbAttribute will be created during insertion of the block containing the
AcDbAttributeDefinition. The AcDbAttributeDefinition will be used instead, since it will be
the same for all AcDbBlockReferences that reference the AcDbBlockTableRecord containing the
AcDbAttributeDefinition.
def isInvisible(self) -> bool:
Returns Adesk::kTrue if the AcDbAttributeDefinition object is set to be invisible. This
function reflects the setting on bit 1 of DXF group code 70 (that is, if bit 1 is set, then
attributes created with this AcDbAttributeDefinition as a template will be invisible).
def isMTextAttributeDefinition(self) -> bool:
Tells whether the attribute definition is a multi-line attribute definition. Returns true
if the attribute definition is a multi-line attribute definition. Otherwise returns false.
def isPreset(self) -> bool:
Returns Adesk::kTrue if the AcDbAttributeDefinition object has a preset value and will not
prompt for user input. This function reflects the setting on bit 4 of DXF group code 70
(that is, if bit 4 is set, then attributes created with this AcDbAttributeDefinition as a
template will use the preset value and not prompt for user input).
def isVerifiable(self) -> bool:
Returns Adesk::kTrue if the attribute object is set to verify user input. This function
reflects the setting of bit 3 of DXF group code 70 (that is, if bit 3 is set, then
attributes created with this AcDbAttributeDefinition as a template will ask for
verification of user input).
def lockPositionInBlock(self) -> bool:
Returns true if the AcDbAttributeDefinition object is set to be immmovable relative to the
geometry in the block.
def prompt(self) -> str:
This function returns a pointer to a copy of the prompt string for the
AcDbAttributeDefinition. When the blockTableRecord containing the AcDbAttributeDefinition
is inserted and an AcDbAttribute object is created using the AcDbAttributeDefinition as the
template, the prompt string is displayed to ask the user to input a text string for the
AcDbAttribute. The caller of this function is responsible for deallocating the memory used
by the returned string. The C++ delete [] should be used for this purpose. The prompt
string is used for DXF group code 3.
def setConstant(self, val: bool) -> None:
This function sets the constant flag of the AcDbAttributeDefinition. If constant is
Adesk::kTrue, then the AcDbAttributeDefinition object is set to be constant. If constant is
Adesk::kFalse, then the attribute object is set to be visible. This function reflects the
setting on bit 2 of DXF group code 70. That is, if bit 2 is set, then no AcDbAttribute will
be created during insertion of the block containing the AcDbAttributeDefinition. The
AcDbAttributeDefinition will be used instead, since it will be the same for all
AcDbBlockReferences that reference the AcDbBlockTableRecord containing the
AcDbAttributeDefinition. Returns Acad::eOk if successful, or Acad::eInvalidInput if the
data passed in is not acceptable.
def setFieldLength(self, val: int) -> None:
Sets length to be the attribute's field length value. This value is not currently used
within AutoCAD. The field length value is used for DXF group code 73. Returns Acad::eOk if
successful, or Acad::eInvalidInput if the data passed in is not acceptable.
def setInvisible(self, val: bool) -> None:
This function sets the visibility flag of the AcDbAttributeDefinition. If invisible is
Adesk::kTrue, then the AcDbAttributeDefinition object is set to be invisible. If invisible
is Adesk::kFalse, then the AcDbAttributeDefinition object is set to be visible. This
function reflects the setting on bit 1 of DXF group code 70 (that is, if bit 1 is set, then
attributes created with this AcDbAttributeDefinition as a template will be invisible).
Returns Acad::eOk if successful, or Acad::eInvalidInput if the data passed in is not
acceptable.
def setLockPositionInBlock(self, val: bool) -> None:
This function sets the lock position property of the AcDbAttributeDefinition. If bValue is
true, then the AcDbAttributeDefinition object is set to be immovable relative to the
geometry in the block.
def setMTextAttributeDefinition(self, val: MText) -> None:
This function can be called on multi-line attribute definitions, to replace the internal
AcDbMText entity with a new or modified one. Returns Acad::eOk on success. Returns other
error codes on failure.
def setPreset(self, val: bool) -> None:
This function sets the preset flag of the AcDbAttributeDefinition. If preset is
Adesk::kTrue, then the AcDbAttributeDefinition object is set to be preset. If preset is
Adesk::kFalse, then the AcDbAttributeDefinition object is set to be not preset. This
function reflects the setting on bit 4 of DXF group code 70 (that is, if bit 4 is set, then
attributes created with this AcDbAttributeDefinition as a template will use the preset
value and not prompt for user input). Returns Acad::eOk if successful, or
Acad::eInvalidInput if the data passed in is not acceptable.
def setPrompt(self, val: str) -> None:
This function sets the AcDbAttributeDefinition to use a copy of newPrompt for its prompt
string. When the blockTableRecord containing the AcDbAttributeDefinition is inserted and an
AcDbAttribute object is created using the AcDbAttributeDefinition as the template, the
prompt string is displayed to ask the user to input a text string for the AcDbAttribute.
The prompt string is used for DXF group code 3. Returns Acad::eOk if successful, or
Acad::eInvalidInput if the data passed in is not acceptable.
def setTag(self, val: str) -> None:
This function sets the AcDbAttributeDefinition's tag to be a copy of the newTag string. The
tag string is the identifier you see on screen to represent the AcDbAttributeDefinition.
The tag string is used for DXF group code 2. Returns Acad::eOk if successful, or
Acad::eInvalidInput if the data passed in is not acceptable.
def setVerifiable(self, val: bool) -> None:
This function sets the verifiable flag of the AcDbAttributeDefinition. If verifiable is
Adesk::kTrue, then the AcDbAttributeDefinition object is set to be verifiable. If
verifiable is Adesk::kFalse, then the AcDbAttributeDefinition object is set to be not
verifiable. This function reflects the setting of bit 3 of DXF group code 70 (that is, if
bit 3 is set, then attributes created with this AcDbAttributeDefinition as a template will
ask for verification of user input). Returns Acad::eOk if successful, or
Acad::eInvalidInput if the data passed in is not acceptable.
def tag(self) -> str:
This function returns a pointer to a copy of the tag string for the attribute. The tag
string is the identifier you see on screen to represent the AcDbAttributeDefinition. The
caller of this function is responsible for deallocating the memory used by the returned
string. The acutDelString() global function should be used for this purpose. The tag string
is used for DXF group code 2.
def updateMTextAttributeDefinition(self) -> None:
Updates the internal AcDbMText entity from the basic AcDbAttributeDefinition properties
class AttributeReference Class
def __init__(self) -> None:
def __init__(self, position: PyGe.Point3d, text: str, tag: str, styleid: PyDb.ObjectId) -> None:
def __init__(self, id: PyDb.ObjectId) -> None:
def __init__(self, id: PyDb.ObjectId, mode: PyDb.OpenMode) -> None:
def __init__(self, id: PyDb.ObjectId, mode: PyDb.OpenMode, erased: bool) -> None:
def __init__(*args) -> None:
def __reduce__(self) -> Any:
def cast(otherObject: PyRx.RxObject) -> AttributeReference:
def className() -> str:
def cloneFrom(otherObject: PyRx.RxObject) -> AttributeReference:
def convertIntoMTextAttribute(self, val: bool) -> None:
Converts an attribute into a multi-line attribute. Returns Acad::eOk if successful;
otherwise, returns an AutoCAD error status.
def desc() -> PyRx.RxClass:
Returns a pointer to the AcRxClass object representing the specific class, or most recent
parent class explicitly registered with ObjectARX of either the pointer type used to invoke
it or the class qualifier used with it. (Remember that when a static member function is
invoked via a pointer, the pointer type, not the object type, determines which
implementation of the function is invoked.) When working with a pointer to an object and
the proper AcRxClass object for the class of the object pointed to is desired, the
AcRxObject::isA() function should be used, since it is a virtual non-static method and is
therefore not pointer type dependent. Caching the value of the pointer returned by this
method is acceptable, provided the application knows that the AcRxClass object pointed to
by the returned pointer was created by an ObjectARX application that will not be unloaded.
def fieldLength(self) -> int:
Returns the attribute's field length value. This value is not currently used within
AutoCAD. The field length value is used for DXF group code 73.
def getMTextAttribute(self) -> MText:
When called on multi-line attributes, it retrieves a clone of the internal AcDbMText that's
used for the representation of this multi-line attribute. Callers must either delete the
returned AcDbMText entity, or put it back under the control of the attribute by calling
setMTextAttribute(). Returns a non-database-resistent clone of the internal AcDbMText
that's used for the representation of this multi-line attribute. Returns NULL when called
on a non-multi-line attribute.
def isConstant(self) -> bool:
Returns Adesk::kTrue if the attribute object is set to be constant. This function reflects
the setting on bit 2 of DXF group code 70 (that is, if bit 2 is set then the attribute will
use the preset value and not prompt for user input).
def isInvisible(self) -> bool:
Returns Adesk::kTrue if the attribute object is set to be invisible. This function reflects
the setting on bit 1 of DXF group code 70 (that is, if bit 1 is set, then the attribute
will be invisible).
def isMTextAttribute(self) -> bool:
Tells whether the attribute is a multi-line attribute. Returns true if the attribute is a
multi-line attribute. Otherwise returns false.
def isPreset(self) -> bool:
Returns Adesk::kTrue if the attribute object has a preset value and will not prompt for
user input. This function reflects the setting on bit 4 of DXF group code 70 (that is, if
bit 4 is set, then the attribute will use the preset value and not prompt for user input).
def isReallyLocked(self) -> bool:
Returns true if the attribute has been locked by a previous call to setLocked(). Multi-line
attributes (especially the secondary ones) are always automatically locked for visual
fidelity in older AutoCAD releases.
def isVerifiable(self) -> bool:
Returns Adesk::kTrue if the attribute object is set to verify user input. This function
reflects the setting of bit 3 of DXF group code 70 (that is, if bit 3 is set, then the
attribute will ask for verification of user input).
def lockPositionInBlock(self) -> bool:
Returns true if the AcDbAttribute object is set to be immmovable relative to the geometry
in the block.
def setAttributeFromBlock(self, blkXform: PyGe.Matrix3d) -> None:
Applies blkXform to the attribute's geometric data to transform the position, sizing, and
obliquing as would be done by the INSERT command. The attribute's textual and entity
properties data is left alone. Returns Acad::eOk if successful.
def setAttributeFromBlock(self, pAttdef: PyDb.AttributeDefinition, blkXform: PyGe.Matrix3d) -> None:
Applies blkXform to the attribute's geometric data to transform the position, sizing, and
obliquing as would be done by the INSERT command. The attribute's textual and entity
properties data is left alone. Returns Acad::eOk if successful.
def setAttributeFromBlock(*args) -> None:
Applies blkXform to the attribute's geometric data to transform the position, sizing, and
obliquing as would be done by the INSERT command. The attribute's textual and entity
properties data is left alone. Returns Acad::eOk if successful.
def setFieldLength(self, val: int) -> None:
Sets length to be the attribute's field length value. This value is not currently used
within AutoCAD. The field length value is used for DXF group code 73. Returns Acad::eOk if
successful, or Acad::eInvalidInput if the data passed in is not acceptable.
def setInvisible(self, val: bool) -> None:
This function sets the visibility flag of the attribute. If invisible is Adesk::kTrue, then
the attribute object is set to be invisible. If invisible is Adesk::kFalse, then the
attribute object is set to be visible. This function reflects the setting on bit 1 of DXF
group code 70 (that is, if bit 1 is set, then the attribute will be invisible). Returns
Acad::eOk if successful, or Acad::eInvalidInput if the data passed in is not acceptable.
def setLockPositionInBlock(self, val: bool) -> None:
This function sets the lock property of this object. If bValue is true, then this object is
set to be immovable relative to geometry in the block. Returns Acad::eOk if successful.
def setMTextAttribute(self, val: MText) -> None:
This function can be called on multi-line attributes, to replace the internal AcDbMText
entity with a new or modified one. Returns Acad::eOk if successful; otherwise, returns an
AutoCAD error status.
def setTag(self, val: str) -> None:
This function sets the attribute's tag to be a copy of the newTag string. The tag string is
the identifier you see if you explode the AcDbBlockReference that owns the attribute, so
that the attribute reverts back to the AcDbAttributeDefinition that was part of the
original reference's block definition. The tag string is used for DXF group code 2. Returns
Acad::eOk if successful, or Acad::eInvalidInput if the data passed in is not acceptable.
def tag(self) -> str:
This function returns a pointer to a copy of the tag string for the attribute. The tag
string is the identifier you see if you explode the AcDbBlockReference that owns the
attribute, so that the attribute reverts back to the AcDbAttributeDefinition that was part
of the original reference's block definition. The caller of this function is responsible
for deallocating the memory used by the returned string. The acutDelString() global
function should be used for this purpose. The tag string is used for DXF group code 2.
def updateMTextAttribute(self) -> None:
Updates the internal AcDbMText entity from the basic AcDbAttribute properties. Returns
Acad::eOk if successful; otherwise, returns an AutoCAD error status.
class AutoWorkingDatabase Class
def __init__(self, db: PyDb.Database) -> None:
def __reduce__(self) -> Any:
def wdb(self) -> Database:
class BlockBegin Class
def __init__(self) -> None:
The AcDbBlockBegin class represents the block header portion of a block definition within
AutoCAD (that is, group codes 2, 3, 10, 20, 30, and 70). Objects of this class are created
and handled automatically by AutoCAD for each AcDbBlockTableRecord. Applications do not
need to create objects of this class nor can they add or remove them from databases.
Applications are free to add or manipulate xdata on objects of this class as well as work
with extension dictionaries for objects of this class.
def __init__(self, id: PyDb.ObjectId) -> None:
The AcDbBlockBegin class represents the block header portion of a block definition within
AutoCAD (that is, group codes 2, 3, 10, 20, 30, and 70). Objects of this class are created
and handled automatically by AutoCAD for each AcDbBlockTableRecord. Applications do not
need to create objects of this class nor can they add or remove them from databases.
Applications are free to add or manipulate xdata on objects of this class as well as work
with extension dictionaries for objects of this class.
def __init__(self, id: PyDb.ObjectId, mode: PyDb.OpenMode) -> None:
The AcDbBlockBegin class represents the block header portion of a block definition within
AutoCAD (that is, group codes 2, 3, 10, 20, 30, and 70). Objects of this class are created
and handled automatically by AutoCAD for each AcDbBlockTableRecord. Applications do not
need to create objects of this class nor can they add or remove them from databases.
Applications are free to add or manipulate xdata on objects of this class as well as work
with extension dictionaries for objects of this class.
def __init__(*args) -> None:
The AcDbBlockBegin class represents the block header portion of a block definition within
AutoCAD (that is, group codes 2, 3, 10, 20, 30, and 70). Objects of this class are created
and handled automatically by AutoCAD for each AcDbBlockTableRecord. Applications do not
need to create objects of this class nor can they add or remove them from databases.
Applications are free to add or manipulate xdata on objects of this class as well as work
with extension dictionaries for objects of this class.
def __reduce__(self) -> Any:
def cast(otherObject: PyRx.RxObject) -> BlockBegin:
def className() -> str:
def cloneFrom(otherObject: PyRx.RxObject) -> BlockBegin:
def desc() -> PyRx.RxClass:
Returns a pointer to the AcRxClass object representing the specific class, or most recent
parent class explicitly registered with ObjectARX of either the pointer type used to invoke
it or the class qualifier used with it. (Remember that when a static member function is
invoked via a pointer, the pointer type, not the object type, determines which
implementation of the function is invoked.) When working with a pointer to an object and
the proper AcRxClass object for the class of the object pointed to is desired, the
AcRxObject::isA() function should be used, since it is a virtual non-static method and is
therefore not pointer type dependent. Caching the value of the pointer returned by this
method is acceptable, provided the application knows that the AcRxClass object pointed to
by the returned pointer was created by an ObjectARX application that will not be unloaded.
class BlockEnd Class
def __init__(self) -> None:
The AcDbBlockEnd class represents the ENDBLK object within AutoCAD. Objects of this class
are created and handled automatically by AutoCAD for each AcDbBlockTableRecord.
Applications do not need to create objects of this class nor can they add or remove them
from databases. Applications are free to add or manipulate xdata on objects of this class,
as well as work with extension dictionaries for objects of this class.
def __init__(self, id: PyDb.ObjectId) -> None:
The AcDbBlockEnd class represents the ENDBLK object within AutoCAD. Objects of this class
are created and handled automatically by AutoCAD for each AcDbBlockTableRecord.
Applications do not need to create objects of this class nor can they add or remove them
from databases. Applications are free to add or manipulate xdata on objects of this class,
as well as work with extension dictionaries for objects of this class.
def __init__(self, id: PyDb.ObjectId, mode: PyDb.OpenMode) -> None:
The AcDbBlockEnd class represents the ENDBLK object within AutoCAD. Objects of this class
are created and handled automatically by AutoCAD for each AcDbBlockTableRecord.
Applications do not need to create objects of this class nor can they add or remove them
from databases. Applications are free to add or manipulate xdata on objects of this class,
as well as work with extension dictionaries for objects of this class.
def __init__(*args) -> None:
The AcDbBlockEnd class represents the ENDBLK object within AutoCAD. Objects of this class
are created and handled automatically by AutoCAD for each AcDbBlockTableRecord.
Applications do not need to create objects of this class nor can they add or remove them
from databases. Applications are free to add or manipulate xdata on objects of this class,
as well as work with extension dictionaries for objects of this class.
def __reduce__(self) -> Any:
def cast(otherObject: PyRx.RxObject) -> BlockEnd:
def className() -> str:
def cloneFrom(otherObject: PyRx.RxObject) -> BlockEnd:
def desc() -> PyRx.RxClass:
Returns a pointer to the AcRxClass object representing the specific class, or most recent
parent class explicitly registered with ObjectARX of either the pointer type used to invoke
it or the class qualifier used with it. (Remember that when a static member function is
invoked via a pointer, the pointer type, not the object type, determines which
implementation of the function is invoked.) When working with a pointer to an object and
the proper AcRxClass object for the class of the object pointed to is desired, the
AcRxObject::isA() function should be used, since it is a virtual non-static method and is
therefore not pointer type dependent. Caching the value of the pointer returned by this
method is acceptable, provided the application knows that the AcRxClass object pointed to
by the returned pointer was created by an ObjectARX application that will not be unloaded.
class BlockReference Class
def __init__(self) -> None:
The AcDbBlockReference class represents the INSERT entity within AutoCAD. A block reference
is used to place, size, and display an instance of the collection of entities within the
AcDbBlockTableRecord that it references. In addition, block references can be the owner of
AcDbAttribute entities (the list of which is automatically terminated by an AcDbSequenceEnd
entity). AcDbBlockReference set functions inherited from AcDbEntity ignore the doSubents
argument because these subentities are attributes that are really special text entities and
need to have their own individual properties (unlike polyline vertices, which are just data
points). Classes Derived from AcDbBlockReferenceClasses derived from AcDbBlockReference
must supermessage the base class's worldDraw() function and allow it to do the work of
drawing the entities in the block table record. This allows the osnap code to distinguish
the graphics for each entity in the block table record and automatically get each entity's
osnap points without having to iterate through the block reference. The derived class can
draw any other graphics it wishes to and can add osnap points of its own, but
AcDbBlockReference::worldDraw() must draw the block table record's entities. The derived
class must override getOsnapPoints() and implement it to explicitly handle the insert osnap
mode (because the insert point is the responsibility of the block reference) and do nothing
for the other modes, then return Acad::eOk.
def __init__(self, position: PyGe.Point3d, blockTableRec: PyDb.ObjectId) -> None:
The AcDbBlockReference class represents the INSERT entity within AutoCAD. A block reference
is used to place, size, and display an instance of the collection of entities within the
AcDbBlockTableRecord that it references. In addition, block references can be the owner of
AcDbAttribute entities (the list of which is automatically terminated by an AcDbSequenceEnd
entity). AcDbBlockReference set functions inherited from AcDbEntity ignore the doSubents
argument because these subentities are attributes that are really special text entities and
need to have their own individual properties (unlike polyline vertices, which are just data
points). Classes Derived from AcDbBlockReferenceClasses derived from AcDbBlockReference
must supermessage the base class's worldDraw() function and allow it to do the work of
drawing the entities in the block table record. This allows the osnap code to distinguish
the graphics for each entity in the block table record and automatically get each entity's
osnap points without having to iterate through the block reference. The derived class can
draw any other graphics it wishes to and can add osnap points of its own, but
AcDbBlockReference::worldDraw() must draw the block table record's entities. The derived
class must override getOsnapPoints() and implement it to explicitly handle the insert osnap
mode (because the insert point is the responsibility of the block reference) and do nothing
for the other modes, then return Acad::eOk.
def __init__(self, id: PyDb.ObjectId) -> None:
The AcDbBlockReference class represents the INSERT entity within AutoCAD. A block reference
is used to place, size, and display an instance of the collection of entities within the
AcDbBlockTableRecord that it references. In addition, block references can be the owner of
AcDbAttribute entities (the list of which is automatically terminated by an AcDbSequenceEnd
entity). AcDbBlockReference set functions inherited from AcDbEntity ignore the doSubents
argument because these subentities are attributes that are really special text entities and
need to have their own individual properties (unlike polyline vertices, which are just data
points). Classes Derived from AcDbBlockReferenceClasses derived from AcDbBlockReference
must supermessage the base class's worldDraw() function and allow it to do the work of
drawing the entities in the block table record. This allows the osnap code to distinguish
the graphics for each entity in the block table record and automatically get each entity's
osnap points without having to iterate through the block reference. The derived class can
draw any other graphics it wishes to and can add osnap points of its own, but
AcDbBlockReference::worldDraw() must draw the block table record's entities. The derived
class must override getOsnapPoints() and implement it to explicitly handle the insert osnap
mode (because the insert point is the responsibility of the block reference) and do nothing
for the other modes, then return Acad::eOk.
def __init__(self, id: PyDb.ObjectId, mode: PyDb.OpenMode) -> None:
The AcDbBlockReference class represents the INSERT entity within AutoCAD. A block reference
is used to place, size, and display an instance of the collection of entities within the
AcDbBlockTableRecord that it references. In addition, block references can be the owner of
AcDbAttribute entities (the list of which is automatically terminated by an AcDbSequenceEnd
entity). AcDbBlockReference set functions inherited from AcDbEntity ignore the doSubents
argument because these subentities are attributes that are really special text entities and
need to have their own individual properties (unlike polyline vertices, which are just data
points). Classes Derived from AcDbBlockReferenceClasses derived from AcDbBlockReference
must supermessage the base class's worldDraw() function and allow it to do the work of
drawing the entities in the block table record. This allows the osnap code to distinguish
the graphics for each entity in the block table record and automatically get each entity's
osnap points without having to iterate through the block reference. The derived class can
draw any other graphics it wishes to and can add osnap points of its own, but
AcDbBlockReference::worldDraw() must draw the block table record's entities. The derived
class must override getOsnapPoints() and implement it to explicitly handle the insert osnap
mode (because the insert point is the responsibility of the block reference) and do nothing
for the other modes, then return Acad::eOk.
def __init__(self, id: PyDb.ObjectId, mode: PyDb.OpenMode, erased: bool) -> None:
The AcDbBlockReference class represents the INSERT entity within AutoCAD. A block reference
is used to place, size, and display an instance of the collection of entities within the
AcDbBlockTableRecord that it references. In addition, block references can be the owner of
AcDbAttribute entities (the list of which is automatically terminated by an AcDbSequenceEnd
entity). AcDbBlockReference set functions inherited from AcDbEntity ignore the doSubents
argument because these subentities are attributes that are really special text entities and
need to have their own individual properties (unlike polyline vertices, which are just data
points). Classes Derived from AcDbBlockReferenceClasses derived from AcDbBlockReference
must supermessage the base class's worldDraw() function and allow it to do the work of
drawing the entities in the block table record. This allows the osnap code to distinguish
the graphics for each entity in the block table record and automatically get each entity's
osnap points without having to iterate through the block reference. The derived class can
draw any other graphics it wishes to and can add osnap points of its own, but
AcDbBlockReference::worldDraw() must draw the block table record's entities. The derived
class must override getOsnapPoints() and implement it to explicitly handle the insert osnap
mode (because the insert point is the responsibility of the block reference) and do nothing
for the other modes, then return Acad::eOk.
def __init__(*args) -> None:
The AcDbBlockReference class represents the INSERT entity within AutoCAD. A block reference
is used to place, size, and display an instance of the collection of entities within the
AcDbBlockTableRecord that it references. In addition, block references can be the owner of
AcDbAttribute entities (the list of which is automatically terminated by an AcDbSequenceEnd
entity). AcDbBlockReference set functions inherited from AcDbEntity ignore the doSubents
argument because these subentities are attributes that are really special text entities and
need to have their own individual properties (unlike polyline vertices, which are just data
points). Classes Derived from AcDbBlockReferenceClasses derived from AcDbBlockReference
must supermessage the base class's worldDraw() function and allow it to do the work of
drawing the entities in the block table record. This allows the osnap code to distinguish
the graphics for each entity in the block table record and automatically get each entity's
osnap points without having to iterate through the block reference. The derived class can
draw any other graphics it wishes to and can add osnap points of its own, but
AcDbBlockReference::worldDraw() must draw the block table record's entities. The derived
class must override getOsnapPoints() and implement it to explicitly handle the insert osnap
mode (because the insert point is the responsibility of the block reference) and do nothing
for the other modes, then return Acad::eOk.
def __reduce__(self) -> Any:
def appendAttribute(self, val: PyDb.AttributeReference) -> ObjectId:
This function appends the AcDbAttribute object pointed to by pNewAttrib to the attribute
list of the block reference, establishes the block reference as the attribute's owner, and
adds the attribute to the AcDbDatabase that contains the block reference. The block
reference must be database-resident for this function to succeed. The object ID of the
newly added attribute is returned in objId. The appended attribute must be explicitly
closed by the calling application after the appendAttribute() call returns.
def attributeIds(self) -> list[PyDb.ObjectId]:
def blockTableRecord(self) -> ObjectId:
This function returns the object ID of the AcDbBlockTableRecord referenced by the block
reference. The referenced block table record contains the entities that the block reference
will display. The block table record object ID is used to get the entity name that is used
with the group code -2 in AutoLISP and ADSRX entity information listings of the block
reference.
def blockTransform(self) -> PyGe.Matrix3d:
Returns a matrix that describes the mapping from the block table record's MCS (the WCS
within the block table record's microspace) out to the AcDbDatabase's WCS. So, for example,
applying this matrix to the center point value of a circle within the block table record
will generate the center point of the circle as displayed for the block reference.
def cast(otherObject: PyRx.RxObject) -> BlockReference:
def className() -> str:
def cloneFrom(otherObject: PyRx.RxObject) -> BlockReference:
def desc() -> PyRx.RxClass:
Returns a pointer to the AcRxClass object representing the specific class, or most recent
parent class explicitly registered with ObjectARX of either the pointer type used to invoke
it or the class qualifier used with it. (Remember that when a static member function is
invoked via a pointer, the pointer type, not the object type, determines which
implementation of the function is invoked.) When working with a pointer to an object and
the proper AcRxClass object for the class of the object pointed to is desired, the
AcRxObject::isA() function should be used, since it is a virtual non-static method and is
therefore not pointer type dependent. Caching the value of the pointer returned by this
method is acceptable, provided the application knows that the AcRxClass object pointed to
by the returned pointer was created by an ObjectARX application that will not be unloaded.
def explodeToOwnerSpace(self) -> None:
This method's behavior corresponds to the AcDbBlockReference::explode() function, except
that it appends the resulting entities to the AcDbBlockTableRecord that owns the
AcDbBlockReference on which this method was called. The AcDbBlockReference must be in a
database and must be uniformly scaled. Returns Acad::eOk if successful. Returns
Acad::eNotInDatabase if the AcDbBlockReference on which it is called has not been added to
a database. Returns Acad::eNotApplicable if the AcDbBlockReference is not uniformly scaled.
def geomExtentsBestFit(self, val: PyGe.Matrix3d) -> Extents:
When working in non-WCS coordinate systems, the extents returned from
AcDbBlockReference::geomExtents() can be somewhat larger that the actual geometry because
AcDbBlockReference::geomExtents() transforms the contained entities' precomputed extents by
the block reference's transformation matrix rather than transforming the entities and
computing a new box for the transformed entity set. This results in non-world aligned
extent boxes for the entities. This is fast, but will provide an 'exaggerated' enclosing
extents box. AcDbBlockReference::geomExtentsBestFit() avoids this problem by getting copies
of all the entities in the referenced block table record, applying parentXform to them, and
then calculating the extents on the resulting entity set. This is slower than the process
used by AcDbBlockReference::geomExtents(), but will result in the tightest fitting
AcDbExtents for the enclosed geometry. This method works recursively for nested block
references. When this method is called on the outermost block reference (the normal case
for ARX applications), parentXform should be the identity matrix. For calls on nested block
references, parentXform should be the cumulative transformation from the outermost block
reference down to the block reference that is referencing the block table record that owns
the block reference on which this method is being called. This method uses the
AcDbBlockReference::explode() method to get copies of the entities. Since the
AcDbBlockReference::explode() does not currently support nonuniform transformations, if the
block reference on which this method is called, or any nested block references have
nonuniform transformations, then this method cannot succeed and will return
Acad::eInvalidInput. Returns Acad::eOk if successful.
def getBlockName(self) -> str:
def nonAnnotationBlockTransform(self) -> PyGe.Matrix3d:
Returns the block transformation matrix independent of annotation scaling.
def nonAnnotationScaleFactors(self) -> PyGe.Scale3d:
Returns the block scale factor independent of annotation scaling.
def normal(self) -> PyGe.Vector3d:
This function returns the block reference's unit normal vector in WCS coordinates. The
normal value is used for DXF group code 210.
def position(self) -> PyGe.Point3d:
This function returns the WCS position point (often referred to as the insertion point) of
the block reference. The position value is the WCS equivalent of the DXF group code 10.
def rotation(self) -> float:
This function returns the rotation value (in radians) of the block reference. The rotation
value is relative to the X axis of a coordinate system that is parallel to the OCS of the
block reference, but has its origin at the position point of the block reference. The
rotation axis is the Z axis of this coordinate system with positive rotations going
counterclockwise when looking down the Z axis towards the origin. The rotation value is
used for DXF group code 50.
def scaleFactors(self) -> PyGe.Scale3d:
This function returns an AcGeScale3d object that contains the X, Y, and Z scale factors for
the block reference. The X, Y, and Z scaling of the block reference is applied to the
entities in the referenced block table record, relative to their perceived WCS coordinate
axes, which may or may not be the same as the drawing's WCS axes. The X scale factor value
is used for DXF group code 41. The Y scale factor value is used for DXF group code 42. The
Z scale factor value is used for DXF group code 43.
def setBlockTableRecord(self, val: ObjectId) -> None:
This function sets objId as the object ID of the AcDbBlockTableRecord referenced by the
block reference. The referenced block table record contains the entities that the block
reference will display. The block table record object ID is used to get the entity name
that is used with the group code -2 in AutoLISP and ADS entity information listings of the
block reference.
def setBlockTransform(self, val: PyGe.Matrix3d) -> None:
This function resets the block reference's position (insertion point), normal vector, scale
factors, and rotation so that the resulting MCS-to-drawing-WCS transform is the same as the
transform matrix. MCS is the WCS within the block table record's microspace. Returns
eCannotScaleNonUniformly when called on a block reference that refers to a block that
cannot be scaled nonuniformly.
def setNormal(self, val: PyGe.Vector3d) -> None:
This function sets newVal to be the normal vector of the plane containing the block
reference. newVal must be in WCS coordinates and must be nonzero length. Warning This
function changes the OCS for the AcDbBlockReference, which can affect the values returned
by the data access methods of this class. AcDbBlockReferences store their data in Entity
Coordinates (OCS). When an AcDbBlockReference data member is set via one of the class's set
methods, that data is converted from WCS to the OCS of the AcDbBlockReference object before
being stored. When a data access method is called to retrieve a data item from an
AcDbBlockReference object, the data is converted from OCS back to WCS. If the normal is
changed between the time the data is set and the time the data is retrieved, the retrieved
value will not match the value originally set. The normal value is used for DXF group code
210. Returns Acad::eOk if successful, or Acad::eInvalidInput if the data passed in is not
acceptable.
def setPosition(self, val: PyGe.Point3d) -> None:
Sets the block reference to use pt as the position value (often referred to as the
insertion point). pt must be in WCS coordinates. The position value is the WCS equivalent
of the DXF group code 10. Returns Acad::eOk if successful, or Acad::eInvalidInput if the
data passed in is not acceptable.
def setRotation(self, val: float) -> None:
This function sets newVal to be the rotation value (in radians) of the block reference. The
rotation value is relative to the X axis of a coordinate system that is parallel to the OCS
of the block reference, but has its origin at the position point of the block reference.
The rotation axis is the Z axis of this coordinate system with positive rotations going
counterclockwise when looking down the Z axis towards the origin. The rotation value is
used for DXF group code 50. Returns Acad::eOk if successful, or Acad::eInvalidInput if the
data passed in is not acceptable.
def setScaleFactors(self, val: PyGe.Scale3d) -> None:
This function sets the block reference to use the X, Y, and Z scale factors contained in
scale. The X, Y, and Z scaling of the block reference is applied to the entities in the
referenced block table record relative to their perceived WCS coordinate axes, which may or
may not be the same as the drawing's WCS axes. The X scale factor value is used for DXF
group code 41. The Y scale factor value is used for DXF group code 42. The Z scale factor
value is used for DXF group code 43. Returns Acad::eOk if successful, or
Acad::eInvalidInput if the data passed in is not acceptable. eInvalidInput will also be
returned if any of the specified scale factors is 0.0. Returns eCannotScaleNonUniformly
when called on a block reference that refers to a block that cannot be scaled nonuniformly.
def treatAsAcDbBlockRefForExplode(self) -> bool:
This method is called by the AutoCAD EXPLODE command to determine how the entity should be
exploded. It is only called on entities of classes derived from AcDbBlockReference and not
on actual AcDbBlockReference objects. The default implementation is to return Adesk::kFalse
which will result in the entity's explode() method being used. If the entity's class
implemenation has overridden this method and has it return Adesk::kTrue, then the AutoCAD
EXPLODE command will treat the entity as though it is an actual AcDbBlockReference object
and will use AutoCAD's internal code (using deepClone() of the referenced
BlockTableRecord's contents) to do the explode operation.
class BlockScaling Class
kAny: ClassVar[Self]
kUniform: ClassVar[Self]
class BlockTable Class
def __init__(self, id: PyDb.ObjectId, mode: PyDb.OpenMode, erased: bool) -> None:
def __reduce__(self) -> Any:
def add(self, block: BlockTableRecord) -> ObjectId:
This function adds the record, pointed to by pRecord, to both the database containing the
table and the table itself. If the addition succeeds, recordId is set to the AcDbObjectId
of the pRecord once it has been added to the database. Possible return ErrorStatus codes
are: Acad::eOk, Acad::eOutOfMemory, Acad::eDuplicateRecordName, or Acad::eNoDatabase (if
the block table is not in a database).
def cast(otherObject: PyRx.RxObject) -> BlockTable:
def className() -> str:
def cloneFrom(otherObject: PyRx.RxObject) -> BlockTable:
def desc() -> PyRx.RxClass:
Returns a pointer to the AcRxClass object representing the specific class, or most recent
parent class explicitly registered with ObjectARX of either the pointer type used to invoke
it or the class qualifier used with it. (Remember that when a static member function is
invoked via a pointer, the pointer type, not the object type, determines which
implementation of the function is invoked.) When working with a pointer to an object and
the proper AcRxClass object for the class of the object pointed to is desired, the
AcRxObject::isA() function should be used, since it is a virtual non-static method and is
therefore not pointer type dependent. Caching the value of the pointer returned by this
method is acceptable, provided the application knows that the AcRxClass object pointed to
by the returned pointer was created by an ObjectARX application that will not be unloaded.
class BlockTableRecord Class
def __init__(self) -> None:
Objects of the AcDbBlockTableRecord class are used as containers for entities within
drawing file databases. AcDbBlocktableRecord objects (often referred to as BTRs) are owned
by the database's AcDbBlockTable object. The BTRs in turn own the entity objects they
contain. There are two special BTRs that are always present in every database. They are
*MODEL_SPACE and *PAPER_SPACE. They are the Model and Paper Spaces for the database. Any
entity that is created by AutoCAD while in Model Space is owned and contained by the
*MODEL_SPACE BTR. Entities created while in Paper Space go into the *PAPER_SPACE BTR. BTRs
other than *MODEL_SPACE and *PAPER_SPACE were known in previous versions of AutoCAD as
block definitions and are referenced by AcDbBlockReferences (which are often referred to as
inserts). The BTR contains a collection of entities that can be referenced by multiple
inserts to save space in the drawing, save time in drawing creation, and guarantee that all
inserts will appear the same (except possibly in color and linetype).
def __init__(self, id: PyDb.ObjectId) -> None:
Objects of the AcDbBlockTableRecord class are used as containers for entities within
drawing file databases. AcDbBlocktableRecord objects (often referred to as BTRs) are owned
by the database's AcDbBlockTable object. The BTRs in turn own the entity objects they
contain. There are two special BTRs that are always present in every database. They are
*MODEL_SPACE and *PAPER_SPACE. They are the Model and Paper Spaces for the database. Any
entity that is created by AutoCAD while in Model Space is owned and contained by the
*MODEL_SPACE BTR. Entities created while in Paper Space go into the *PAPER_SPACE BTR. BTRs
other than *MODEL_SPACE and *PAPER_SPACE were known in previous versions of AutoCAD as
block definitions and are referenced by AcDbBlockReferences (which are often referred to as
inserts). The BTR contains a collection of entities that can be referenced by multiple
inserts to save space in the drawing, save time in drawing creation, and guarantee that all
inserts will appear the same (except possibly in color and linetype).
def __init__(self, id: PyDb.ObjectId, mode: PyDb.OpenMode) -> None:
Objects of the AcDbBlockTableRecord class are used as containers for entities within
drawing file databases. AcDbBlocktableRecord objects (often referred to as BTRs) are owned
by the database's AcDbBlockTable object. The BTRs in turn own the entity objects they
contain. There are two special BTRs that are always present in every database. They are
*MODEL_SPACE and *PAPER_SPACE. They are the Model and Paper Spaces for the database. Any
entity that is created by AutoCAD while in Model Space is owned and contained by the
*MODEL_SPACE BTR. Entities created while in Paper Space go into the *PAPER_SPACE BTR. BTRs
other than *MODEL_SPACE and *PAPER_SPACE were known in previous versions of AutoCAD as
block definitions and are referenced by AcDbBlockReferences (which are often referred to as
inserts). The BTR contains a collection of entities that can be referenced by multiple
inserts to save space in the drawing, save time in drawing creation, and guarantee that all
inserts will appear the same (except possibly in color and linetype).
def __init__(self, id: PyDb.ObjectId, mode: PyDb.OpenMode, erased: bool) -> None:
Objects of the AcDbBlockTableRecord class are used as containers for entities within
drawing file databases. AcDbBlocktableRecord objects (often referred to as BTRs) are owned
by the database's AcDbBlockTable object. The BTRs in turn own the entity objects they
contain. There are two special BTRs that are always present in every database. They are
*MODEL_SPACE and *PAPER_SPACE. They are the Model and Paper Spaces for the database. Any
entity that is created by AutoCAD while in Model Space is owned and contained by the
*MODEL_SPACE BTR. Entities created while in Paper Space go into the *PAPER_SPACE BTR. BTRs
other than *MODEL_SPACE and *PAPER_SPACE were known in previous versions of AutoCAD as
block definitions and are referenced by AcDbBlockReferences (which are often referred to as
inserts). The BTR contains a collection of entities that can be referenced by multiple
inserts to save space in the drawing, save time in drawing creation, and guarantee that all
inserts will appear the same (except possibly in color and linetype).
def __init__(*args) -> None:
Objects of the AcDbBlockTableRecord class are used as containers for entities within
drawing file databases. AcDbBlocktableRecord objects (often referred to as BTRs) are owned
by the database's AcDbBlockTable object. The BTRs in turn own the entity objects they
contain. There are two special BTRs that are always present in every database. They are
*MODEL_SPACE and *PAPER_SPACE. They are the Model and Paper Spaces for the database. Any
entity that is created by AutoCAD while in Model Space is owned and contained by the
*MODEL_SPACE BTR. Entities created while in Paper Space go into the *PAPER_SPACE BTR. BTRs
other than *MODEL_SPACE and *PAPER_SPACE were known in previous versions of AutoCAD as
block definitions and are referenced by AcDbBlockReferences (which are often referred to as
inserts). The BTR contains a collection of entities that can be referenced by multiple
inserts to save space in the drawing, save time in drawing creation, and guarantee that all
inserts will appear the same (except possibly in color and linetype).
def __iter__(self) -> Iterator[PyDb.ObjectId]:
def __reduce__(self) -> Any:
def addAnnoScalestoBlkRefs(self, scale: bool) -> None:
Loops through and adds annotation data to each block reference that points to this block
table record. Also forces each block reference's user scale to one.
def appendAcDbEntities(self, entities: Collection[PyDb.Entity]) -> list[PyDb.ObjectId]:
This function adds pEntity to the database and the block table record. If the operation is
successful, then pOutputId is set to the AcDbObjectId of the newly added entity. If pEntity
points to an AcDbAttributDefinition entity, then the block table record's
hasAttributeDefinitions flag will be set to true. Returns Acad::eOk if successful. If
pEntity does not point to an object of a class derived from AcDbEntity (either directly or
indirectly), then Acad::eNotAnEntity will be returned.
def appendAcDbEntity(self, entity: PyDb.Entity) -> ObjectId:
This function adds pEntity to the database and the block table record. If the operation is
successful, then pOutputId is set to the AcDbObjectId of the newly added entity. If pEntity
points to an AcDbAttributDefinition entity, then the block table record's
hasAttributeDefinitions flag will be set to true. Returns Acad::eOk if successful. If
pEntity does not point to an object of a class derived from AcDbEntity (either directly or
indirectly), then Acad::eNotAnEntity will be returned.
def assumeOwnershipOf(self, entities: Collection[PyDb.Entity]) -> None:
This method causes the invoked block table record to assume the ownership of all the
entities listed in the input entitiesToMove array, and provides an optimized way of moving
entities between block table records. This action takes place only after all of the
following conditions are verified:The function is able to open all entities specified in
entitiesToMove and their isWriteEnabled() method returns true.All entities reside in the
same datbase as the target block table record.All the current owners of the entities can be
opened in a transction as kForWrite.The current entity owners are all instances of
AcDbBlockTableRecord.WarningCalling this function on an entity that is already open for
write will cause AutoCAD to terminate. If all these conditions are met, then the ownership
of all the entities is switched, the transaction for the prior owner block table records
(BTRs) is closed, the entities are marked as modifed, and the change is recorded in the
entities' undo filers. Viewports and vertex, attribute or other AutoCAD subentities, or
bracket entities are not supported. This is an all-or-nothing operation, that is, if one
entity cannot be moved, none of them will be moved. The possible return values are: Value
Meaning eOk Successful eNotAnEntity An object in entitiesToMove is not an entity
eIllegalEntityType The entity is not a type that meets the above restrictions
eMustFirstAddBlockToDb The invoked BTR is not database-resident yet eNotOpenForWrite One or
more input entities are not write enabled eWrongDatabase One or more input entities from a
database other than the BTR's database eNoDatabase One or more input entities are not in
the database at all eNotInBlock One or more input entities are not owned by a BTR Other
error status values that can be returned include everything that can be returned for a
failed append to a block table record. If the caller cancels out of any or all of the
entities after a successful completion of this call, then part of the immediate undo
playback will include restoring the old owner, and modifying that old owner again. If Undo
is invoked, then each object will independently restore itself, so that multiple processing
of the original and target BTRs will be avoided.
def blockInsertUnits(self) -> UnitsValue:
Returns the INSUNITS value saved with the block table record. If no INSUNITS value has been
saved with the block table record using a previous call to setBlockInsertUnits(), returns
kUnitsUndefined.
def blockScaling(self) -> BlockScaling:
Specifies whether block references associated with this block table record can be uniformly
or non-uniformly scaled. Returns kAny if the block can be non-uniformly scaled or kUniform
if it can only be uniformly scaled.
def cast(otherObject: PyRx.RxObject) -> BlockTableRecord:
def className() -> str:
def clearPreviewIcon(self) -> None:
def cloneFrom(otherObject: PyRx.RxObject) -> BlockTableRecord:
def comments(self) -> str:
This function sets sComments to the description text associated with the BlockTableRecord.
Returns Acad::eOk if successful. If there is not sufficient memory for the copy, then
Acad::eOutOfMemory is returned. The sComments string is used for DXF group code 4.
def desc() -> PyRx.RxClass:
Returns a pointer to the AcRxClass object representing the specific class, or most recent
parent class explicitly registered with ObjectARX of either the pointer type used to invoke
it or the class qualifier used with it. (Remember that when a static member function is
invoked via a pointer, the pointer type, not the object type, determines which
implementation of the function is invoked.) When working with a pointer to an object and
the proper AcRxClass object for the class of the object pointed to is desired, the
AcRxObject::isA() function should be used, since it is a virtual non-static method and is
therefore not pointer type dependent. Caching the value of the pointer returned by this
method is acceptable, provided the application knows that the AcRxClass object pointed to
by the returned pointer was created by an ObjectARX application that will not be unloaded.
def effectiveName(self) -> str:
def explodable(self) -> bool:
Specifies whether block references associated with this block table record can be exploded.
Returns true if the block can be exploded or false if it cannot.
def getBlockReferenceIds(self, directOnly: bool, bForceValidity: bool) -> list[PyDb.ObjectId]:
This function returns a list of AcDbBlockReferences that either directly or indirectly,
through block nesting, reference this block. It only returns those block references that
are currently active. Use getErasedBlockReferenceIds() to get a list of erased references.
Callers need to decide what the most efficient setting will be for bForceValidity. For
example, if the caller wants the set of IDs in order to queue the BlockReferences for regen
in order to avoid calling REGENALL, then it would probably be less costly to set
bForceValidity to false, and do the REGENALL if the function returns
Acad::eSomeInputDataLeftUnread. A full regen would be faster, and better memory management,
than forcing the entire file into memory. However, if the function is being called for
block cycle detection, then bForceValidity must be true in order to guarantee that all
block references (potential cycles) have been found. Returns Acad::eOk if successful. If
bForceValidity is false, it will return Acad::eSomeInputDataLeftUnread if it encounters an
older drawing that does not have the reference information in its blocks.
def getBlockReferences(self, mode: PyDb.OpenMode) -> list[PyDb.BlockReference]:
def getErasedBlockReferenceIds(self) -> list[PyDb.ObjectId]:
This function returns a list of AcDbBlockReferences that directly reference this block. It
only returns those block references that have been erased. Returns Acad::eOk if successful.
def getLayoutId(self) -> ObjectId:
This function gets the forward pointer from the block table record to the corresponding
AcDbLayout object in the Layouts dictionary.
def getPreviewIcon(self) -> object:
Retrieves the preview icon data from the block table record. If the block table record does
not have a preview icon, the length of the previewIcon array will be 0. Returns Acad::eOk.
def getSortentsTable(self, mode: PyDb.OpenMode, createIfNecessary: bool) -> SortentsTable:
Returns the sortents table opened as requested, sparing the caller the work of getting the
extension dictionary and looking the sortents dictionary up in it. If the dictionary is
successfully opened and returned, it is the caller's responsibility to close it.
ErrorStatus returns errors if the sortents dictionary cannot be opened; if the sortents
dictionary doesn't exist and createIfNecessary is false; if createIfNecessary is true, but
the block table record is not open for write; or if its extension dictionary could not be
created or opened.
def hasAttributeDefinitions(self) -> bool:
Returns true if the block table record contains attribute definitions. The
hasAttributeDefinitions() value is used for the second bit in DXF group code 70 (the bit is
set if hasAttributeDefinitions() returns Adesk::kTrue).
def hasPreviewIcon(self) -> bool:
Returns true if the block table record has a preview icon. Otherwise, it returns false.
def isAnonymous(self) -> bool:
Returns true if the block table record is anonymous. The isAnonymous() value is used for
the first bit in DXF group code 70 (the bit is set if isAnonymous() returns Adesk::kTrue).
def isDynamicBlock(self) -> bool:
def isFromExternalReference(self) -> bool:
Returns true if the block table record is describing an xref drawing. The
isFromExternalReference() value is used for the third bit in DXF group code 70 (the bit is
set if isFromExternalReference() returns Adesk::kTrue).
def isFromOverlayReference(self) -> bool:
Returns true if this block table record is an overlaid xref. Otherwise, if
isFromExternalReference() returns Adesk::kTrue, the block table record is an attached xref.
The isFromOverlayReference value is used for the fourth bit in DXF group code 70 (the bit
is set if isFromOverlayReference() returns Adesk::kTrue).
def isLayout(self) -> bool:
Returns true if this block table record represents a layout. This will be true for
*MODEL_SPACE, *PAPER_SPACE, and any additonal layouts of the type *PAPER_SPACExxx where xxx
is a varying integer. Returns false for any other type of block.
def isUnloaded(self) -> bool:
Returns true if this block table record is an xref that is currently unloaded; otherwise,
it returns false. The isUnloaded() value is used for the DXF group code 71 (the bit is set
if isUnloaded() returns Adesk::kTrue).
def objectIdArray(self, desc: PyRx.RxClass) -> ObjectIdArray:
def objectIdArray(self, descList: list[PyRx.RxClass]) -> ObjectIdArray:
def objectIdArray(*args) -> ObjectIdArray:
def objectIds(self, desc: PyRx.RxClass) -> list[PyDb.ObjectId]:
def objectIds(self, descList: list[PyRx.RxClass]) -> list[PyDb.ObjectId]:
def objectIds(*args) -> list[PyDb.ObjectId]:
def openBlockBegin(self, val: PyDb.BlockBegin, mode: PyDb.OpenMode) -> None:
Returns a pointer to the block begin opened in openMode via pBlockBegin. The
AcDbBlockTableRecordIterator does not return the block begin or the block end.
def openBlockEnd(self, val: PyDb.BlockEnd, mode: PyDb.OpenMode) -> None:
Returns a pointer to the block end opened in openMode via pBlockEnd. The
AcDbBlockTableRecordIterator does not return the block begin or the block end.
def origin(self) -> PyGe.Point3d:
Returns the base point of the block in WCS coordinates. This point is the origin of the MCS
(which is the local WCS for the entities within the block table record).
def pathName(self) -> str:
If this block table record is an xref, then this function sets pPath to the path and file
name string of the xref drawing. If this block table record is not an xref, then pPath will
be set to NULL (unless some ObjectARX application has mistakenly set the path name in the
block table record). Returns Acad::eOk if successful. The sPath value is used for DXF group
code 1.
def postProcessAnnotativeBTR(self, bqueryOnly: bool, bScale: bool) -> int:
This function post-processes a block after it is defined or redefined to be annotative. Any
annotative entities in the block definition are stripped of their annotative property and
any nested annotative blocks are exploded into non-annotative entities.
def setBlockInsertUnits(self, val: PyDb.UnitsValue) -> None:
Allows applications to save an INSUNITS value on a block table record. Returns Acad::eOk if
successful.
def setBlockScaling(self, val: PyDb.BlockScaling) -> None:
Sets whether block references associated with this block table record can be uniformly or
nonuniformly scaled. Returns Acad::eOk if successful.
def setComments(self, val: str) -> None:
This function makes a copy of the string pointed to by pString and then sets the
BlockTableRecord to use the copy as its description text. Returns Acad::eOk if successful.
If there is not sufficient memory for the copy, then Acad::eOutOfMemory is returned. The
description string is used for DXF group code 4.
def setExplodable(self, val: bool) -> None:
Sets whether block references associated with this block table record can be exploded.
Returns Acad::eOk if successful.
def setIsFromOverlayReference(self, val: bool) -> None:
This function will set this AcDbBlockTableRecord to be an overlay if bIsOverlay is true;
otherwise, it will set it to be in insert type xref. This just sets the BlockTableRecord's
overlay flag. This function will only work on a AcDbBlockTableRecord that is an xref, and
that is NOT a nested xref. In order to accurately determine if this BlockTableRecord
represents a nested xref, this BlockTableRecord must have been closed since the last
BlockReference that references it was created. This is necessary so that the
BlockTableRecord's list of referencing BlockReferences is up to date.
def setIsUnloaded(self, val: bool) -> None:
This function marks the xref block table record as unloaded, but does not perform the
actual unload process. This function can only be used on block table records in the
database currently loaded in the AutoCAD editor. Returns Acad::eOk if successful. Returns
Acad::eNotCurrentDatabase if the block table record on which this method is called is not
in the database currently loaded in the AutoCAD editor. The isUnloaded value is used for
the first bit DXF group code 71 (the bit is set if isUnloaded() returns Adesk::kTrue).
def setLayoutId(self, val: PyDb.ObjectId) -> None:
This function sets the forward pointer from the block table record to the corresponding
AcDbLayout object in the Layouts dictionary.
def setOrigin(self, val: PyGe.Point3d) -> None:
Sets pt to be the insertion point of the block table record in WCS coordinates. This point
is the origin of the MCS (which is the local WCS for the entities within the block table
record).
def setPathName(self, val: str) -> None:
Sets the block table record to use a copy of pathStr as path and name of the xref drawing.
If this block table record is not an xref, then this string will be copied into the block
table record, but will not be used. If pathStr==NULL, then the block table record's
internal pointer will be set to NULL. The pathName value is used for DXF group code 1.
Returns Acad::eOk if successful, or Acad::eInvalidInput if the data passed in is not
acceptable.
def xrefDatabase(self, val: bool) -> Database:
This function returns a pointer to the AcDbDatabase that defines this block table record's
contents. If incUnres is true, then a pointer will be returned, even if the xref block
table record is currently unresolved (for reasons other than that the xref drawing file
could not be found). Returns NULL if the block table record is not part of an xref, or if
the crossreferenced drawing file was not found when the drawing was loaded.
def xrefStatus(self) -> XrefStatus:
This function returns an AcDb::XrefStatus enumerated type value indicating the xref status
of the block table record on which this method is called.
class Body Class
def __init__(self) -> None:
The AcDbBody class is used to represent nonmanifold solids and other ShapeManager entities
that do not fit the characteristics of the AcDb3dSolid or AcDbRegion classes.
def __init__(self, id: PyDb.ObjectId) -> None:
The AcDbBody class is used to represent nonmanifold solids and other ShapeManager entities
that do not fit the characteristics of the AcDb3dSolid or AcDbRegion classes.
def __init__(self, id: PyDb.ObjectId, mode: PyDb.OpenMode) -> None:
The AcDbBody class is used to represent nonmanifold solids and other ShapeManager entities
that do not fit the characteristics of the AcDb3dSolid or AcDbRegion classes.
def __init__(*args) -> None:
The AcDbBody class is used to represent nonmanifold solids and other ShapeManager entities
that do not fit the characteristics of the AcDb3dSolid or AcDbRegion classes.
def __reduce__(self) -> Any:
def cast(otherObject: PyRx.RxObject) -> Body:
def className() -> str:
def cloneFrom(otherObject: PyRx.RxObject) -> Body:
def desc() -> PyRx.RxClass:
Returns a pointer to the AcRxClass object representing the specific class, or most recent
parent class explicitly registered with ObjectARX of either the pointer type used to invoke
it or the class qualifier used with it. (Remember that when a static member function is
invoked via a pointer, the pointer type, not the object type, determines which
implementation of the function is invoked.) When working with a pointer to an object and
the proper AcRxClass object for the class of the object pointed to is desired, the
AcRxObject::isA() function should be used, since it is a virtual non-static method and is
therefore not pointer type dependent. Caching the value of the pointer returned by this
method is acceptable, provided the application knows that the AcRxClass object pointed to
by the returned pointer was created by an ObjectARX application that will not be unloaded.
class BoolOperType Class
kBoolUnite: ClassVar[Self]
kBoolIntersect: ClassVar[Self]
kBoolSubtract: ClassVar[Self]
class Cell Class
def __getitem__(self, idx: int) -> int:
def __init__(self, row: int, column: int) -> None:
def __ne__(self) -> bool:
def __reduce__(self) -> Any:
def __setitem__(self, idx: int, val: int) -> None:
def column(self) -> int:
def row(self) -> int:
class CellAlignment Class
kTopLeft: ClassVar[Self]
kTopCenter: ClassVar[Self]
kTopRight: ClassVar[Self]
kMiddleLeft: ClassVar[Self]
kMiddleCenter: ClassVar[Self]
kMiddleRight: ClassVar[Self]
kBottomLeft: ClassVar[Self]
kBottomCenter: ClassVar[Self]
kBottomRight: ClassVar[Self]
class CellContentLayout Class
kCellStateNone: ClassVar[Self]
kCellContentLayoutStackedHorizontal: ClassVar[Self]
kCellContentLayoutStackedVertical: ClassVar[Self]
class CellContentType Class
kCellContentTypeUnknown: ClassVar[Self]
kCellContentTypeValue: ClassVar[Self]
kCellContentTypeField: ClassVar[Self]
kCellContentTypeBlock: ClassVar[Self]
class CellEdgeMask Class
kTopMask: ClassVar[Self]
kRightMask: ClassVar[Self]
kBottomMask: ClassVar[Self]
kLeftMask: ClassVar[Self]
class CellMargin Class
kCellMarginTop: ClassVar[Self]
kCellMarginLeft: ClassVar[Self]
kCellMarginBottom: ClassVar[Self]
kCellMarginRight: ClassVar[Self]
kCellMarginHorzSpacing: ClassVar[Self]
kCellMarginVertSpacing: ClassVar[Self]
class CellOption Class
kNoMap: ClassVar[Self]
kAerial: ClassVar[Self]
class CellProperty Class
kCellPropInvalid: ClassVar[Self]
kCellPropDataType: ClassVar[Self]
kCellPropDataFormat: ClassVar[Self]
kCellPropRotation: ClassVar[Self]
kCellPropScale: ClassVar[Self]
kCellPropAlignment: ClassVar[Self]
kCellPropContentColor: ClassVar[Self]
kCellPropTextStyle: ClassVar[Self]
kCellPropTextHeight: ClassVar[Self]
kCellPropAutoScale: ClassVar[Self]
kCellPropBackgroundColor: ClassVar[Self]
kCellPropMarginLeft: ClassVar[Self]
kCellPropMarginTop: ClassVar[Self]
kCellPropMarginRight: ClassVar[Self]
kCellPropMarginBottom: ClassVar[Self]
kCellPropMarginHorzSpacing: ClassVar[Self]
kCellPropMarginVertSpacing: ClassVar[Self]
kCellPropContentLayout: ClassVar[Self]
kCellPropMergeAll: ClassVar[Self]
kCellPropFlowDirBtoT: ClassVar[Self]
kCellPropDataTypeAndFormat: ClassVar[Self]
kCellPropContent: ClassVar[Self]
kCellPropBitProperties: ClassVar[Self]
kCellPropAll: ClassVar[Self]
class CellRange Class
def __getitem__(self, idx: int) -> int:
def __init__(self, topRow: int, leftColumn: int, bottomRow: int, rightColumn: int) -> None:
def __ne__(self) -> bool:
def __reduce__(self) -> Any:
def __setitem__(self, idx: int, val: int) -> None:
def bottomRow(self) -> int:
def leftColumn(self) -> int:
def rightColumn(self) -> int:
def topRow(self) -> int:
class CellState Class
kCellStateNone: ClassVar[Self]
kCellStateContentLocked: ClassVar[Self]
kCellStateContentReadOnly: ClassVar[Self]
kCellStateLinked: ClassVar[Self]
kCellStateContentModifiedAfterUpdate: ClassVar[Self]
kCellStateFormatLocked: ClassVar[Self]
kCellStateFormatReadOnly: ClassVar[Self]
kCellStateFormatModifiedAfterUpdate: ClassVar[Self]
kAllCellStates: ClassVar[Self]
class CellType Class
kUnknownCell: ClassVar[Self]
kTextCell: ClassVar[Self]
kBlockCell: ClassVar[Self]
kMultipleContentCell: ClassVar[Self]
class CenterMarkType Class
kMark: ClassVar[Self]
kLine: ClassVar[Self]
kNone: ClassVar[Self]
class Circle Class
def __init__(self) -> None:
The AcDbCircle class represents the circle entity within AutoCAD.
def __init__(self, center: PyGe.Point3d, normal: PyGe.Vector3d, radius: float) -> None:
The AcDbCircle class represents the circle entity within AutoCAD.
def __init__(self, id: PyDb.ObjectId) -> None:
The AcDbCircle class represents the circle entity within AutoCAD.
def __init__(self, id: PyDb.ObjectId, mode: PyDb.OpenMode) -> None:
The AcDbCircle class represents the circle entity within AutoCAD.
def __init__(self, id: PyDb.ObjectId, mode: PyDb.OpenMode, erased: bool) -> None:
The AcDbCircle class represents the circle entity within AutoCAD.
def __init__(*args) -> None:
The AcDbCircle class represents the circle entity within AutoCAD.
def __reduce__(self) -> Any:
def cast(otherObject: PyRx.RxObject) -> Circle:
def center(self) -> PyGe.Point3d:
Returns the center point of the circle in WCS coordinates. The center point value is the
WCS equivalent of DXF group code 10.
def circumference(self) -> float:
Returns the circumference of the circle.
def className() -> str:
def cloneFrom(otherObject: PyRx.RxObject) -> Circle:
def desc() -> PyRx.RxClass:
Returns a pointer to the AcRxClass object representing the specific class, or most recent
parent class explicitly registered with ObjectARX of either the pointer type used to invoke
it or the class qualifier used with it. (Remember that when a static member function is
invoked via a pointer, the pointer type, not the object type, determines which
implementation of the function is invoked.) When working with a pointer to an object and
the proper AcRxClass object for the class of the object pointed to is desired, the
AcRxObject::isA() function should be used, since it is a virtual non-static method and is
therefore not pointer type dependent. Caching the value of the pointer returned by this
method is acceptable, provided the application knows that the AcRxClass object pointed to
by the returned pointer was created by an ObjectARX application that will not be unloaded.
def diameter(self) -> float:
Returns the diameter of the circle.
def getAcGeCurve(self, tol: PyGe.Tol) -> PyGe.CircArc3d:
This is getAcGeCurve, a member of class AcDbCurve.
def normal(self) -> PyGe.Vector3d:
Returns the WCS unit normal to the plane containing the circle.
def radius(self) -> float:
Returns the radius of the circle. The radius value is used for DXF group code 40.
def setCenter(self, val: PyGe.Point3d) -> None:
Sets the center of the circle to the point center, which must be in WCS coordinates. The
center point value is the WCS equivalent of DXF group code 10. Returns Acad::eOk if
successful, or Acad::eInvalidInput if the data passed in is not acceptable.
def setCircumference(self, val: float) -> None:
Sets the circumference of the circle to the value of circ.
def setDiameter(self, val: float) -> None:
Sets the diameter of the circle to the value of dia.
def setNormal(self, val: PyGe.Vector3d) -> None:
Sets normal to be the normal of the plane containing the circle. normal must be in WCS
coordinates and must be nonzero length. The normal value is used for DXF group code 210.
Returns Acad::eOk if successful, or Acad::eInvalidInput if the data passed in is not
acceptable.
def setRadius(self, val: float) -> None:
Sets radius to be the radius of the circle. radius must be greater than zero. The radius
value is used for DXF group code 40. Returns Acad::eOk if successful, or
Acad::eInvalidInput if the data passed in is not acceptable.
def setThickness(self, val: float) -> None:
Sets the thickness of the circle to thickness. The thickness is the circle's dimension
along its normal vector direction (sometimes called the extrusion direction). The thickness
value is used for DXF group code 39. Returns Acad::eOk if successful, or
Acad::eInvalidInput if the data passed in is not acceptable.
def thickness(self) -> float:
Returns the thickness of the circle. The thickness is the circle's dimension along its
normal vector direction (sometimes called the extrusion direction). The thickness value is
used for DXF group code 39.
class ClipBoundaryType Class
kInvalid: ClassVar[Self]
kRect: ClassVar[Self]
kPoly: ClassVar[Self]
class CollisionType Class
kCollisionTypeNone: ClassVar[Self]
kCollisionTypeSolid: ClassVar[Self]
class Color Class
def __init__(self) -> None:
This class is used to represent colors in AutoCAD, either as RGB, AutoCAD color index, or
as a wrapper around a more abstract color definition as defined in AcCmComplexColor. Most
color clients should use this existing class. Other clients (such as AcDbEntity and
AcGiSubEntityTraits) will use AcCmEntityColor directly to save memory.
def __ne__(self) -> bool:
def __reduce__(self) -> Any:
def blue(self) -> int:
def colorIndex(self) -> int:
def entityColor(self) -> EntityColor:
def green(self) -> int:
def isByACI(self) -> bool:
def isByBlock(self) -> bool:
def isByColor(self) -> bool:
def isByLayer(self) -> bool:
def isByPen(self) -> bool:
def isForeground(self) -> bool:
def isNone(self) -> bool:
def penIndex(self) -> int:
def red(self) -> int:
def setColorIndex(self, val: int) -> ErrorStatus:
def setPenIndex(self, val: int) -> ErrorStatus:
def setRGB(self, red: int, green: int, blue: int) -> ErrorStatus:
class ColorMethod Class
kByLayer: ClassVar[Self]
kByBlock: ClassVar[Self]
kByColor: ClassVar[Self]
kByACI: ClassVar[Self]
kByPen: ClassVar[Self]
kForeground: ClassVar[Self]
kLayerOff: ClassVar[Self]
kLayerFrozen: ClassVar[Self]
kNone: ClassVar[Self]
class Core Class
def __init__(self) -> None:
def __reduce__(self) -> Any:
def activeDatabaseArray() -> list[PyDb.PyDbDatabase]:
Get the array of currently active databases.
def angToF(value: str, unit: int) -> float:
Converts a string representation of an angle to a double-precision floating-point value.
The unit value should correspond to a valid value for the AutoCAD system variable AUNITS,
as shown in following table: Mode value String format 0 Degrees 1 Degrees/minutes/seconds 2
Grads 3 Radians 4 Surveyor's units The string str must be a string that acdbAngToF() can
parse correctly according to the mode specified by unit. It can be in the 'canonical' form
that acdbAngToS() returns, or in a form that AutoCAD allows for keyboard entry. The
acdbAngToF() and acdbAngToS() functions are complementary; if you pass acdbAngToF() a
string created by acdbAngToS(), then acdbAngToF() is guaranteed to return a valid value in
v, and the converse also applies provided that the unit argument specifies the same mode in
both calls. On success returns RTNORM, otherwise returns an error code.
def angToS(value: float, unit: int, prec: int) -> str:
Deprecated. Formats an angle into a string. The value to format should correspond to values
allowed for the AutoCAD system variable AUNITS, which are described in acdbAngToF(). The
current value of the AutoCAD dimensioning variable DIMZIN controls how acdbAngToS() writes
leading or trailing zeros to str. See the AutoCAD User's Guide for possible values of
DIMZIN. On success returns RTNORM, otherwise returns an error code.
def assignGelibCurveToAcDbCurve(geCurve: PyGe.Curve3d, dbCurve: PyDb.Curve, norm: PyGe.Vector3d, tol: PyGe.Tol) -> None:
This function takes an AcGeCurve3d and sets the specified AcDbCurve to be geometrically
identical to the AcGeCurve3d.
def attachPointCloudExEntity(path: str, pos: PyGe.Point3d, scale: float, rotation: float, db: PyDb.Database) -> ObjectId:
Create an AcDbPointCloudEx entity.
def attachXref(db: PyDb.Database, fname: str, blkname: str) -> ObjectId:
Attaches the xref file specified by pFilename to the database specified by pDb, thus
creating a new xref AcDbBlockTableRecord. The new block table record's name is specified in
pBlockName. Its object ID is returned in xrefBlkId. This function does not lock the
document, nor does it create an AcDbBlockReference instance of the new block table record.
Xref log file processing is available if that option is enabled. Normal AutoCAD behavior
with regard to output indicators, such as progress meters and messages, may be unavailable
if scripts are enabled and cmdecho is 0, if menu macros are enabled and menuecho is set to
0, or if menu encryption is set. This function is available to non-AutoCAD-based host
applications. Returns Acad::eOk if the operation is successful. Returns Acad::eInvalidInput
if either pDb or pFilename is null.
def bindXrefs(db: PyDb.Database, ids: list[PyDb.ObjectId], bInsertBind: bool, bAllowUnresolved: bool, bequite: bool) -> None:
This function binds the xrefs whose AcDbBlockTableRecord object IDs are in xrefBlkIds. If
bInsertBind is true, then the symbolTable record names will be changed from the xref naming
convention to normal insert block names. The object IDs in xrefBlkIds must all be from
pHostDb and they must all be resolved unless bAllowUnresolved is true. If bAllowUnresolved
is true, then unresolved xrefs involved in the bind operation will have their
BlockTableRecord set to a normal BlockTableRecord and a text entity containing the
path/filename of the xref will be added to the BlockTableRecord. If pHostDb is NULL, then
the database specified by AcDbHostApplicationServices::workingDatabase() will be assumed to
be the host database. If bQuiet is false, then status and error messages will be sent to
AcDbHostApplicationServices::DisplayString(). Returns Acad::eOk if the operation is
successful.
def canonicalToSystemRange(units: int, val: str) -> str:
This function converts the canonical value represented by strIn to a value within the
system range. It returns the converted value, expressed as a string in the units specified
by eUnits, in strOut. See AcDbDynBlockReferenceProperty::UnitsType for possible values of
eUnits. Returns true if successful, or if strIn is an empty string.
def clearSetupForLayouts(ctxhandle: int) -> None:
This function resets the layout manager to work with the document/database identified by
contextHandle. Returns Acad::eOk if successful.
def convertAcDbCurveToGelibCurve(geCurve: PyGe.Curve2d, tol: PyGe.Tol) -> PyGe.Curve3d:
This function takes an AcDbCurve and returns an AcGeCurve3d that is geometrically identical
to the AcDbCurve.
def convertGelibCurveToAcDbCurve(geCurve: PyGe.Curve3d, norm: PyGe.Vector3d, tol: PyGe.Tol) -> Curve:
This function takes an AcGeCurve3d and returns an AcDbCurve that is geometrically identical
to the AcGeCurve3d.
def createViewByViewport(db: PyDb.Database, vpid: PyDb.ObjectId, name: str, cat: str, labelblock: PyDb.ObjectId) -> ObjectId:
This function creates a view from the given viewport. It is a view of the viewport in its
layout. The size of the view is stretched to include any associated label block as well as
some desirable padding around the sum of the viewport and label block extents. Returns
Acad::eOk on success. Returns Acad::eNullObjectId if an error occurred while retrieving the
layout of the viewport. Returns other error codes if the viewport, the block containing the
viewport, or the label block could not be opened.
def detachXref(db: PyDb.Database, xrefid: PyDb.ObjectId) -> None:
This function detaches the xref in pDb whose AcDbBlockTableRecord is specified by
xrefBlkId. Returns Acad::eOk if successful.
def dictAdd(dictname: PyDb.ObjectId, symname: str, newid: PyDb.ObjectId) -> bool:
Adds a non-graphical object to the specified dictionary.
def dictNext(dictname: PyDb.ObjectId, rewind: int) -> list:
Advances the program pointer to the next entry in the specified dictionary and returns a
pointer to the entry as a linked list of result buffers with DXF group codes and values.
This function is similar to acdbTblSearch(). A dictionary is a container object that is
functionally similar to symbol tables. An optional DXF sequence stores the current object's
dictionary handle so that arbitrary drawing database objects can be attached to any object
in a drawing. Warning Only one global iterator is maintained for this function. If the
program passes a new dictionary name to acdbDictNext() after traversal of the dictionary
has begun, the original program pointer location is lost. To obtain the master entity name,
call acdbNamedObjDict(). When acdbDictNext() is called repeatedly, it normally returns the
next entry in the specified table each time. If there are no more entries in the
dictionary, acdbDictNext() returns NULL. It never returns deleted dictionary entries. The
behavior of this function can also be affected by the setnext argument in a successful call
to acdbDictSearch(). When you begin scanning a table, supply a nonzero rewind argument to
rewind the table and find its first entry. When acdbDictNext() fails, it sets the system
variable ERRNO to a value that indicates the reason for the failure.
def dictRemove(id: PyDb.ObjectId, name: str) -> bool:
Removes the specified dictionary entry from the specified dictionary . If acdbDictRemove()
succeeds, it returns RTNORM. If dictname is invalid or symname is not found, it returns
RTERROR and sets the system variable ERRNO to a value that indicates the reason for the
failure.
def dictRename(id: PyDb.ObjectId, name: str, newname: str) -> bool:
Renames a dictionary entry's key name. If acdbDictRename() succeeds, it returns RTNORM. If
the old name is not present in the dictionary, the dictname is invalid, the new name is
invalid, or the new name is already present in the dictionary, it returns RTERROR and sets
the system variable ERRNO to a value that indicates the reason for the failure.
def dictSearch(id: PyDb.ObjectId, name: str, next: int) -> list:
Scans the specified dictionary for an entry and returns it as a result-buffer list. This
function is similar to acdbTblSearch(). To obtain the entity name of symbol table entry,
call acdbTblObjName(). To obtain the master entity name, call acdbNamedObjDict(). Returned
DXF Codes If acdbDictSearch() finds the entry, it returns it as a linked list of result
buffers with DXF group codes and values. If it does not find the entry, it returns NULL. It
cannot find dictionary entries that have been deleted. See information on DXF group codes
in the AutoCAD Customization Guide for the identification format for dictionary entries
returned by these functions. When acdbDictSearch() fails, it sets the system variable ERRNO
to a value that indicates the reason for the failure.
def disToF(val: str, unit: int) -> float:
Converts a string that displays a real (double-precision floating-point) value expressed in
the specified display format into a real value. The unit value should correspond to values
allowed for the AutoCAD system variable LUNITS, as shown in the following table. Linear
units values: 1 Scientific 2 Decimal 3 Engineering (feet and decimal inches) 4
Architectural (feet and fractional inches) 5 Fractional The string str must be a string
that acdbDisToF() can parse correctly according to the mode specified by unit. It can be in
the canonical form that acdbRToS() returns, or in a form that AutoCAD allows for keyboard
entry. The acdbDisToF() and acdbRToS() functions are complementary. If you pass
acdbDisToF() a string created by acdbRToS(), acdbDisToF() is guaranteed to return a valid
value in v. The converse also applies, provided that the unit argument specifies the same
mode in both calls; see the following note).
def displayPreviewFromDwg(name: str, handle: int) -> bool:
This function obtains the preview image (if any) of the drawing specified by pszDwgfilename
and displays it in the window identified by the HWND argument pPreviewWnd. The image size
varies up to a maximum size no larger than 256 x 188 pixels. If the pPreviewWnd window is
larger than the image, then the image will be stretched to fit. But, if the window is
smaller than the image, the image will not be adjusted and will spill out beyond the
window's borders. If it is non-null, pBgColor must be a long that represents an RGB color.
The format for the long is the format used by the Windows SDK COLORREF type. Returns true
if successful; otherwise, it returns false.
def doSetupForLayouts(db: PyDb.Database) -> int:
This function sets the layout manager to work on the database pointed to by pDatabase, even
if this database is not loaded in the AutoCAD editor. When you are done, you must use
acdbClearSetupForLayouts(), passing it the contextHandle returned by this function. This
action resets the layout manager to work with the document/database it was using before the
call to acdbDoSetupForLayouts(). acdbDoSetupForLayouts() calls cannot be nested.
acdbClearSetupForLayouts() must be called before another call to acdbDoSetupForLayouts()
can be made. Returns Acad::eOk if successful. Returns Acad::eInvalidInput if pDatabase is
null.
def dxfOutAs2000(db: PyDb.Database, name: str, precision: int) -> None:
This functions saves the AcDbDatabase object pointed to by pDb to a DXF file whose name is
fileName. The file is saved in AutoCAD 2000 format using the precision specified by
precision.
def dxfOutAs2004(db: PyDb.Database, name: str, precision: int) -> None:
This functions saves the AcDbDatabase object pointed to by pDb to a DXF file whose name is
fileName. The file is saved in AutoCAD 2004 format using the precision specified by
precision.
def dxfOutAsR12(db: PyDb.Database, name: str, precision: int) -> None:
This function writes out a drawing database in the DXF file format corresponding to AutoCAD
Release 12.
def ecs2Wcs(p: PyGe.Point3d | PyGe.Vector3d, normal: PyGe.Vector3d, qout: PyGe.Point3d | PyGe.Vector3d) -> bool:
This function translates the point p from the OCS (formerly ECS) coordinates of the
coordinate system determined by norm into WCS coordinates. q is filled in with the
translated value. If vec is Adesk::kTrue, then p is treated as a vector for translation
rather than a point. Returns Adesk::kTrue if successful; otherwise, returns Adesk::kFalse.
def entDel(id: PyDb.ObjectId) -> bool:
Deletes the specified entity if it is currently in the drawing and undeletes it (restores
it to the drawing) if it was deleted during the current editing session.
def entGet(id: PyDb.ObjectId) -> list:
Retrieves the specified entity from the drawing database and returns its definition data as
a linked list of result buffers. This function is used also to examine dictionaries. The
restype field of each item in the list is assigned an AutoCAD DXF group code. The first
item will have a restype of -1, indicating that it contains the entity name in
resval.rlname. As with DXF, acdbEntGet() returns entity header items (the color, linetype,
thickness, attributes-follow flag, and entity handle) only if their value differs from the
default. Unlike DXF, acdbEntGet() returns the optional entity definition fields, whether or
not they are equal to their defaults. This simplifies the processing; an application can
assume that these fields are present. Also unlike DXF, acdbEntGet() returns associated X,
Y, and Z coordinates as a single point value (resval.rpoint), not as separate X (10), Y
(20), and Z (30) groups. The restype value will be the group number of the X coordinate (in
the range 10-19). If it cannot find ent in the current database, acdbEntGet() returns NULL.
When acdbEntGet() fails, it sets the system variable ERRNO to a value that indicates the
reason for the failure. Before performing an acdbEntGet() on vertex entities, you should
read or write the polyline entity's header. If the most recently processed polyline entity
is different from the one to which the vertex belongs, width information (the 40 and 41
groups) can be lost. To access the object state of a symbol table or symbol table entry,
pass the entity name to acdbEntGet().
def entGetX(id: PyDb.ObjectId, xdata: list) -> list:
Retrieves the entity specified by ent from the drawing database including extended entity
data that is registered to the application, and returns its definition data as a linked
list of result buffers. If args is a null pointer, acdbEntGetX() is equivalent to
acdbEntGet() and returns only the regular definition data in exactly the same fashion. If
the args list is not null, acdbEntGetX() returns the extended entity data for each valid
application name in the list. (This saves the application from having to look at or manage
the space of extended entity data belonging to other applications.) To be valid, an
application name must have been placed in the current drawing's APPID symbol table by a
prior call to acdbRegApp(). Names in the args list can be wild-card patterns. The rules for
patterns in the apps list are the same as those used by acutWcMatch(). In this case,
acdbEntGetX() returns the extended entity data of each application whose name matches the
pattern. WarningIf a pattern contains only '*', acdbEntGetX() returns all the extended data
belonging to the specified entity, whether or not it belongs to the current application. If
it cannot find ent in the current database, acdbEntGetX() returns null. When acdbEntGetX()
fails, it sets the system variable ERRNO to a value that indicates the reason for the
failure.
def entLast() -> ObjectId:
Gets the name of the last (nondeleted) main entity in the drawing database. The last entity
is selected even if it is not on screen or is on a frozen layer, but a nongraphical object
cannot be selected. The last entity is the most recently created entity, so acdbEntLast()
can be used to obtain the name of an entity that has just been added by a call to
acedCommand(), acedCmd(), or acdbEntMake() (a complex entity does not appear in the
database until it is complete). If acdbEntLast() succeeds, it returns RTNORM; otherwise, it
returns RTERROR. When acdbEntLast() fails, it sets the system variable ERRNO to a value
that indicates the reason for the failure.
def entMake(resultBuffer: Collection[tuple[int, Any]]) -> bool:
Makes a new entity, which can be an empty dictionary, by appending the entity specified by
ent to the drawing database. The ent argument is a linked list of result buffers that
should have the same format as a list returned by acdbEntGet(). With this function, an
ObjectARX application expands the entity list by creating new entities and adding them to
the drawing. The list that ent specifies has the following restrictions: Cannot specify the
entity's handle (DXF groups 5 and 105). Ignores fields associated with the object extension
dictionary.The first or second buffer in the list must specify the entity type, which must
be a valid DXF entity type.If the first buffer does not specify the type, it can specify
only the entity name (restype == -1) as it would be returned by acdbEntGet(). AutoCAD must
recognize all objects (except layers) to which the entity list refers.The name of any text
style, linetype, shape, or block that appears in the entity list must be defined in the
current drawing before the entity list is passed to acdbEntMake(). As an
exception,acdbEntMake() accepts new layer names.If the entity list refers to a layer name
that has not been defined in the current drawing, acdbEntMake() creates a new layer. The
attributes of the new layer are the standard default values used by the New option of the
AutoCAD LAYER command. The list cannot specify a handle or other internal fields.Attempts
to specify an internal field, for example a handle or the main entity name in a seqend
subentity (restype == -2), are ignored. acdbEntMake() cannot create viewport, xref, xdef,
or xdep entities.An attempt to create a viewport, xref, xdef, or xdep entity is rejected.
You can create an entity on a frozen layer.If you create an entity on a frozen layer, it is
not regenerated until the layer is reactivated. Before it appends the entity to the
database, acdbEntMake() performs the same consistency checks on ent as the AutoCAD DXFIN
command performs on data from a DXF file. After it appends the entity to the database,
acdbEntMake() displays the new entity (including its subentities) on the graphics screen.
If acdbEntMake() succeeds, it returns RTNORM; if it cannot update the database, it returns
RTREJ. When acdbEntMake() fails, it sets the system variable ERRNO to a value that
indicates the reason for the failure. When acdbEntMake() creates the endblk of a block, it
returns RTKWORD; the name of the block can be retrieved by a subsequent call to
acedGetInput(). The object type of the object created by acdbEntMake() determines where the
object will reside. For example, if a layer object is passed to acdbEntMake(), the object
will reside in the layer symbol table. If a simple entity is given to acdbEntMake(), it
will reside in the current space. A block record entity is not required to make a block
definition with acdbEntMake(), but it is accepted if passed.
def entMakeX(resultBuffer: Collection[tuple[int, Any]]) -> ObjectId:
Makes a new object or entity (such as an empty dictionary, an xrecord, a circle, and so
on), gives it a handle and entity name, but does not give it an owner (unlike
acdbEntMake(), which provides an owner as well). Warning Objects and entities without
owners are not written out to DWG or DXF files. Be sure to set an owner at some point after
using acdbEntMakeX(). For example, you can use acdbDictAdd() to set a dictionary to own an
object. If acdbEntMakeX() succeeds, it returns RTNORM; if it cannot update the database, it
returns RTREJ. When acdbEntMakeX() fails, it sets the system variable ERRNO to a value that
indicates the reason for the failure.
def entMod(resultBuffer: list) -> bool:
Updates the definition data of the specified entity. The entity that acdbEntMod() modifies
is specified by the result buffer that contains the entity's name (restype == -1); this
should be the first result buffer in ent.
def entNext(id: PyDb.ObjectId) -> ObjectId:
Gets the name of the entity following the specified entity in the drawing database. The
acdbEntNext() function can be used with acedSSGet(), which selects only main entities. To
access the internal structure of a main entity, find the main entity by calling
acedSSGet(), and then 'walk through' the subentities with calls to acdbEntNext().
Conversely, to find the main entry for a subentity that you have already found, walk
forward with acdbEntNext() until you find the seqend subentity, and use acdbEntGet() to
access it. The seqend subentity will have a group (restype == -2) that specifies the name
of the main entity (resval.rlname). If acdbEntNext() succeeds, it returns a status of
RTNORM; otherwise, it returns an error code. When it fails it is usually because ent is not
the name of a valid entity in the current database, or because ent is the last (nondeleted)
entity and no entity follows it. In both cases acdbEntNext() returns RTERROR. When
acdbEntNext() fails, it sets the system variable ERRNO to a value that indicates the reason
for the failure.
def entUpd(id: PyDb.ObjectId) -> bool:
Updates the screen image of the specified entity. It redraws the entire entity; for complex
entities, this includes subentities such as polyline vertices or block attributes. If ent
specifies a subentity, acdbEntUpd() finds the head before it does the redraw. This function
is intended for use with complex entities, but it can be called to redraw any graphical
entity in the current drawing database. Do not pass nongraphical objects, such as a symbol
table, to acdbEntUpd(). Warning If ent is in a block definition, then acdbEntUpd() is not
sufficient. You must regenerate the drawing by invoking the AutoCAD REGEN command (with
acedCmd() or acedCommand()) to ensure that all instances of the block references are
updated. If acdbEntUpd() succeeds, it returns RTNORM; otherwise, it returns RTERROR. When
acdbEntUpd() fails, it sets the system variable ERRNO to a value that indicates the reason
for the failure.
def evaluateFields() -> ErrorStatus:
This function evaluates all the fields in the objects in the database. If objId is not
null, it evaluates the fields only in the specified object. Otherwise, it evaluates the
fields in the entire database. If the pDb argument is null and the field is database
resident, the field's database is used. If it is null and the field is not database
resident, evaluation of fields that require a database fails.
def evaluateFields(ids: list[PyDb.ObjectId], context: int) -> ErrorStatus:
This function evaluates all the fields in the objects in the database. If objId is not
null, it evaluates the fields only in the specified object. Otherwise, it evaluates the
fields in the entire database. If the pDb argument is null and the field is database
resident, the field's database is used. If it is null and the field is not database
resident, evaluation of fields that require a database fails.
def evaluateFields(*args) -> ErrorStatus:
This function evaluates all the fields in the objects in the database. If objId is not
null, it evaluates the fields only in the specified object. Otherwise, it evaluates the
fields in the entire database. If the pDb argument is null and the field is database
resident, the field's database is used. If it is null and the field is not database
resident, evaluation of fields that require a database fails.
def fail(msg: str) -> None:
Displays an error message that includes the name of the application and the argument. This
function simply displays the message and returns control to the caller. Use it when a
recoverable error is encountered.
def findField(val: str, idxfrom: int) -> tuple[bool, int, int]:
This function can be used to extract the embedded fields in text. It can be called in a
loop to extract all the fields in the text. Returns true if a field is found; otherwise,
returns false.
def forceTextAdjust(ids: list[PyDb.ObjectId]) -> None:
Normally when a text entity is closed, the text's position and alignment points are
adjusted according to the text's justification settings and the text style. However, if the
text entity is embedded in a database that is not the current database, this automatic
adjustment does not take place. This method forces text to be adjusted on text entities
that reside in non-current databases. This method supports objects of types AcDbText,
AcDbBlockReference, and AcDbBlockTableRecord. Returns Acad::eOk if successful.
def getCurUserViewportId(db: PyDb.Database) -> ObjectId:
This function returns the object ID of the AcDbViewport that was current before any draw
methods are called on any entity in the database. The entity draw methods can manipulate
what is the current viewport.
def getCurVportId(db: PyDb.Database) -> ObjectId:
This function returns the object ID of the AcDbViewport that was current when the drawing
was last saved. Returns AcDbObjectId::kNull if pDb is NULL, or if the space that was
current when the drawing was last saved contains no AcDbViewports, or if tilemode was set
to 1 when the drawing was last saved.
def getCurVportTableRecordId(db: PyDb.Database) -> ObjectId:
This function returns the object ID of the currently active viewport table record in the
given database. It returns AcDbObjectId::kNull on error, or if pDb is not in titlemode.
def getDimAssocId(id: PyDb.ObjectId) -> ObjectId:
Gets the AcDbDimAssoc object ID from the given dimension. Returns Acad::eOk if true.
def getDimAssocIds(id: PyDb.ObjectId) -> list[PyDb.ObjectId]:
Gets the AcDbDimAssoc object IDs from the geometry in the AcDbPointRef object. Returns
Acad::eOk if true.
def getDimStyleId(db: PyDb.Database, name: str, lockname: str) -> ObjectId:
Returns the object ID for the specified dimension style, if the dimension style doesn't
exist it is created.
def getDynDimStyleId(db: PyDb.Database) -> ObjectId:
This function returns the object ID of the DYNDIM dynamic dimension style from the current
drawing database. DYNDIM is the base style for all dynamic dimensions. If the DYNDIM style
does not already exist in the current drawing, this function creates it and copies its
properties from the default Standard dimension style. If the DYNDIM style already exists in
the current drawing database, but was erased, this function unerases its entry in the
DIMSTYLE table and returns its object ID. Applications typically use the object ID obtained
from this function to access dynamic dimension style settings.
def getGeoDataObjId(db: PyDb.Database) -> ObjectId:
Returns the objectId of AcDbGeoData.
def getMappedFontName(name: str) -> str:
Maps the font that will be used given a font name. Returns a mapped (substitute) font name
or NULL if there is no substitution.
def getProxyInfo(id: PyDb.DbObject) -> tuple[str, str, str]:
Returns the proxy's DXF, class, and application names in the appropriate arguments.
def getReservedString(reservedType: PyDb.ReservedStringEnumType, bGetLocalized: bool) -> str:
This function returns the reserved string of type reservedType. If bGetLocalized is true,
the returned string is localized. When bGetLocalized is false, this function returns the
internal string representation. For example, if reservedType is AcDb::kByBlock and
bGetLocalized is false, the string 'ByBlock' is returned. The function returns NULL if no
string is found.
def getSummaryInfo(db: PyDb.Database) -> DatabaseSummaryInfo:
The Summary Info database member data is initialized to the input database. Use pInfo to
get or set individual Summary Info values and call acdbPutSummaryInfo() when changes are
complete to update the summary info data in its persistent data format in the database. The
caller is responsible for deleting the pInfo object when they're finished using it. This
function returns Acad::eOk if successful.
def getUnitsConversion(ufrom: PyDb.UnitsValue, to: PyDb.UnitsValue) -> float:
Obtains the double value that represents the difference in scale between two
AcDb::UnitsValue enumerations. For example, if from is AcDb::kUnitsInches and to is
AcDb::kMillimeters, the conversion factor returned is 25.4. Returns eOk if successful.
Returns eInvalidInput if either of the UnitsValue enums is invalid.
def getViewportVisualStyle() -> ObjectId:
Returns the visual style of the current viewport.
def groupCodeToType(code: PyDb.DxfCode) -> DwgDataType:
def handEnt(handle: str) -> ObjectId:
Finds the entity with the specified handle. An entity's name changes whenever AutoCAD opens
the drawing, but the entity's handle is constant throughout its life. An ARX application
that manipulates a specific database can use acdbHandEnt() to obtain the current name of an
entity that the application must manipulate. Once the name is obtained, the entity can be
handled by using the other entity functions. The acdbHandEnt() function will find entities
deleted during the current editing session. Another use of this function is to find such
entities and undelete them, if necessary, with the acdbEntDel() function. If acdbHandEnt()
succeeds, it returns RTNORM. If handles are disabled, if handle is not a valid handle
string, or if handle cannot be found in the current database, acdbHandEnt() returns
RTERROR. When acdbHandEnt() fails, it sets the system variable ERRNO to a value that
indicates the reason for the failure.
def hasGeoData(db: PyDb.Database) -> bool:
def icompare(left: str, right: str) -> bool:
def inters(from1: PyGe.Point3d, to1: PyGe.Point3d, from2: PyGe.Point3d, to2: PyGe.Point3d, teston: int) -> PyGe.Point3d:
Examines two lines and returns the point where they intersect. All four point arguments are
three-dimensional points; acdbInters() checks for intersection in 3D space. All points
should be expressed in terms of the same coordinate system. Otherwise, acdbInters() will
return garbage (it calculates a result but does not check the input values against the
current drawing). If acdbInters() finds an intersection point, it returns RTNORM;
otherwise, it returns an error code.
def isEnabledTightExtents() -> bool:
Used to determine if the tight extents calculations are enabled for AcDb3dSolid,
AcDbSurface, and AcDbRegion entities.
def isReservedString(val: str, reservedType: PyDb.ReservedStringEnumType) -> bool:
This function returns true if strString is a localized or English version of the reserved
string specified by reservedType. Otherwise, it returns false. strString is not case
sensitive.
def loadLineTypeFile(ltname: str, fname: str, db: PyDb.Database) -> None:
This function loads the linetype specified by ltname from the file specified by fname and
stores it in the database specified by pDb. If pDb is NULL, then the database currently
loaded in the AutoCAD editor is used. The ltname parameter may contain wild card characters
(see acutWcMatch() for more information on wild card usage). If wild cards are used,
multiple linetypes may be loaded. If fname is not a URL and does not contain a path, then
the AutoCAD library search path will be searched for the file. Returns Acad::eOk if
successful. Returns Acad::eNullObjectPointer if ltname or fname is NULL. Returns
Acad::eFileSystemErr If the specified file cannot be opened. Returns
Acad::eUndefinedLineType if the linetype name specified by ltname is not found in the file.
Returns Acad::eBadLineTypeName if the file contains a malformed record, or a syntax error
is encountered. Returns an appropriate Internet-specific Acad::ErrorStatus value if a URL
is specified and the transfer is not successful.
def loadMlineStyleFile(ltname: str, fname: str) -> None:
This function loads the MlineStyle specified by sname from the file specified by fname. If
fname is not a URL and does not contain any path information, then the AutoCAD library
search path will be searched for the file. sname cannot contain wild cards. Returns
Acad::eOk if the MlineStyle is successfully loaded. Returns Acad::eNullObjectPointer if
sname or fname is NULL. Returns Acad::eFileAccessErr if the specified file cannot be
opened. Returns an appropriate Internet-specific Acad::ErrorStatus value if a URL is
specified and the transfer is not successful.
def namedObjDict() -> ObjectId:
Returns the name of the named object dictionary, which is the root of all nongraphical
objects in the current drawing. Using this name with acdbDictSearch() and acdbDictNext(), a
program can access nongraphical objects.
def openDbEntities(ids: list[PyDb.ObjectId], mode: PyDb.OpenMode, erased: bool) -> list[PyDb.Entity]:
This function provides a means to open database-resident objects that are derived from
AcDbEntity (that is, have graphics). The function is passed in an empty pointer, pEnt. id
is the object ID of the object to open. mode is the mode to open in. openErasedEntity is a
Boolean indicating whether or not to open the object if it's erased. The mode argument may
be one of the following: AcDb::kForRead AcDb::kForWrite AcDb::kForNotify If the open
attempt is successful, then pEnt will be set to the address of the object and Acad::eOk
will be returned. If openErasedEntity is false, then attempting to open an erased object
will fail and this function will return Acad::eWasErased. If attempting to open
AcDb::kForRead and the object is already opened for read the maximum of 256 times, then the
open attempt will fail and this function will return Acad::eAtMaxReaders. If the object is
currently open AcDb::kForNotify, then the open attempt will fail and this function will
return Acad::eWasNotifying. If the object is currently involved in an undo operation, then
the open attempt will fail and this function will return Acad::eWasOpenForUndo. If the
object is currently open AcDb::kForWrite, then the open attempt will fail and this function
will return Acad::eWasOpenForWrite. If objId is AcDbObjectId::kNull, then the open attempt
will fail and this function will return Acad::eNullObjectId.
def openDbEntity(id: PyDb.ObjectId, mode: PyDb.OpenMode, erased: bool) -> Entity:
This function provides a means to open database-resident objects that are derived from
AcDbEntity (that is, have graphics). The function is passed in an empty pointer, pEnt. id
is the object ID of the object to open. mode is the mode to open in. openErasedEntity is a
Boolean indicating whether or not to open the object if it's erased. The mode argument may
be one of the following: AcDb::kForRead AcDb::kForWrite AcDb::kForNotify If the open
attempt is successful, then pEnt will be set to the address of the object and Acad::eOk
will be returned. If openErasedEntity is false, then attempting to open an erased object
will fail and this function will return Acad::eWasErased. If attempting to open
AcDb::kForRead and the object is already opened for read the maximum of 256 times, then the
open attempt will fail and this function will return Acad::eAtMaxReaders. If the object is
currently open AcDb::kForNotify, then the open attempt will fail and this function will
return Acad::eWasNotifying. If the object is currently involved in an undo operation, then
the open attempt will fail and this function will return Acad::eWasOpenForUndo. If the
object is currently open AcDb::kForWrite, then the open attempt will fail and this function
will return Acad::eWasOpenForWrite. If objId is AcDbObjectId::kNull, then the open attempt
will fail and this function will return Acad::eNullObjectId.
def openDbObject(id: PyDb.ObjectId, mode: PyDb.OpenMode, erased: bool) -> DbObject:
This function provides a means to open database-resident objects. pObj is passed in as an
empty pointer. The mode argument may be one of the following: AcDb::kForRead,
AcDb::kForWrite, or AcDb::kForNotify. If the open attempt is successful, then pObj will be
set to the address of the object and Acad::eOk will be returned. If openErasedObject is
false, then attempting to open an erased object will fail and this function will return
Acad::eWasErased. If attempting to open AcDb::kForRead and the object is already opened for
read the maximum of 256 times, then the open attempt will fail and this function will
return Acad::eAtMaxReaders. If the object is currently open AcDb::kForNotify, then the open
attempt will fail and this function will return Acad::eWasNotifying. If the object is
currently involved in an undo operation, then the open attempt will fail and this function
will return Acad::eWasOpenForUndo. If the object is currently open AcDb::kForWrite, then
the open attempt will fail and this function will return Acad::eWasOpenForWrite. If objId
is AcDbObjectId::kNull, then the open attempt will fail and this function will return
Acad::eNullObjectId. If the document is not locked, then the open attempt will fail and
this function will return Acad::eLockViolation.
def openDbObjects(ids: list[PyDb.ObjectId], mode: PyDb.OpenMode, erased: bool) -> list[PyDb.DbObject]:
This function provides a means to open database-resident objects. pObj is passed in as an
empty pointer. The mode argument may be one of the following: AcDb::kForRead,
AcDb::kForWrite, or AcDb::kForNotify. If the open attempt is successful, then pObj will be
set to the address of the object and Acad::eOk will be returned. If openErasedObject is
false, then attempting to open an erased object will fail and this function will return
Acad::eWasErased. If attempting to open AcDb::kForRead and the object is already opened for
read the maximum of 256 times, then the open attempt will fail and this function will
return Acad::eAtMaxReaders. If the object is currently open AcDb::kForNotify, then the open
attempt will fail and this function will return Acad::eWasNotifying. If the object is
currently involved in an undo operation, then the open attempt will fail and this function
will return Acad::eWasOpenForUndo. If the object is currently open AcDb::kForWrite, then
the open attempt will fail and this function will return Acad::eWasOpenForWrite. If objId
is AcDbObjectId::kNull, then the open attempt will fail and this function will return
Acad::eNullObjectId. If the document is not locked, then the open attempt will fail and
this function will return Acad::eLockViolation.
def postDimAssoc(dimId: PyDb.ObjectId, assoc: PyDb.DimAssoc, isActive: bool) -> ObjectId:
This functions posts the pDimAssoc object to the database. It uses the extension dictionary
of the provided dimension. Returns Acad::eOk if successful.
def putSummaryInfo(info: PyDb.DatabaseSummaryInfo, db: PyDb.Database) -> None:
This function stores the Summary Info data in its persistent data format in the database,
and returns Acad::eOk if successful.
def queueAnnotationEntitiesForRegen(db: PyDb.Database) -> None:
Queues an entity in model space for regen if it is:annotative;a block reference with some
nested annotative entity; oran attribute on an annotative block reference Returns Acad::eOk
if the operation completed successfully.
def queueForRegen(ids: list[PyDb.ObjectId]) -> int:
Returns the number of object IDs that were queued successfully for regen. The object IDs
are expected to represent entities in the current host database. This function queues up
these entities for regeneration. IDs which do not represent entities, are not in the
current database, or are excluded from a partial open will not be placed in the queue.
Queued entities are regenerated in all viewports, including 3D GS viewports.
def regApp(val: str) -> bool:
Registers the application's extended entity data. Registers an application name in the
current drawing. Application names are used for grouping, storing, retrieving, and
modifying extended entity data. An application can register as many names as necessary (or
none at all), but the names it registers should be unique to that application. Application
names must adhere to the rules for symbol table names (such as layer names). If the name
has not been registered before, acdbRegApp() adds appname to the APPID symbol table of the
current drawing and returns RTNORM. If appname is already in the APPID table, acdbRegApp()
returns RTERROR. When acdbRegApp() fails, it sets the system variable ERRNO to a value that
indicates the reason for the failure. Do not call acdbRegApp() from within the
AcRx::kInitAppMsg handler because acdbRegApp() has to be database (document) specific.
Instead, either call acdbRegApp() from the kLoadDwgMsg handler or use the
AcDbRegAppTableRecord or AcDbRegAppTable classes directly.
def reloadXrefs(db: PyDb.Database, ids: list[PyDb.ObjectId], bQuiet: bool) -> None:
This function reloads the xrefs whose AcDbBlockTableRecord ObjectIds are in xrefBlkIds. The
ObjectIds in xrefBlkIds must all be from pHostDb. If pHostDb is NULL, then the database
specified by AcDbHostApplicationServices::workingDatabase() will be assumed to be the host
database. If bQuiet is false, then status and error messages will be sent to
AcDbHostApplicationServices::DisplayString(). Returns Acad::eOk if successful.
def resbufTest(resultBuffer: list) -> list:
def resolveCurrentXRefs(db: PyDb.Database, useThreadEngine: bool, doNewOnly: bool) -> None:
def rtos(val: float, unit: int, prec: int) -> str:
Deprecated. Formats a floating-point value as a string. The following table lists the valid
values for the units argument. Linear units values: 1 Scientific 2 Decimal 3 Engineering
(feet and decimal inches) 4 Architectural (feet and fractional inches) 5 Fractional The
current value of the AutoCAD DIMZIN dimensioning variable controls how acdbRToS() writes
leading or trailing zeros to str. If acdbRToS() succeeds, it returns RTNORM; otherwise, it
returns an error code.
def setEnableTightExtents(val: bool) -> None:
Used to enable the tight extents calculations before using getGeomExtents on the
AcDb3dSolid, AcDbSurface, and AcDbRegion entities.
def snValid(val: str, pipetest: int) -> bool:
Tests a symbol table name for validity, including symbol table names with out-of-code-page
escape sequences. For applications that read a symbol table name from the keyboard, set
pipetest to FALSE , because other functions would not accept a name containing the |
character. A symbol table name is valid if it is non-null and contains only characters
allowed in filenames except the comma, semicolon, accent grave, and equals sign, which are
also not allowed.
def stringTest(val: str) -> str:
def stringtolower(val: str) -> str:
def stringtoupper(val: str) -> str:
def symUtil() -> SymUtilServices:
This function returns a pointer to the AcDbSymUtilServices object that you dereference in
order to invoke the member functions. It never returns NULL. AcDbSymUtilServices is a
typedef to abbreviate the longer name AcDbSymbolUtilities::Services().
def tblNext(name: str, rewind: int) -> list:
Scans the specified symbol table and returns either the next entry or the first entry as a
result-buffer list. acdbTblNext() returns information consistent with AutoCAD Release 12
identification format. It does not return the complete symbol table entry, expanded in
Release 13 to include the object name, xdata, and persistent reactors attached to the
symbol table. The identification format for symbol table entries returned by these
functions consists of a group with a 0 code that contains the name of the table and a group
with a 2 code that contains the entry name in the table. These types of objects exist in
only one container in the drawing, so the codes are interchangeable with the entry's entity
name. To obtain the entity name of the symbol table entry, call the acdbTblObjName()
function. The tblname argument is the name of one of the read-access symbol tables in the
current drawing. The valid values for tblname are LAYER, LTYPE, VIEW, STYLE, BLOCK, UCS,
DIMSTYLE, VPORT, and APPID. The tblname string can be in lowercase; acdbTblNext() converts
it to uppercase before passing it to AutoCAD. When acdbTblNext() is called repeatedly, it
normally returns the next entry in the specified table each time. (See acdbTblSearch() for
the way to change this default sequence.) If there are no more entries in the table,
acdbTblNext() returns NULL. It never returns deleted table entries. If the rewind argument
is nonzero, the symbol table is 'rewound' and acdbTblNext() returns the table's first
entry. When you begin scanning a table, supply a nonzero rewind argument to rewind the
table and find its first entry. A symbol table entry is returned as a linked list of result
buffers with DXF group codes and values. Entries retrieved from the BLOCK table include a
-2 group with the entity name of the first entity in the block definition. If the block is
empty, the -2 group contains the name of an endblk entity. By passing the -2 group entity
name to acdbEntNext(), you can scan the entities in the block definition and use
acdbEntMod() to modify the subentities in the block; acdbEntNext() returns NULL after the
last entity in the block definition. When acdbTblNext() fails, it sets the system variable
ERRNO to a value that indicates the reason for the failure.
def tblObjName(tblname: str, sym: str) -> ObjectId:
Returns an entity identifier for passing to acdbEntGet() or acdbEntMod() to locate the
actual entity.
def tblSearch(tblname: str, sym: str, setnext: int) -> list:
Scans the specified symbol table for the specified entry. To obtain the entity name of the
symbol table entry, call the acdbTblObjName() function. The tblname argument is the name of
one of the read-access symbol tables in the current drawing. The valid values for tblname
are LAYER, LTYPE, VIEW, STYLE, BLOCK, UCS, DIMSTYLE, VPORT, and APPID. Returned DXF Codes
If acdbTblSearch() finds sym, it returns the entry as a linked list of result buffers with
DXF group codes and values. If it does not find sym, acdbTblSearch() returns NULL. It
cannot find table entries that have been deleted. The identification format for symbol
table entries returned by these functions consists of a group with a 0 code that contains
the name of the table and a group with a 2 code that contains the table entry name. These
types of objects exist in only one container in the drawing, so the codes are
interchangeable with the entry's entity name. The acdbTblSearch() function returns
information consistent with AutoCAD Release 12 identification format. It does not return
the complete symbol table entry, expanded in Release 13 to include the object name, xdata,
and persistent reactors attached to the symbol table. Next Entry Normally, acdbTblSearch()
has no effect on the order of entries retrieved by acdbTblNext(). The setnext option is the
most useful when dealing with the VPORT symbol table, because all viewports in a particular
configuration have the same name (for example, *ACTIVE). If the VPORT symbol table is
accessed when TILEMODE is off, any changes have no visible effect until TILEMODE is on.
(TILEMODE is set either by using the SETVAR command or by entering its name directly.) Do
not confuse vports described by the VPORT symbol table with paper-space viewport entities.
When acdbTblSearch() fails, it sets the system variable ERRNO to a value that indicates the
reason for the failure.
def textFind(db: PyDb.Database, findString: str) -> list[PyDb.ObjectId]:
This function searches the set of entities for text that matches findString. If a match is
found, the object ID of the entity is added to the resultSet array. Wildcards are not
supported. If selSet is not 0, it is used as the starting set of entities to search.
Otherwise, the entities in the database specified by pDatabase are used. The entities in
the starting set are filtered based on the criteria specified by the searchOptions flags.
If replaceString is NULL, no replacement occurs. searchOptions may be a bitwise combination
of any of the following values: AC_SRCH_BLOCK 0x01 If this bit is set, AcDbAttributes and
objects of classes derived from AcDbAttribute are searched. AC_SRCH_DIM_TEXT 0x02 If this
bit is set, the text in dimensions, and in objects of classes derived from the dimension
classes, are searched. AC_SRCH_TEXT 0x04 If this bit is set, then text, MText, and objects
of classes derived from AcDbMText and AcDbText (except AcDbAttribute and
AcDbAttributeDefinition and any classes derived from them) are searched. AC_SRCH_LINK_NAME
0x08 If this bit is set, hyperlink descriptions are searched. AC_SRCH_LINK_URL 0x10 If this
bit is set, hyperlinks are searched, AC_SRCH_MATCH_CASE 0x20 If this bit is set, the search
is case sensitive. AC_SRCH_WHOLE_WORD 0x40 If this bit is set, only whole word matches will
be found. AC_SRCH_DEFAULT 0x1F This value includes AC_SRCH_BLOCK, AC_SRCH_DIM_TEXT,
AC_SRCH_TEXT, AC_SRCH_LINK_NAME, and AC_SRCH_LINK_URL Returns true if no errors occur
during execution, regardless of whether matches are found. Otherwise, it returns false
def textFind(db: PyDb.Database, findString: str, replaceString: str, searchOptions: int, ids: list[PyDb.ObjectId]) -> list[PyDb.ObjectId]:
This function searches the set of entities for text that matches findString. If a match is
found, the object ID of the entity is added to the resultSet array. Wildcards are not
supported. If selSet is not 0, it is used as the starting set of entities to search.
Otherwise, the entities in the database specified by pDatabase are used. The entities in
the starting set are filtered based on the criteria specified by the searchOptions flags.
If replaceString is NULL, no replacement occurs. searchOptions may be a bitwise combination
of any of the following values: AC_SRCH_BLOCK 0x01 If this bit is set, AcDbAttributes and
objects of classes derived from AcDbAttribute are searched. AC_SRCH_DIM_TEXT 0x02 If this
bit is set, the text in dimensions, and in objects of classes derived from the dimension
classes, are searched. AC_SRCH_TEXT 0x04 If this bit is set, then text, MText, and objects
of classes derived from AcDbMText and AcDbText (except AcDbAttribute and
AcDbAttributeDefinition and any classes derived from them) are searched. AC_SRCH_LINK_NAME
0x08 If this bit is set, hyperlink descriptions are searched. AC_SRCH_LINK_URL 0x10 If this
bit is set, hyperlinks are searched, AC_SRCH_MATCH_CASE 0x20 If this bit is set, the search
is case sensitive. AC_SRCH_WHOLE_WORD 0x40 If this bit is set, only whole word matches will
be found. AC_SRCH_DEFAULT 0x1F This value includes AC_SRCH_BLOCK, AC_SRCH_DIM_TEXT,
AC_SRCH_TEXT, AC_SRCH_LINK_NAME, and AC_SRCH_LINK_URL Returns true if no errors occur
during execution, regardless of whether matches are found. Otherwise, it returns false
def textFind(*args) -> list[PyDb.ObjectId]:
This function searches the set of entities for text that matches findString. If a match is
found, the object ID of the entity is added to the resultSet array. Wildcards are not
supported. If selSet is not 0, it is used as the starting set of entities to search.
Otherwise, the entities in the database specified by pDatabase are used. The entities in
the starting set are filtered based on the criteria specified by the searchOptions flags.
If replaceString is NULL, no replacement occurs. searchOptions may be a bitwise combination
of any of the following values: AC_SRCH_BLOCK 0x01 If this bit is set, AcDbAttributes and
objects of classes derived from AcDbAttribute are searched. AC_SRCH_DIM_TEXT 0x02 If this
bit is set, the text in dimensions, and in objects of classes derived from the dimension
classes, are searched. AC_SRCH_TEXT 0x04 If this bit is set, then text, MText, and objects
of classes derived from AcDbMText and AcDbText (except AcDbAttribute and
AcDbAttributeDefinition and any classes derived from them) are searched. AC_SRCH_LINK_NAME
0x08 If this bit is set, hyperlink descriptions are searched. AC_SRCH_LINK_URL 0x10 If this
bit is set, hyperlinks are searched, AC_SRCH_MATCH_CASE 0x20 If this bit is set, the search
is case sensitive. AC_SRCH_WHOLE_WORD 0x40 If this bit is set, only whole word matches will
be found. AC_SRCH_DEFAULT 0x1F This value includes AC_SRCH_BLOCK, AC_SRCH_DIM_TEXT,
AC_SRCH_TEXT, AC_SRCH_LINK_NAME, and AC_SRCH_LINK_URL Returns true if no errors occur
during execution, regardless of whether matches are found. Otherwise, it returns false
def transactionManager() -> TransactionManager:
This function returns the AcDbTransactionManager object for the current document.
def ucs2Wcs(p: PyGe.Point3d | PyGe.Vector3d, qout: PyGe.Point3d | PyGe.Vector3d) -> bool:
This function translates the point p from UCS coordinates into WCS coordinates and fills q
in with the translated value. If vec is true, then p is treated as a vector for translation
rather than as a point. Returns true if successful and false if not.
def ucsMatrix(db: PyDb.Database) -> PyGe.Matrix3d:
This function fills in mat with values such that it can be used as a transformation matrix
to go from the UCS coordinates currently used in pDb, to WCS coordinates. Returns true if
successful and false if not.
def unloadXrefs(db: PyDb.Database, ids: list[PyDb.ObjectId], bequiet: bool) -> None:
Unloads the xrefs whose AcDbBlockTableRecord ObjectIds are in xrefBlkIds. The ObjectIds in
xrefBlkIds must all be from pHostDb. If pHostDb is NULL, then the database specified by
AcDbHostApplicationServices::workingDatabase() will be assumed to be the host database. If
bQuiet is false, then status and error messages will be sent to
AcDbHostApplicationServices::DisplayString(). Returns Acad::eOk if the operation is
successful.
def updateDimension(id: PyDb.ObjectId) -> None:
This function performs a forced update for the given associative dimension. Returns
Acad::eOk if successful.
def validateCustomSummaryInfoKey(val: str, info: PyDb.DatabaseSummaryInfo) -> bool:
Validates the custom summary info key to ensure the characters are appropriate and the key
is not a duplicate. Invalid characters include any of the following: < > / \ ' : ; ? * | ,
= `
def wcs2Ecs(p: PyGe.Point3d | PyGe.Vector3d, normal: PyGe.Vector3d, qout: PyGe.Point3d | PyGe.Vector3d) -> bool:
This function translates the point p from WCS coordinates to the OCS (formerly ECS)
coordinates of the coordinate system determined by norm. q is filled in with the translated
value. If vec is true, then p is treated as a vector for translation rather than a point.
Returns true if successful and false if not.
def wcs2Ucs(p: PyGe.Point3d | PyGe.Vector3d, qout: PyGe.Point3d | PyGe.Vector3d) -> bool:
This function translates the point p from WCS coordinates into UCS coordinates and fills q
in with the translated value. If vec is true, then p is treated as a vector for translation
rather than as a point. Returns true if successful and false if not.
class Curve Class
def __init__(self, id: PyDb.ObjectId, mode: PyDb.OpenMode, erased: bool) -> None:
The AcDbCurve class is the base class for all the entity classes that are variations of a
curve such as AcDbArc, AcDbCircle, AcDbEllipse, AcDbSpline, and others. This base class
provides the common functionality such as finding parameters for a point on the curve,
finding offset curves, finding projections of the curve onto a plane, and so on.
def __reduce__(self) -> Any:
def cast(otherObject: PyRx.RxObject) -> Curve:
def className() -> str:
def cloneFrom(otherObject: PyRx.RxObject) -> Curve:
def createFromAcGeCurve(curve: PyGe.Curve3d, normal: PyGe.Vector3d, tol: PyGe.Tol) -> Curve:
This is createFromAcGeCurve, a member of class AcDbCurve.
def desc() -> PyRx.RxClass:
Returns a pointer to the AcRxClass object representing the specific class, or most recent
parent class explicitly registered with ObjectARX of either the pointer type used to invoke
it or the class qualifier used with it. (Remember that when a static member function is
invoked via a pointer, the pointer type, not the object type, determines which
implementation of the function is invoked.) When working with a pointer to an object and
the proper AcRxClass object for the class of the object pointed to is desired, the
AcRxObject::isA() function should be used, since it is a virtual non-static method and is
therefore not pointer type dependent. Caching the value of the pointer returned by this
method is acceptable, provided the application knows that the AcRxClass object pointed to
by the returned pointer was created by an ObjectARX application that will not be unloaded.
def extend(self, newParam: float) -> None:
This function extends the beginning or end of the curve to the new point determined by the
newParam value. If newParam is less than the curve's start parameter, then the curve is
reset to start at newParam. If newParam is greater than the curve's end parameter, then the
curve is reset to end at newParam. Returns Acad::eOk if successful. If newParam's first
period value is between the curve's start and end, then Acad::eInvalidInput will be
returned. The function implementation in derived classes must be able to interpret the
newParam value, decide if it is beyond the existing curve end or before the curve
beginning, and then extend the curve in the appropriate direction to the newParam value.
Return ErrorStatus values are up to the implementer, but to be consistent with built-in
classes, the following return values are recommended: Acad::eOk Function completed
successfully. Acad::eInvalidInput The parameter was not acceptable for some reason (for
example, if its first period lies within the existing curve so that it would be a trim
rather than an extension). The default implementation returns Acad::eNotImplemented.
def extend(self, extendStart: bool, toPoint: PyGe.Point3d) -> None:
This function extends the beginning or end of the curve to the new point determined by the
newParam value. If newParam is less than the curve's start parameter, then the curve is
reset to start at newParam. If newParam is greater than the curve's end parameter, then the
curve is reset to end at newParam. Returns Acad::eOk if successful. If newParam's first
period value is between the curve's start and end, then Acad::eInvalidInput will be
returned. The function implementation in derived classes must be able to interpret the
newParam value, decide if it is beyond the existing curve end or before the curve
beginning, and then extend the curve in the appropriate direction to the newParam value.
Return ErrorStatus values are up to the implementer, but to be consistent with built-in
classes, the following return values are recommended: Acad::eOk Function completed
successfully. Acad::eInvalidInput The parameter was not acceptable for some reason (for
example, if its first period lies within the existing curve so that it would be a trim
rather than an extension). The default implementation returns Acad::eNotImplemented.
def extend(*args) -> None:
This function extends the beginning or end of the curve to the new point determined by the
newParam value. If newParam is less than the curve's start parameter, then the curve is
reset to start at newParam. If newParam is greater than the curve's end parameter, then the
curve is reset to end at newParam. Returns Acad::eOk if successful. If newParam's first
period value is between the curve's start and end, then Acad::eInvalidInput will be
returned. The function implementation in derived classes must be able to interpret the
newParam value, decide if it is beyond the existing curve end or before the curve
beginning, and then extend the curve in the appropriate direction to the newParam value.
Return ErrorStatus values are up to the implementer, but to be consistent with built-in
classes, the following return values are recommended: Acad::eOk Function completed
successfully. Acad::eInvalidInput The parameter was not acceptable for some reason (for
example, if its first period lies within the existing curve so that it would be a trim
rather than an extension). The default implementation returns Acad::eNotImplemented.
def getAcGeCurve(self, tol: PyGe.Tol) -> PyGe.Curve3d:
This is getAcGeCurve, a member of class AcDbCurve.
def getArea(self) -> float:
This function returns with area set to the area inside the curve. For the AutoCAD built-in
classes, the curve must lie on a plane. If the curve is not closed, its start and end
points are considered as connected by a line segment that closes it. Returns Acad::eOk if
successful. For the AutoCAD built-in classes, Acad::eInvalidInput is returned if the curve
is not planar. Other return values are possible for custom entity classes depending on how
they were implemented. This function must be able to calculate a bounded area value for the
curve. While the AutoCAD built-in classes require the curve to be planar, no such
restriction need be made for custom entity classes unless desired by the implementer.
ErrorStatus return values are up to the implementer, but the following are recommended to
be consistent with existing classes: Acad::eOk Function completed successfully.
Acad::eInvalidInput The area was not calculable (for example, the curve was not planar).
The default implementation's return value is Acad::eNotImplemented.
def getClosestPointTo(self, point3d: PyGe.Point3d, direction: PyGe.Vector3d, extend: bool) -> PyGe.Point3d:
This function projects the curve onto the plane defined by givenPnt and normal, finds the
point on the projected curve that is nearest to givenPnt, then projects this nearest point
back onto the original curve and sets pointOnCurve to the result. If extend ==
Adesk::kTrue, then the curve is extended along its path to find the closest point. Returns
Acad::eOk if successful. Return values for errors are dependent on the implementation. In
derived classes; this function needs to be able to project the curve onto a plane
determined by a point (givenPnt) and a normal vector (normal), extend the curve's
projection if necessary (if extend==Adesk::kTrue), find the point on the projected curve
that is nearest to givenPnt, then project the point found back onto the original curve (or
its path if it was extended) and set pointOnCurve to the end result. Use of AcGe classes
may be helpful in doing some of the projection and nearest point calculation work. If the
operation is successful, this function returns Acad::eOk. Return values for errors are
dependent upon the error and the implementer. See header file acdh.h for a list of possible
ErrorStatus values. The default implementation returns Acad::eNotImplemented.
def getDistAtParam(self, param: float) -> float:
Calculates the length of the curve's segment from the curve's start point to the point
specified by param. Returns Acad::eOk if successful, or Acad::eInvalidInput if param is out
of range. For other errors, the implementer must decide what return value to use. See the
acdb.h header file for possible ErrorStatus values. In the default implementation, the
function returns Acad::eNotImplemented.
def getDistAtPoint(self, point3d: PyGe.Point3d) -> float:
Calculates the length of the curve's segment between the curve's start point and point and
returns the length in distance. Returns Acad::eOk if successful, or Acad::eInvalidInput if
the point is not on the curve. For other errors, the implementer must decide what return
value to use. See the acdb.h header file for possible ErrorStatus values. Returns
Acad::eNotImplemented in the default implementation.
def getEndParam(self) -> float:
The implementation of this function in derived classes should return with endParam set to
the parameter of the endpoint of the curve. Returns Acad::eOk if successful. By default,
the function returns Acad::eNotImplemented.
def getEndPoint(self) -> PyGe.Point3d:
In this class and in derived classes, this function returns with endPoint set to the end
point (in WCS coordinates) of the curve. Returns Acad::eOk if successful. The default
implementation returns Acad::eNotImplemented.
def getFirstDeriv(self, param: float | PyGe.Point3d) -> PyGe.Vector3d:
Here and in derived classes, this function is implemented to evaluate the first derivative
at the location on the curve specified by param, and sets firstDeriv to the result (in WCS
coordinates). Returns Acad::eOk if successful. If param is not valid for the curve, then
Acad::eInvalidInput is returned. Other ErrorStatus return values are up to the implementer.
For implementation, the AcGe classes may provide some of the necessary functionality to
make the job easier. The default implementation returns Acad::eNotImplemented.
def getOffsetCurves(self, dist: float) -> list[PyDb.Curve]:
This function creates one or more entities that together make up the result of offsetting
the curve by the distance offsetDist. For many curves, the result is a single new curve.
(This single new curve may not be of the same class as the original curve. For example,
offsetting an AcDbEllipse results in an AcDbSpline, since the result of offsetting an
ellipse does NOT fit the equation of an ellipse.) In some cases, it might be necessary for
the offset result to be several curves. (The result may even be several curves that would
form a single curve if they were joined end-to-end.) To allow for this possibility, a
dynamic array of void pointers is used to hold pointers to the resulting entity or
entities. To use this array of pointers, the calling application needs to cast the
pointer(s) to the appropriate object type(s). If only a specific entity type or set of
types are to be handled, then use the cast method of the class(es) desired to see if each
pointer can be safely cast to that object type. If the actual object type (class name) is
desired, then each object's isA() method may be used to get a pointer to the object's
AcRxClass object, which has a name() method. If the offsetDist value is negative, it is
usually interpreted as being an offset to make a smaller curve (that is, for an arc it
would offset to a radius that is offsetDist less than the starting curve's radius). If the
negative value has no meaning in terms of making the curve smaller, a negative offsetDist
may be interpreted as an offset in the direction of smaller X,Y,Z WCS coordinates. This is
not enforced, so custom entities can interpret the sign of the offsetDist value however
they want. The entities returned in the offsetCurves array are dynamically allocated, but
have not been added to an AcDbDatabase yet. So, the application that calls this function is
responsible for their memory. If they are subsequently appended to a database, then the
database takes over responsibility for their memory. Otherwise, the application is
responsible for deleting them when they are no longer needed. Returns Acad::eOk if
offsetting is successfully completed. If the offset distance is invalid (for example, if
you are offsetting an arc such that the offset result would be a negative radius), then
Acad::eInvalidInput is returned. For the AutoCAD built-in classes that use ShapeManager
(AcDbBody, AcDbRegion, and AcDb3dSolid), Acad::eGeneralModelingFailure will be returned if
an error occurs in the ShapeManager modeler. Other ErrorStatus return values are
implementation-dependent. The default implementation returns Acad::eNotImplemented.
def getOffsetCurvesGivenPlaneNormal(self, normal: PyGe.Vector3d, dist: float) -> list[PyDb.Curve]:
This function creates one or more entities that, together, make up the result of offsetting
the curve by the distance offsetDist in the plane with normal vector normal. For many
curves, the result will be a single new curve, which may not be of the same class as the
original curve. For example, offsetting an AcDbEllipse results in an AcDbSpline, since the
result of offsetting an ellipse does not fit the equation of an ellipse. However, in some
cases it might be necessary for the offset result to be several curves. To allow for this
possibility, a dynamic array of void pointers is used to hold pointers to the resulting
entity or entities. To use this array of pointers, the calling application must cast the
pointer(s) to the appropriate object type(s). If only a specific entity type or set of
types are to be handled, then using the cast method of the class(es) desired to see if each
pointer can be safely cast to that object type will work. If the actual object type is
desired, then each object's isA() method may be used to get a pointer to the object's
AcRxClass object, which has a name() method to get the classname of the object. If the
offsetDist value is negative this is usually interpreted as being an offset to make a
smaller curve (that is, for an arc it would offset to a radius that is offsetDist less than
the starting curve's radius). Or, if smaller has no meaning, then a negative offsetDist may
be interpreted as an offset in the direction of smaller X,Y,Z WCS coordinates. However,
this is not enforced, so custom entities can interpret the sign of the offsetDist value
however they wish. The entities returned in the offsetCurves arrays are dynamically
allocated, but have not been added to an AcDbDatabase yet. So, the application that calls
this function is responsible for their memory. If they are subsequently appended to a
database, then the database takes over responsibility for their memory. Otherwise, the
application is responsible for deleting them when they are no longer needed. Returns
Acad::eOk if offsetting is successfully completed. If the offset distance is invalid, or if
normal is a zero length vector or the entity is linear and normal is not perpendicular with
the entity, then Acad::eInvalidInput is returned. Other ErrorStatus return values are
implementation dependent. The default implementation returns Acad::eNotImplemented.
def getOrthoProjectedCurve(self, plane: PyGe.Plane) -> Curve:
This function creates a new curve entity that is the result of projecting the curve along
the projPlane's normal onto the projPlane and sets projCurve to point to the newly created
curve. projCurve is declared as type AcDbCurve to allow the returned curve to be any class
derived from AcDbCurve (for example, when an AcDbArc is projected onto a plane, the result
is an AcDbEllipse). The returned curve is dynamically allocated, but has not been added to
an AcDbDatabase yet. So, the application that calls this function is responsible for its
memory. If the curve is subsequently appended to a database, then the database takes over
responsibility for its memory. Otherwise, the application is responsible for deleting it
when it is no longer needed. Returns Acad::eOk if successful. Other ErrorStatus values are
implementation-dependent. Returns Acad::eNotImplemented in the default implementation.
def getParamAtDist(self, dist: float) -> float:
This function determines the parameter of the curve at the location that is a distance of
dist along the curve from the curve start, and returns the parameter in param. Returns
Acad::eOk if successful. If dist is not valid for the curve, then Acad::eInvalidInput is
returned. Other ErrorStatus return values are implementation-dependent. The default
implementation returns Acad::eNotImplemented.
def getParamAtPoint(self, point3d: PyGe.Point3d) -> float:
This function determines the parameter of the curve at point and returns the parameter in
param. Returns Acad::eOk if successful. If point is not on the curve, then
Acad::eInvalidInput is returned. Other ErrorStatus return values are
implementation-dependent. Acad::eNotImplemented is returned by the default implementation.
def getPointAtDist(self, dist: float) -> PyGe.Point3d:
This function determines the point on the curve that is a distance of dist along the curve
from the curve start, and returns the point in point. point is in WCS coordinates. Returns
Acad::eOk if successful. If dist is not valid for the curve, then Acad::eInvalidInput is
returned. Other ErrorStatus return values are implementation-dependent. The default
implementation returns Acad::eNotImplemented.
def getPointAtParam(self, param: float) -> PyGe.Point3d:
This function determines the point on the curve that corresponds to the param parameter,
and returns the point in point. point is in WCS coordinates. Returns Acad::eOk if
successful. If the parameter is not within the curve's range, then Acad::eInvalidInput is
returned. Other ErrorStatus return values are implementation-dependent. Returns
Acad::eNotImplemented in the default implementation.
def getProjectedCurve(self, plane: PyGe.Plane, projDir: PyGe.Vector3d) -> Curve:
This function creates a new curve entity that is the result of projecting the curve
parallel to projDir onto the projPlane and sets projCurve to point to the newly created
curve. projCurve is declared as type AcDbCurve in order to allow the returned curve to be
any class derived from AcDbCurve. For example, when an AcDbArc is projected onto a plane,
the result is an AcDbEllipse. The returned curve is dynamically allocated, but has not been
added to an AcDbDatabase yet. The application that calls this function is therefore
responsible for its memory. If the curve is subsequently appended to a database, then the
database takes over responsibility for its memory. Otherwise, the application is
responsible for deleting it when it is no longer needed. Returns Acad::eOk if successful.
If projDir is perpendicular to the projPlane's normal then Acad::eInvalidInput is returned.
For the AutoCAD built-in classes that use ShapeManager (AcDbEllipse, AcDbSpline, AcDbBody,
AcDbRegion, and AcDb3dSolid), Acad::eGeneralModelingFailure is returned if an error occurs
in the ShapeManager modeler. Other ErrorStatus values are implementation-dependent. The
default implementation returns Acad::eNotImplemented.
def getSecondDeriv(self, param: float | PyGe.Point3d) -> PyGe.Vector3d:
Evaluates the second derivative at the location on the curve specified by param and sets
secDeriv to the result (in WCS coordinates). Returns Acad::eOk if successful. If param is
not valid for the curve, then Acad::eInvalidInput is returned. Other ErrorStatus return
values are up to the implementer. For implementation, the AcGe classes provide some of the
necessary functionality to make the job easier. Returns Acad::eNotImplemented in the
default implementation.
def getSpline(self) -> Spline:
This function creates a new AcDbSpline entity, sets it to be as close an approximation as
possible to the curve, and then returns with spline pointing to the newly created spline
entity. The returned spline is dynamically allocated, but has not been added to an
AcDbDatabase yet. So, the application that calls this function is responsible for its
memory. If the spline is subsequently appended to a database, then the database takes over
responsibility for its memory. Otherwise, the application is responsible for deleting it
when it is no longer needed. Returns Acad::eOk if successful. If there is an error in the
ShapeManager modeler (which AcDbSpline uses), then Acad::eGeneralModelingFailure will be
returned. Other ErrorStatus values are implementation-dependent. Returns
Acad::eNotImplemented in the default implementation.
def getSplitCurves(self, paramsOrPoints: list) -> list[PyDb.Curve]:
This function creates one or more entities that are all subcurves of the original. The
points array must contain the points on the curve that are used as the start or end points
of the newly created subcurves. The first subcurve starts at the original curve's start
point and ends at the first point in the points array. The second subcurve starts at the
first point in the points array and ends at the second point in the points array. The third
subcurve starts at the second point and ends at the third, and so on. The last subcurve
starts at the last point in the points array and ends at the original curve's endpoint. If
successive points are coincident (including the original curve's start to the first array
point and the last array point to the original curve's end), then no subcurve is created
for that pair. Pointers to all new curves are appended to the curveSegments array. The
entities that are returned in the curveSegments array are dynamically allocated, but are
not yet added to an AcDbDatabase. So, the application that calls this function is
responsible for their memory. If they are subsequently appended to a database, then the
database takes over responsibility for their memory. Otherwise, the application is
responsible for deleting them when they are no longer needed. Depending on how this
function is implemented, it is possible that the function might return an ErrorStatus other
than Acad::eOk and still have appended some pointers to subcurves to the curveSegments
array (AcDbArc does this). Typically, this would be the result of an invalid point
somewhere in the middle of the points array. So, it is very important to check the size of
the curveSegments array upon return to be sure that any subcurves that are created are
properly dealt with. To use the pointer(s) in the curveSegments array, the calling
application will need to cast the pointer(s) to the appropriate object type(s). For this
function, the objects pointed to by the pointers in the curveSegments array are usually
going to be of the same class as the original curve. However, this is not a requirement. To
be safe, the pointers should be cast using the appropriate class's cast method. Returns
Acad::eOk if successful. If points is empty or any of the points in points are not on the
curve, then Acad::eInvalidInput is returned. As mentioned above, it is possible for this
ErrorStatus to be returned and still have some subcurve pointers appended to the
curveSegments array. For the AutoCAD built-in classes that use ShapeManager (AcDbEllipse,
AcDbSpline, AcDbBody, AcDbRegion, and AcDb3dSolid), Acad::eGeneralModelingFailure is
returned if an error occurs in the ShapeManager modeler. Other ErrorStatus return values
are implementation-dependent. The default implementation returns Acad::eNotImplemented.
def getSplitCurvesAtParam(self, param: float) -> list[PyDb.Curve]:
This function creates one or more entities that are all subcurves of the original. The
points array must contain the points on the curve that are used as the start or end points
of the newly created subcurves. The first subcurve starts at the original curve's start
point and ends at the first point in the points array. The second subcurve starts at the
first point in the points array and ends at the second point in the points array. The third
subcurve starts at the second point and ends at the third, and so on. The last subcurve
starts at the last point in the points array and ends at the original curve's endpoint. If
successive points are coincident (including the original curve's start to the first array
point and the last array point to the original curve's end), then no subcurve is created
for that pair. Pointers to all new curves are appended to the curveSegments array. The
entities that are returned in the curveSegments array are dynamically allocated, but are
not yet added to an AcDbDatabase. So, the application that calls this function is
responsible for their memory. If they are subsequently appended to a database, then the
database takes over responsibility for their memory. Otherwise, the application is
responsible for deleting them when they are no longer needed. Depending on how this
function is implemented, it is possible that the function might return an ErrorStatus other
than Acad::eOk and still have appended some pointers to subcurves to the curveSegments
array (AcDbArc does this). Typically, this would be the result of an invalid point
somewhere in the middle of the points array. So, it is very important to check the size of
the curveSegments array upon return to be sure that any subcurves that are created are
properly dealt with. To use the pointer(s) in the curveSegments array, the calling
application will need to cast the pointer(s) to the appropriate object type(s). For this
function, the objects pointed to by the pointers in the curveSegments array are usually
going to be of the same class as the original curve. However, this is not a requirement. To
be safe, the pointers should be cast using the appropriate class's cast method. Returns
Acad::eOk if successful. If points is empty or any of the points in points are not on the
curve, then Acad::eInvalidInput is returned. As mentioned above, it is possible for this
ErrorStatus to be returned and still have some subcurve pointers appended to the
curveSegments array. For the AutoCAD built-in classes that use ShapeManager (AcDbEllipse,
AcDbSpline, AcDbBody, AcDbRegion, and AcDb3dSolid), Acad::eGeneralModelingFailure is
returned if an error occurs in the ShapeManager modeler. Other ErrorStatus return values
are implementation-dependent. The default implementation returns Acad::eNotImplemented.
def getSplitCurvesAtParams(self, params: list[float]) -> list[PyDb.Curve]:
This function creates one or more entities that are all subcurves of the original. The
points array must contain the points on the curve that are used as the start or end points
of the newly created subcurves. The first subcurve starts at the original curve's start
point and ends at the first point in the points array. The second subcurve starts at the
first point in the points array and ends at the second point in the points array. The third
subcurve starts at the second point and ends at the third, and so on. The last subcurve
starts at the last point in the points array and ends at the original curve's endpoint. If
successive points are coincident (including the original curve's start to the first array
point and the last array point to the original curve's end), then no subcurve is created
for that pair. Pointers to all new curves are appended to the curveSegments array. The
entities that are returned in the curveSegments array are dynamically allocated, but are
not yet added to an AcDbDatabase. So, the application that calls this function is
responsible for their memory. If they are subsequently appended to a database, then the
database takes over responsibility for their memory. Otherwise, the application is
responsible for deleting them when they are no longer needed. Depending on how this
function is implemented, it is possible that the function might return an ErrorStatus other
than Acad::eOk and still have appended some pointers to subcurves to the curveSegments
array (AcDbArc does this). Typically, this would be the result of an invalid point
somewhere in the middle of the points array. So, it is very important to check the size of
the curveSegments array upon return to be sure that any subcurves that are created are
properly dealt with. To use the pointer(s) in the curveSegments array, the calling
application will need to cast the pointer(s) to the appropriate object type(s). For this
function, the objects pointed to by the pointers in the curveSegments array are usually
going to be of the same class as the original curve. However, this is not a requirement. To
be safe, the pointers should be cast using the appropriate class's cast method. Returns
Acad::eOk if successful. If points is empty or any of the points in points are not on the
curve, then Acad::eInvalidInput is returned. As mentioned above, it is possible for this
ErrorStatus to be returned and still have some subcurve pointers appended to the
curveSegments array. For the AutoCAD built-in classes that use ShapeManager (AcDbEllipse,
AcDbSpline, AcDbBody, AcDbRegion, and AcDb3dSolid), Acad::eGeneralModelingFailure is
returned if an error occurs in the ShapeManager modeler. Other ErrorStatus return values
are implementation-dependent. The default implementation returns Acad::eNotImplemented.
def getSplitCurvesAtPoint(self, point: PyGe.Point3d) -> list[PyDb.Curve]:
This function creates one or more entities that are all subcurves of the original. The
points array must contain the points on the curve that are used as the start or end points
of the newly created subcurves. The first subcurve starts at the original curve's start
point and ends at the first point in the points array. The second subcurve starts at the
first point in the points array and ends at the second point in the points array. The third
subcurve starts at the second point and ends at the third, and so on. The last subcurve
starts at the last point in the points array and ends at the original curve's endpoint. If
successive points are coincident (including the original curve's start to the first array
point and the last array point to the original curve's end), then no subcurve is created
for that pair. Pointers to all new curves are appended to the curveSegments array. The
entities that are returned in the curveSegments array are dynamically allocated, but are
not yet added to an AcDbDatabase. So, the application that calls this function is
responsible for their memory. If they are subsequently appended to a database, then the
database takes over responsibility for their memory. Otherwise, the application is
responsible for deleting them when they are no longer needed. Depending on how this
function is implemented, it is possible that the function might return an ErrorStatus other
than Acad::eOk and still have appended some pointers to subcurves to the curveSegments
array (AcDbArc does this). Typically, this would be the result of an invalid point
somewhere in the middle of the points array. So, it is very important to check the size of
the curveSegments array upon return to be sure that any subcurves that are created are
properly dealt with. To use the pointer(s) in the curveSegments array, the calling
application will need to cast the pointer(s) to the appropriate object type(s). For this
function, the objects pointed to by the pointers in the curveSegments array are usually
going to be of the same class as the original curve. However, this is not a requirement. To
be safe, the pointers should be cast using the appropriate class's cast method. Returns
Acad::eOk if successful. If points is empty or any of the points in points are not on the
curve, then Acad::eInvalidInput is returned. As mentioned above, it is possible for this
ErrorStatus to be returned and still have some subcurve pointers appended to the
curveSegments array. For the AutoCAD built-in classes that use ShapeManager (AcDbEllipse,
AcDbSpline, AcDbBody, AcDbRegion, and AcDb3dSolid), Acad::eGeneralModelingFailure is
returned if an error occurs in the ShapeManager modeler. Other ErrorStatus return values
are implementation-dependent. The default implementation returns Acad::eNotImplemented.
def getSplitCurvesAtPoints(self, points: list[PyGe.Point3d]) -> list[PyDb.Curve]:
This function creates one or more entities that are all subcurves of the original. The
points array must contain the points on the curve that are used as the start or end points
of the newly created subcurves. The first subcurve starts at the original curve's start
point and ends at the first point in the points array. The second subcurve starts at the
first point in the points array and ends at the second point in the points array. The third
subcurve starts at the second point and ends at the third, and so on. The last subcurve
starts at the last point in the points array and ends at the original curve's endpoint. If
successive points are coincident (including the original curve's start to the first array
point and the last array point to the original curve's end), then no subcurve is created
for that pair. Pointers to all new curves are appended to the curveSegments array. The
entities that are returned in the curveSegments array are dynamically allocated, but are
not yet added to an AcDbDatabase. So, the application that calls this function is
responsible for their memory. If they are subsequently appended to a database, then the
database takes over responsibility for their memory. Otherwise, the application is
responsible for deleting them when they are no longer needed. Depending on how this
function is implemented, it is possible that the function might return an ErrorStatus other
than Acad::eOk and still have appended some pointers to subcurves to the curveSegments
array (AcDbArc does this). Typically, this would be the result of an invalid point
somewhere in the middle of the points array. So, it is very important to check the size of
the curveSegments array upon return to be sure that any subcurves that are created are
properly dealt with. To use the pointer(s) in the curveSegments array, the calling
application will need to cast the pointer(s) to the appropriate object type(s). For this
function, the objects pointed to by the pointers in the curveSegments array are usually
going to be of the same class as the original curve. However, this is not a requirement. To
be safe, the pointers should be cast using the appropriate class's cast method. Returns
Acad::eOk if successful. If points is empty or any of the points in points are not on the
curve, then Acad::eInvalidInput is returned. As mentioned above, it is possible for this
ErrorStatus to be returned and still have some subcurve pointers appended to the
curveSegments array. For the AutoCAD built-in classes that use ShapeManager (AcDbEllipse,
AcDbSpline, AcDbBody, AcDbRegion, and AcDb3dSolid), Acad::eGeneralModelingFailure is
returned if an error occurs in the ShapeManager modeler. Other ErrorStatus return values
are implementation-dependent. The default implementation returns Acad::eNotImplemented.
def getStartParam(self) -> float:
This function returns with startParam set to the start parameter on the curve. Returns
Acad::eOk if successful. Returns Acad::eNotImplemented in the default implementation.
def getStartPoint(self) -> PyGe.Point3d:
This function returns with startPoint set to the start point (in WCS coordinates) of the
curve. Returns Acad::eOk if successful, and Acad::eNotImplemented in the default
implementation.
def isClosed(self) -> bool:
This function returns Adesk::kTrue if, and only if, the curve is closed; that is, its start
point is identical to its end point. Otherwise, it returns Adesk::kFalse. Returns
Acad::kFalse in the default implementation.
def isPeriodic(self) -> bool:
This function returns Adesk::kTrue if, and only if, the curve has an infinite range in both
directions and there is a period value T such that there is a point on curve at (u + T) =
point on curve (u), for any parameter u. If the curve is not periodic, then Adesk::kFalse
is returned. The default implementation returns Adesk::kFalse.
def reverseCurve(self) -> None:
Reverses the parameterization of the curve. The start becomes the end and visa versa.
def setFromAcGeCurve(self, curve: PyGe.Curve3d, normal: PyGe.Vector3d, tol: PyGe.Tol) -> None:
This is setFromAcGeCurve, a member of class AcDbCurve.
class Database Class
def UCSTableId(self) -> ObjectId:
Returns the object ID of the database's AcDbUCSTable.
def __init__(self, buildDefaultDrawing: bool, noDocument: bool) -> None:
Default constructor.If buildDefaultDrawing == true, then the new AcDbDatabase object
contains the minimum necessary for a complete database. If buildDefaultDrawing == false,
then the new AcDbDatabase object is completely empty. If noDocument = true, then the newly
created database will not be associated with the current document; otherwise it will.
def __reduce__(self) -> Any:
def abortDeepClone(self, idmap: PyDb.IdMapping) -> None:
Triggers an AcEditor notification that the deepClone operation identified by idMap has been
aborted. The AcDbIdMapping object will uniquely identify a deepClone operation.
def acadDatabase(self) -> PyAx.AcadDatabase:
Returns the ActiveX instance of the database (AcadDatabase)
def addObject(self, object: PyDb.DbObject) -> ObjectId:
Adds the object pointed to by pObj to the database, giving it a handle and an object ID.
def addReactor(self, reactor: PyDb.DatabaseReactor) -> None:
Adds the reactor object pointed to by pReactor to the reactor list for the database.
def addToBlock(self, btrid: PyDb.ObjectId, entity: PyDb.Entity | list[PyDb.Entity]) -> ObjectId:
def addToCurrentspace(self, entity: PyDb.Entity | list[PyDb.Entity]) -> ObjectId:
A convenience method to append an entity, or a list of entities to the current space
BlockTableRecord. Returns an ObjectId or list of ObjectIds, throws on error. This function
does not close the entities
def addToModelspace(self, entity: PyDb.Entity | list[PyDb.Entity]) -> ObjectId:
A convenience method to append an entity, or a list of entities to the modelspace
BlockTableRecord. Returns an ObjectId or list of ObjectIds, throws on error. This function
does not close the entities
def angbase(self) -> float:
Returns the current ANGBASE value for the database. See the System Variables section of the
AutoCAD Command Reference for information on ANGBASE.
def angdir(self) -> bool:
Returns the current ANGDIR value for the database. The value of false is 0. The value of
true is 1. See the System Variables section of the AutoCAD Command Reference for
information on ANGDIR.
def annoAllVisible(self) -> bool:
Returns the current ANNOALLVISIBLE value for the database See the System Variables section
of the AutoCAD Command Reference for information on ANNOALLVISIBLE. This is an AcDbDatabase
Header Variable Query Function.
def annotativeDwg(self) -> bool:
Controls whether the drawing is treated as an annotative block when it is inserted into
other drawings. True to treat the drawing as an annotative block when it is inserted into
other drawings, false otherwise. The default value for new databases is false.
def approxNumObjects(self) -> int:
This method returns a value that is at least as large as the number of objects in the
database. The purpose of this function is to provide a way to determine how large an
AcDbObjectIdArray will be required in order to hold all the objects in the database. Thus
the array can be created with the proper initial size instead of growing the array as the
objects are appended. For large arrays, this can result in a very noticeable performance
gain and greatly reduce memory fragmentation.
def attmode(self) -> int:
Returns the current ATTMODE value for the database. See the System Variables section of the
AutoCAD Command Reference for information on ATTMODE.
def aunits(self) -> int:
Returns the current AUNITS value for the database. See the System Variables section of the
AutoCAD Command Reference for information on AUNITS.
def auprec(self) -> int:
Returns the current AUPREC value for the database. See the System Variables section of the
AutoCAD Command Reference for information on AUPREC.
def blipmode(self) -> bool:
Beginning with AutoCAD 2000, the BLIPMODE system variable value is no longer saved in the
database. This function always returns Acad::eNotApplicable. To get this system variable
for an AutoCAD session, please use the acedGetVar() function. See the System Variables
section of the AutoCAD Command Reference for information on BLIPMODE.
def blockTableId(self) -> ObjectId:
Returns the object ID of the database's AcDbBlockTable.
def byBlockLinetype(self) -> ObjectId:
Returns the object ID of the BYBLOCK AcDbLinetypeTableRecord for the database.
def byBlockMaterial(self) -> ObjectId:
Returns the object ID of the 'By Block' material.
def byLayerLinetype(self) -> ObjectId:
Returns the object ID of the BYLAYER AcDbLinetypeTableRecord for the database.
def byLayerMaterial(self) -> ObjectId:
This function returns the object ID of the 'ByLayer' material.
def cDynDisplayMode(self) -> int:
Returns the current CDYNDISPLAYMODE value for the database. It is a drawing variable unique
across different drawing files.
def cameraDisplay(self) -> bool:
Returns true if camera should be displayed and false otherwise.
def cameraHeight(self) -> float:
Returns the value of CAMERAHEIGHT system variable.This value is used as the default when
creating new cameras.
def celtscale(self) -> float:
Returns the current CELTSCALE value for the database. See the System Variables section of
the AutoCAD Command Reference for information on CELTSCALE.
def celtype(self) -> ObjectId:
Returns the object ID of the linetype specified by the current CELTYPE value of the
database. See the System Variables section of the AutoCAD Command Reference for information
on CELTYPE.
def celweight(self) -> LineWeight:
Returns an AcDb::LineWeight value indicating what the current line weight is for the
database. See the System Variables section of the AutoCAD Command Reference for information
on CELWEIGHT.
def chamfera(self) -> float:
Returns the current CHAMFERA value for the database. See the System Variables section of
the AutoCAD Command Reference for information on CHAMFERA.
def chamferb(self) -> float:
Returns the current CHAMFERB value for the database. See the System Variables section of
the AutoCAD Command Reference for information on CHAMFERB.
def chamferc(self) -> float:
Returns the current CHAMFERC value for the database. See the System Variables section of
the AutoCAD Command Reference for information on CHAMFERC.
def chamferd(self) -> float:
Returns the current CHAMFERD value for the database. See the System Variables section of
the AutoCAD Command Reference for information on CHAMFERD.
def classDxfName(self, pClass: PyRx.RxClass) -> str:
This function returns a pointer to the DXF name for this database.
def className() -> str:
def clayer(self) -> ObjectId:
Returns the object ID of the LAYER specified by the current CLAYER value of the database.
See the System Variables section of the AutoCAD Command Reference for information on
CLAYER.
def closeInput(self, close: bool) -> None:
If a drawing file is associated with this database, then this function forces an immediate
read of all necessary information from the file into the database object. If bCloseFile is
true, the drawing file will be closed when it has been fully read into the AcDbDatabase.
Returns Acad::eOk if successful.
def cmaterial(self) -> ObjectId:
The default material assignment is 'ByLayer'. That is, by default, this function returns
the same object ID as byLayerMaterial(). Returns the object ID of the current material.
def cmljust(self) -> int:
Returns the current CMLJUST value for the database. See the System Variables section of the
AutoCAD Command Reference for information on CMLJUST.
def cmlscale(self) -> float:
Returns the current CMLSCALE value for the database. See the System Variables section of
the AutoCAD Command Reference for information on CMLSCALE.
def cmlstyleID(self) -> ObjectId:
Returns the object ID of the MlineStyle specified by the current CMLSTYLEID value of the
database. See the System Variables section of the AutoCAD Command Reference for information
on CMLSTYLEID.
def colorDictionaryId(self) -> ObjectId:
Returns the object ID of the database's color dictionary. See getColorDictionary() for
information on the color dictionary and its use.
def continuousLinetype(self) -> ObjectId:
Returns the object ID of the continuous linetype AcDbLinetypeTableRecord for the database.
def coords(self) -> int:
Beginning with AutoCAD 2000, the COORDS system variable value is no longer saved in the
database. This function always returns Acad::eNotApplicable. To get this system variable
for an AutoCAD session, please use the acedGetVar() function. See the System Variables
section of the AutoCAD Command Reference for information on COORDS.
def countEmptyObjects(self, flag: int) -> int:
Counts the empty objects (zero length curves and/or empty TEXT/MTEXT) in the database.
def countHardReferences(self, ids: list[PyDb.ObjectId]) -> int:
This function traverses the database looking for objects with a hard reference to any of
the objects whose objectId entities are in the ids array. Each time such a hard reference
is found, the count will be incremented by 1 within the element of pCount that corresponds
to the ids element of the objectId that is being hard referenced. For example, if a hard
reference is found to the objectId in ids[2], then pCount[2] will be incremented by 1. It
is the caller's responsibility to make sure the elements of pCount are zero (or whatever
other value is desired). This function will simply increment whatever value is there. It is
also the caller's responsibility to be sure that the ids and pCount arrays are the same
size. Returns Acad::eOk if successful.
def currentLayoutId(self) -> ObjectId:
def currentSpace(self, mode: PyDb.OpenMode) -> BlockTableRecord:
def currentSpaceId(self) -> ObjectId:
Returns the object ID of the AcDbBlockTableRecord of the current space (e.g., model space
or paper space.)
def deepCloneObjects(self, ids: list[PyDb.ObjectId], owner: PyDb.ObjectId, idmap: PyDb.IdMapping, deferXlation: bool) -> None:
Clones all objects in the objectId array and appends them to the container object specified
by owner. The idMap is filled with AcDbIdPair objects that contain the objectId entities of
the original and cloned object pairs. This array can be used for post-processing the
objects involved in the deepClone operation. When the objects to be cloned do not all have
the same owner, then it is necessary to make up individual AcDbObjectIdArray entities, each
one containing all the objects with the same owner. The deepCloneObject method is then
called once for each array, with the deferXlation argument set to Adesk::kTrue for all but
the last call. Refer to the ObjectARX Developer's Guide for more information on the use of
this function. When the new objects are assigned owners, layout objects trigger an assert
that the owner is the destination database's layout dictionary and the layout is given a
name in the dictionary that matches the name stored inside the layout. (The default
behavior for dictionary-owned objects would be to give it an anonymous name like '*A1'.)
def detailViewStyle(self) -> ObjectId:
This method gets the Object ID of the current detail view style.
def detailViewStyleDictionaryId(self) -> ObjectId:
This method returns the Object ID of the AcDbDictionary that contains the detail view
styles.
def dimAssoc(self) -> int:
Returns the current DIMASSOC value for the database. See the System Variables section of
the AutoCAD Command Reference for information on DIMASSOC.
def dimStyleTableId(self) -> ObjectId:
Returns the object ID of the database's AcDbDimStyleTable.
def dimapost(self) -> str:
This function creates a copy of the database's DIMAPOST value and sets pOutput to point to
the copy. The caller is responsible for deallocating the returned string with
acutDelString() or equivalent. Returns Acad::eOk if successful.
def dimaso(self) -> bool:
Returns the current DIMASO value for the database. The value of false is 0. The value of
true is 1. See the System Variables section of the AutoCAD Command Reference for
information on DIMASO.
def dimblk(self) -> ObjectId:
In AutoCAD R14 and later, this function sets sOutput to either a valid block name or an
empty string. If you call setDimblk*() with a '.', a subsequent call to getdimblk*() should
return an empty string.
def dimblk1(self) -> ObjectId:
In AutoCAD R14 and later, this function sets sOutput to either a valid block name or an
empty string. If you call setDimblk*() with a '.', a subsequent call to getdimblk*() should
return an empty string.
def dimblk2(self) -> ObjectId:
In AutoCAD R14 and later, this function sets sOutput to either a valid block name or an
empty string. If you call setDimblk*() with a '.', a subsequent call to getdimblk*() should
return an empty string.
def dimfit(self) -> int:
Returns the Release 14 DIMFIT value for the database. DIMFIT has been deprecated in favor
of DIMATFIT and DIMTMOVE. See the System Variables section of the AutoCAD Command Reference
for information on DIMATFIT and DIMTMOVE. This method may be removed in future releases.
def dimpost(self) -> str:
This function creates a copy of the database's DIMPOST value and set pOutput to point the
copy. The caller is responsible for deallocating the returned string using acutDelString()
or equivalent. Returns Acad::eOk if successful.
def dimsho(self) -> bool:
Returns the current DIMSHO value for the database. The value of false is 0. The value of
true is 1. See the System Variables section of the AutoCAD Command Reference for
information on DIMSHO.
def dimstyle(self) -> ObjectId:
Returns the object ID of the dimstyle specified by the current DIMSTYLE value of the
database. See the System Variables section of the AutoCAD Command Reference for information
on DIMSTYLE.
def dimunit(self) -> int:
Returns the Release 14 DIMUNIT value for the database. DIMUNIT has been deprecated in favor
of DIMLUNIT and DIMFRAC. See the System Variables section of the AutoCAD Command Reference
for information on DIMLUNIT and DIMFRAC. Returns the Release 14 DIMFIT value for the
database. This method may be removed in future releases.
def disablePartialOpen(self) -> None:
When called during partial open notification, this function vetoes the partial open
operation and causes the entire drawing database to be loaded.
def disableUndoRecording(self, disable: bool) -> None:
This function turns Undo recording on or off for operations performed on the database. If
disable==Adesk::kTrue, then Undo recording is turned off. If disable==Adesk::kFalse, then
Undo recording is turned on. If Undo recording is already set to what disable is
specifying, then the call is ignored. This function does not erase any existing Undo
information. It only turns the Undo recorder on and off for the database.
def dispSilh(self) -> bool:
Returns the current DISPSILH value for the database. The value of false is 0. The value of
true is 1. See the System Variables section of the AutoCAD Command Reference for
information on DISPSILH.
def dragVisStyle(self) -> ObjectId:
Returns the visual style set in the DRAGVS system variable. See the System Variables
section of the AutoCAD Command Reference for information on DRAGVS.
def dragmode(self) -> int:
Beginning with AutoCAD 2000, the DRAGMODE system variable value is no longer saved in the
database. This function always returns Acad::eNotApplicable. To get this system variable
for an AutoCAD session, please use the acedGetVar() function. See the System Variables
section of the AutoCAD Command Reference for information on DRAGMODE.
def drawOrderCtl(self) -> int:
Returns the value of the DRAWORDERCTL system variable, which enables users to revert to
legacy draw order mode if required. This system variable is per drawing in order to be
consistent with SORTENTS. The return values are defined as follows: 0 Full draw order
functionality. 1 In-place graphic updates are disabled. When this bit is set, objects that
are edited appear in front of other objects. It is important to note that this is actually
not guaranteed to be their location after doing a manual REGEN, saving the file, closing it
and reopening it, or when plotting. 2 Setting this bit disables inheritance of objects
derived from other objects, such as split objects. When off, the new line created from a
split line will be in front of all objects, and the old line will keep its existing draw
order. 3 Both in-place editing and inheritance of objects derived from other objects are
disabled.
def dwfframe(self) -> int:
Returns the current DWFFRAME value for the database. See the System Variables section of
the AutoCAD Command Reference for information on DWFFRAME.
def dwgFileWasSavedByAutodeskSoftware(self) -> bool:
This method returns true if it determines that the database was last saved by Autodesk
software (such as AutoCAD or AutoCAD LT).
def dxfIn(self, filename: str) -> None:
This function reads a DXF file from the stream pointed to by pInputStream to the database.
This function does not close or delete the stream when it is done. The default for
logFilename is no output file. When there is no output file, warning/error messages will be
output character-by-character through the displayChar() method in
AcDbHostApplicationServices.
def dxfOut(self, dxfFilename: str, precision: int, dwgVer: PyDb.DwgVersion, saveThumbnailImage: bool) -> None:
This function creates a DXF file and returns Acad::eOk if successful.
def elevation(self) -> float:
Returns the current Model Space ELEVATION value for the database. See the System Variables
section of the AutoCAD Command Reference for information on ELEVATION.
def eraseEmptyObjects(self, flag: int) -> int:
Erase empty objects (zero length curves and/or empty TEXT/MTEXT) in the database.
def extmax(self) -> PyGe.Point3d:
Returns an AcGePoint3d, which is the current Model Space EXTMAX value for the database. See
the System Variables section of the AutoCAD Command Reference for information on EXTMAX.
def extmin(self) -> PyGe.Point3d:
Returns an AcGePoint3d, which is the current Model Space EXTMIN value for the database. See
the System Variables section of the AutoCAD Command Reference for information on EXTMIN.
def facetres(self) -> float:
Returns the current FACETRES value for the database. See the System Variables section of
the AutoCAD Command Reference for information on FACETRES.
def filletrad(self) -> float:
Returns the current FILLETRAD value for the database. See the System Variables section of
the AutoCAD Command Reference for information on FILLETRAD.
def fillmode(self) -> bool:
Returns the current FILLMODE value for the database. The value of false is 0. The value of
true is 1. See the System Variables section of the AutoCAD Command Reference for
information on FILLMODE.
def forceWblockDatabaseCopy(self) -> None:
This function causes the next (and only the next) AcDbDatabase::wblock() call on this
database to result in a copy of the database. (A database copy was always done by ObjectARX
SDK 1.0 and 1.1.) Using this function results in a slower wblock operation and an increase
in memory requirements. Therefore, this method should only be used if your application does
special handling during WBLOCK* notifications, which can only be done if the WBLOCK* copies
the database.
def geoCoordinateSystemId(self) -> str:
This is geoCoordinateSystemId, a member of class AcDbDatabase.
def geoMarkerVisibility(self) -> bool:
Returns the geo marker visibility value.
def get3dDwfPrec(self) -> float:
Returns the 3D DWF precision setting in this database.
def getBlockTable(self, mode: PyDb.OpenMode) -> BlockTable:
Opens the database's block table in the mode specified by mode. The pTable pointer is
filled in with the address of the block table. Returns Acad::eOk if open is successful.
def getBlocks(self) -> dict[str, PyDb.ObjectId]:
Returns a Python dictionary of all the blocks in this database {str, ObjectId}
def getCePlotStyleNameId(self) -> PlotStyleNameType:
This function returns the current entity plot style name type, which can be one of the
values in the following table: AcDb::kPlotStyleNameByLayer Uses the plot style name of the
layer table record referenced by the entity AcDb::kPlotStyleNameByBlock Uses the plot style
name of the AcDbBlockReference that displays the entity. AcDb::kPlotStyleNameIsDictDefault
Uses the PlotStyleName dictionary's default entry AcDb::kPlotStyleNameById Uses the
PlotStyleName dictionary entry whose object ID is returned by this function. If the type is
AcDb::kPlotStyleNameById, the id argument is set to the plot style name ID stored in the
database's header. If the type is anything else, id is set to kNull.
def getDimstyleParentId(self) -> ObjectId:
Given a child dimension style ID, this function returns the parent dimension style ID. If
the parent is unavailable, the given child dimension style ID is returned.
def getFilename(self) -> str:
Gets the filename associated with this database, if any. Acad::eOk is returned when there
is an associated filename, and Acad::eNotApplicable is returned when the filename is NULL.
WarningAs the const qualifier indicates, no attempt should be made to deallocate the
returned string.
def getLayerStateManager(self) -> LayerStateManager:
getLayerStateManager() returns a pointer to the current AcDbLayerStateManager object.
def getNearestLineWeight(weight: int) -> LineWeight:
The getNearestLineWeight() method takes a lineweight and returns the nearest
AcDb::LineWeight enum value. For example, if you pass in 4, then the value AcDb::kLnWt005
is returned.
def getObjectId(self, createIfNotFound: bool, objHandle: Handle, xRefId: int) -> ObjectId:
Fills in retId with the objectId of the object that has the handle value contained in
objHandle. If createIfNotFound is true and the handle is not found in the database, then a
new objectId stub object is created using the handle sought. Use of the createIfNotFound
argument is intended for AutoCAD internal use only (there is no way for an ObjectARX
program to do anything with a objectId stub object that is not associated with any database
object), so ObjectARX programs should always set this argument to false. Returns Acad::eOk
if successful. If createIfNotFound is set to false and the handle is not found, then
Acad::eUnknownHandle is returned.
def getSectionManagerId(self) -> ObjectId:
This function returns the object ID of the section manager. The ID may be null if the
database has never contained any section planes since it's creation.
def getViewportArray(self, val: bool) -> list[PyDb.ObjectId]:
This function enumerates the AcDbViewports in a drawing. These are the viewports in
layouts, in other words, tilemode 0.
def getVisualStyleList(self) -> list[str]:
This function returns a list containing the localized names of the visual styles defined in
the visual style dictionary. Anonymous visual styles and visual styles marked for internal
use only are excluded from this list. Returns Acad::eOk if successful, or
Acad::eKeyNotFound if the visual style dictionary does not exist. To query the visual style
dictionary for object IDs of the default visual styles, you must get the internal name of
the visual style from the localized name returned by this function.
def globalMaterial(self) -> ObjectId:
Returns the object Id of the global material.
def groupDictionaryId(self) -> ObjectId:
Returns the object ID of the database's Group dictionary.
def haloGap(self) -> int:
Returns the current HALOGAP value for the database. See the System Variables section of the
AutoCAD Command Reference for information on HALOGAP.
def handseed(self) -> Handle:
Returns the current HANDSEED value for the database. The HANDSEED is a counter which
maintains the next available handle number. Handles are 64-bit integers represented in DXF
and LISP/ADS in hexadecimal form as a string. In hexadecimal, a 64-bit integer can be up to
16 digits.
def hasClass(self, pClass: PyRx.RxClass) -> bool:
This function returns true if the class represented by the AcRxClass object pointed to by
pClass is present in the class dictionary of this AcDbDatabase. Otherwise false is
returned.
def hideText(self) -> int:
Returns the current HIDETEXT value for the database. See the System Variables section of
the AutoCAD Command Reference for information on HIDETEXT.
def hpInherit(self) -> bool:
Returns a bool indicating the current HPINHERIT value for the database. See the System
Variables section of the AutoCAD Command Reference for information on HPINHERIT.
def hpOrigin(self) -> PyGe.Point2d:
Returns a 2D point that is the current HPORIGIN value for the database. See the System
Variables section of the AutoCAD Command Reference for information on HPORIGIN.
def indexctl(self) -> int:
Returns the INDEXCTL header variable value.
def insert(self, blockId: PyDb.ObjectId, pBlockName: str, db: PyDb.Database, preserveSourceDatabase: bool) -> None:
def insert(self, blockId: PyDb.ObjectId, pBlockName: str, pDestinationBlockName: str, db: PyDb.Database, preserveSourceDatabase: bool) -> None:
def insert(self, xform: PyGe.Matrix3d, db: PyDb.Database, preserveSourceDatabase: bool) -> None:
def insert(*args) -> None:
def insunits(self) -> UnitsValue:
Returns the current INSUNITS value for the database. See the System Variables section of
the AutoCAD Command Reference for information on INSUNITS.
def interfereVpVisStyle(self) -> ObjectId:
Returns the visual style for for the viewport while checking for interference objects as
defined by the INTERFEREVPVS system variable. See the System Variables section of the
AutoCAD Command Reference for information on INTERFEREVPVS.
def intersectColor(self) -> int:
Returns the INTERSECTIONCOLOR header variable value for the database. See the System
Variables section of the AutoCAD Command Reference for information on INTERSECTIONCOLOR.
def intersectDisplay(self) -> int:
Returns the INTERSECTIONDISPLAY header variable value for the database. See the System
Variables section of the AutoCAD Command Reference for information on INTERSECTIONDISPLAY.
def isAppRegistered(self, pszAppName: str) -> bool:
Checks for a registered application name.
def isBeingDestroyed(self) -> bool:
Finds out if this database is in the process of being destroyed.
def isEMR(self) -> bool:
Returns the EMR flag for the database. The EMR flag gets set when a drawing is saved by an
EMR (Student Version) product.false is returned if the drawing was never saved by an EMR
producttrue is returned if the drawing was saved by an EMR product at least once
def isObjectNonPersistent(id: ObjectId) -> bool:
Returns true if the object denoted by id is non-persistent. Otherwise, returns false.
def isPartiallyOpened(self) -> bool:
Returns true if the database is in a partially opened state; false otherwise.
def isPucsOrthographic(self, orthoView: OrthographicView) -> bool:
Returns false if the database's paper space UCS does not have an orthographic view whose
reference UCS matches the database's PUCSBASE system variable. If this function returns
true, then orthoView is set to the orthographic view of the UCS. For more information about
UCS orthographic views, see AcDbUcsTableRecord::setUcsBaseOrigin(),
AcDbUcsTableRecord::ucsBaseOrigin(), and the UCS command's Orthographic option
documentation in the AutoCAD Command Reference. WarningThe database pointer returned by
AcDbHostApplicationServices::workingDatabase() at the time this function is called must
point to this AcDbDatabase object. Otherwise, this function generates incorrect results.
def isUcsOrthographic(self, orthoView: OrthographicView) -> bool:
Returns false if the database's model space UCS does not have an orthographic view whose
reference UCS matches the database's UCSBASE system variable. If this function returns
true, then orthoView is set to the orthographic view of the UCS. For more information about
UCS orthographic views, see AcDbUcsTableRecord::setUcsBaseOrigin(),
AcDbUcsTableRecord::ucsBaseOrigin(), and the UCS command's Orthographic option
documentation in the AutoCAD Command Reference. WarningThe database pointer returned by
AcDbHostApplicationServices::workingDatabase() at the time this function is called must
point to this AcDbDatabase object. Otherwise, this function generates incorrect results.
def isValidLineWeight(weight: int) -> bool:
Returns true for lineweights that match one of the predefined lineweights, and false
otherwise.
def isolines(self) -> int:
Returns the current ISOLINES value for the database. See the System Variables section of
the AutoCAD Command Reference for information on ISOLINES.
def joinStyle(self) -> JoinStyle:
Returns the database's joinstyle header variable value, which may be one of the following:
AcDb::kJnStylNone, AcDb::kJnStylRound, AcDb::kJnStylAngle, AcDb::kJnStylFlat.
def lastSavedAsMaintenanceVersion(self) -> int:
Returns the maintenance version that the current drawing was last saved as in the current
session. If the current session has not yet done a save on this drawing, then it returns
zero.
def lastSavedAsVersion(self) -> int:
Returns the version that the current drawing was last saved as in the current session. If
the current session has not yet done a save on this drawing, then it returns zero.
def latitude(self) -> float:
Returns the latitude for the location of the model, in decimal degrees. Allowable values
are -90 to +90 degrees, where positive numbers represent North latitudes. The drawing
latitude, longitude, and north direction are used by the Sun, along with the Sun's date and
time, to calculate the correct angle for sunlight.
def layerEval(self) -> int:
Returns the LAYEREVAL header variable value.
def layerNotify(self) -> int:
Returns the LAYERNOTIFY header variable value. A negative value indicates that all layer
notification is turned off, while preserving the state of individual layer notification
flags.
def layerTableId(self) -> ObjectId:
Returns the object ID of the database's AcDbLayerTable.
def layerZero(self) -> ObjectId:
Returns the object ID of the layer 0 AcDbLayerTableRecord for the database.
def layoutDictionaryId(self) -> ObjectId:
Retrieves the object ID of the ACAD_LAYOUT dictionary, which contains objects of type
AcDbLayout. The Layout dictionary stores characteristics of each Paper Space layout.
def lensLength(self) -> float:
Returns the value of LENSLENGTH system variable.
def lightGlyphDisplay(self) -> int:
Controls whether light objects are displayed in the viewport. Returns 1 if light objects
are displayed, 0 if not.
def lightingUnits(self) -> int:
Gets the lighting units for the drawing, where 0 = Generic, 1 = International, and 2 =
American.
def lightsInBlocks(self) -> bool:
Returns true if all lights in blocks are ignored and do not contribute lighting to the
scene.
def limcheck(self) -> bool:
Returns the current Model Space LIMCHECK value for the database. The value of false is 0.
The value of true is 1. See the System Variables section of the AutoCAD Command Reference
for information on LIMCHECK.
def limmax(self) -> PyGe.Point2d:
Returns an AcGePoint2d (in WCS coordinates), which is the current Model Space LIMMAX value
for the database. See the System Variables section of the AutoCAD Command Reference for
information on LIMMAX.
def limmin(self) -> PyGe.Point2d:
Returns an AcGePoint2d (in WCS coordinates), which is the current Model Space LIMMIN value
for the database. See the System Variables section of the AutoCAD Command Reference for
information on LIMMIN.
def lineWeightDisplay(self) -> bool:
Returns an Adesk::kTrue if line weight display is on or Adesk::kFalse if line weight
display is off. See the System Variables section of the AutoCAD Command Reference for
information on LWDISPLAY.
def linetypeTableId(self) -> ObjectId:
Returns the object ID of the database's AcDbLinetypeTable.
def loadLineTypeFile(self, ltn: str, filename: str) -> None:
This function loads the linetype specified by ltn from the file specified by filename and
stores it in the database on which this method is called. The ltn parameter may contain
wild card characters (see acutWcMatch() for more information on wild card usage). If wild
cards are used, multiple linetypes may be loaded. If filename is not a URL and does not
contain a path, then the AutoCAD library search path is searched for the file. Returns
Acad::eOk if successful. Returns Acad::eNullObjectPointer if ltn or filename is null.
Returns Acad::eFileSystemErr if the specified file cannot be opened. Returns
Acad::eUndefinedLineType if the linetype name specified by ltn is not found in the file.
Returns Acad::eBadLinetypeName if the file contains a malformed record, or a syntax error
is encountered. Returns an appropriate Internet-specific Acad::ErrorStatus value if a URL
is specified and the transfer is not successful.
def loftAng1(self) -> float:
Returns the current LOFTANG1 value for the database. See the System Variables section of
the AutoCAD Command Reference for information on LOFTANG1.
def loftAng2(self) -> float:
Returns the current LOFTANG2 value for the database. See the System Variables section of
the AutoCAD Command Reference for information on LOFTANG2.
def loftMag1(self) -> float:
Returns the current LOFTMAG1 value for the database. See the System Variables section of
the AutoCAD Command Reference for information on LOFTMAG1.
def loftMag2(self) -> float:
Returns the current LOFTMAG2 value for the database. See the System Variables section of
the AutoCAD Command Reference for information on LOFTMAG2.
def loftNormals(self) -> int:
Returns the current LOFTNORMALS value for the database. See the System Variables section of
the AutoCAD Command Reference for information on LOFTNORMALS.
def loftParam(self) -> int:
Returns the current LOFTPARAM value for the database. See the System Variables section of
the AutoCAD Command Reference for information on LOFTPARAM.
def longitude(self) -> float:
Returns the longitude for the location of the model, in decimal degrees. Allowable values
are -180 to +180 degrees, where positive numbers represent East longitudes. The drawing
latitude, longitude, and north direction are used by the Sun, along with the Sun's date and
time, to calculate the correct angle for sunlight.
def ltscale(self) -> float:
Returns the current LTSCALE value for the database. See the System Variables section of the
AutoCAD Command Reference for information on LTSCALE.
def lunits(self) -> int:
Returns the current LUNITS value for the database. See the System Variables section of the
AutoCAD Command Reference for information on LUNITS.
def luprec(self) -> int:
Returns the current LUPREC value for the database. See the System Variables section of the
AutoCAD Command Reference for information on LUPREC.
def mLStyleDictionaryId(self) -> ObjectId:
Returns the object ID of the database's MLStyle dictionary.
def maintenanceReleaseVersion(self) -> int:
Used to determine which point release of AutoCAD created this database. Returns the
following: R14 0 R14.1 1 R14.2 2 etc.
def markObjectNonPersistent(id: ObjectId, value: bool) -> None:
Marks an object non-persistent or persistent. Objects in the drawing database are
persistent by default (if they have an owner). This function allows objects to be marked
non-persistent. Returns Acad::eNullObjectId if id is AcDbObject::kNull. May return any
value returned by the acdbOpenObject() global function.
def materialDictionaryId(self) -> ObjectId:
Retrieves the object ID of the ACAD_MATERIAL dictionary, which contains objects of type
AcDbMaterial. The material dictionary is a central repository for all materials, allowing
materials to be shared among multiple entities.
def maxactvp(self) -> int:
Returns the current MAXACTVP value for the database. See the System Variables section of
the AutoCAD Command Reference for information on MAXACTVP.
def measurement(self) -> MeasurementValue:
Returns the current MEASUREMENT value for the database. Will be one of an
AcDb::MeasurementValue defined as: enum MeasurementValue { kEnglish = 0, kMetric = 1,};See
the System Variables section of the AutoCAD Command Reference for information on
MEASUREMENT.
def mirrtext(self) -> bool:
Returns the current MIRRTEXT value for the database. The value of false is 0. The value of
true is 1. See the System Variables section of the AutoCAD Command Reference for
information on MIRRTEXT.
def mleaderStyleDictionaryId(self) -> ObjectId:
For the ACAD_MLEADERSTYLE dictionary
def mleaderscale(self) -> float:
Returns the MLeader scale value.
def mleaderstyle(self) -> ObjectId:
Gets the object ID of the MLeader style specified by the current CMLEADERSTYLE value of the
database
def modelSpace(self, mode: PyDb.OpenMode) -> BlockTableRecord:
def modelSpaceId(self) -> ObjectId:
def msOleScale(self) -> float:
Returns the MSOLESCALE header variable value.
def msltscale(self) -> bool:
Returns the current MSLTSCALE value for the database. See the System Variables section of
the AutoCAD Command Reference for information on MSLTSCALE. This is an AcDbDatabase Header
Variable Query Function.
def namedObjectsDictionaryId(self) -> ObjectId:
Returns the object ID of the database's NamedObjects dictionary.
def needsRecovery(self) -> bool:
This method returns true if this database was read from a DWG file on disk and there were
read errors, but they were not significant enough to cause readDwgFile() to return an
error.
def northDirection(self) -> float:
An angle representing a direction towards North, based on the orientation of the drawing
model in the WCS. Returns an angle, in radians, representing the North bearing. The drawing
latitude, longitude, and north direction are used by the Sun, along with the Sun's date and
time, to calculate the correct angle for sunlight.
def numberOfSaves(self) -> int:
Returns number of times the database has been saved in the current session, or zero if it
has not been saved in the current session.
def objectContextManager(self) -> ObjectContextManager:
Returns the object context manager.
def objectIdArray(self, desc: PyRx.RxClass) -> ObjectIdArray:
def objectIdArray(self, descList: list[PyRx.RxClass]) -> ObjectIdArray:
def objectIdArray(*args) -> ObjectIdArray:
def objectIds(self, desc: PyRx.RxClass) -> list[PyDb.ObjectId]:
def objectIds(self, descList: list[PyRx.RxClass]) -> list[PyDb.ObjectId]:
def objectIds(*args) -> list[PyDb.ObjectId]:
def obscuredColor(self) -> int:
Returns the current OBSCUREDCOLOR value for the database. See the System Variables section
of the AutoCAD Command Reference for information on OBSCUREDCOLOR.
def obscuredLineType(self) -> int:
Returns the current OBSCUREDLINETYPE value for the database. See the System Variables
section of the AutoCAD Command Reference for information on OBSCUREDLINETYPE.
def oleStartUp(self) -> bool:
Returns the database's OLESTARTUP header variable value. See the system variables
documentation in the AutoCAD Command Reference for information on OLESTARTUP.
def originalFileMaintenanceVersion(self) -> int:
Returns the maintenance version value that the database file had when it was first opened.
def originalFileName(self) -> str:
Returns a pointer to the file name that the database was originally opened under. May
return a null pointer if the database was created from a DXF file or a pre-R13 drawing
file.
def originalFileSavedByMaintenanceVersion(self) -> int:
Returns the maintenance version value of the last AutoCAD product which saved the drawing
file, not counting the current session.
def originalFileSavedByVersion(self) -> int:
Returns the version value of the last AutoCAD product which saved the drawing file, not
counting the current session.
def originalFileVersion(self) -> int:
Returns the version value that the database file had when it was first opened.
def orthomode(self) -> bool:
Returns the current ORTHOMODE value for the database. The value of false is 0. The value of
true is 1. See the System Variables section of the AutoCAD Command Reference for
information on ORTHOMODE.
def paperSpaceVportId(self) -> ObjectId:
Returns the object ID of the paperspace AcDbViewport for the database.
def pdfframe(self) -> int:
Gets the PDFFRAME header variable which controls visibility of frames from PDF Underlays.
def pdmode(self) -> int:
Returns the current PDMODE value for the database. See the System Variables section of the
AutoCAD Command Reference for information on PDMODE.
def pdsize(self) -> float:
Returns the current PDSIZE value for the database. See the System Variables section of the
AutoCAD Command Reference for information on PDSIZE.
def pextmax(self) -> PyGe.Point3d:
Returns an AcGePoint3d, which is the current Paper Space EXTMAX value for the database. See
the System Variables section of the AutoCAD Command Reference for information on EXTMAX.
def pextmin(self) -> PyGe.Point3d:
Returns an AcGePoint3d, which is the current Paper Space EXTMIN value for the database. See
the System Variables section of the AutoCAD Command Reference for information on EXTMIN.
def pickstyle(self) -> int:
Beginning with AutoCAD 2000, the PICKSTYLE system variable value is no longer saved in the
database. This function always returns Acad::eNotApplicable. To get this system variable
for an AutoCAD session, please use the acedGetVar() function. See the System Variables
section of the AutoCAD Command Reference for information on PICKSTYLE.
def pinsbase(self) -> PyGe.Point3d:
Returns an AcGePoint3d, which is the current Paper Space INSBASE value for the database.
The point is in WCS coordinates. See the System Variables section of the AutoCAD Command
Reference for information on INSBASE.
def plimcheck(self) -> bool:
Returns the current Paper Space LIMCHECK value for the database. The value of false is 0.
The value of true is 1. See the System Variables section of the AutoCAD Command Reference
for information on LIMCHECK.
def plimmax(self) -> PyGe.Point2d:
Returns an AcGePoint2d (in WCS coordinates), which is the current Paper Space LIMMAX value
for the database. See the System Variables section of the AutoCAD Command Reference for
information on LIMMAX.
def plimmin(self) -> PyGe.Point2d:
Returns an AcGePoint2d, which is the current Paper Space LIMMIN value for the database. See
the System Variables section of the AutoCAD Command Reference for information on LIMMIN.
def plineEllipse(self) -> bool:
Returns the current PELLIPSE value for the database. The value of false is 0. The value of
true is 1. See the System Variables section of the AutoCAD Command Reference for
information on PELLIPSE.
def plinegen(self) -> bool:
Returns the current PLINEGEN value for the database. The value of false is 0. The value of
true is 1. See the System Variables section of the AutoCAD Command Reference for
information on PLINEGEN.
def plinewid(self) -> float:
Returns the current PLINEWID value for the database. See the System Variables section of
the AutoCAD Command Reference for information on PLINEWID.
def plotSettingsDictionaryId(self) -> ObjectId:
Retrieves the object ID of the ACAD_PLOTSETTINGS dictionary, which contains objects of type
AcDbPlotSettings. The Plot Settings dictionary holds the set of named plot settings that
the user has created for this drawing.
def plotStyleMode(self) -> bool:
This method returns true when this database is using color-dependent plot styles, and false
for named plot styles. See the AutoCAD User's Guide for more information on the two types
of plot styles.
def plotStyleNameDictionaryId(self) -> ObjectId:
Returns the object ID of the database's plot style name dictionary.
def previewType(self) -> int:
Returns the value of the preview type.
def psltscale(self) -> bool:
Returns the current PSLTSCALE value for the database. The value of false is 0. The value of
true is 1. See the System Variables section of the AutoCAD Command Reference for
information on PSLTSCALE.
def psolHeight(self) -> float:
Returns the current PSOLHEIGHT value for the database. See the System Variables section of
the AutoCAD Command Reference for information on PSOLHEIGHT.
def psolWidth(self) -> float:
Returns the current PSOLWIDTH value for the database. See the System Variables section of
the AutoCAD Command Reference for information on PSOLWIDTH.
def pucsBase(self) -> ObjectId:
Returns the object ID of the AcDbUcsTableRecord that defines the origin and orientation of
orthographic UCS settings for the database's current paper space. The name of this
AcDbUcsTableRecord is used as the database's PUCSNAME value. See the system variables
documentation in the AutoCAD Command Reference for information on PUCSNAME.
def pucsname(self) -> ObjectId:
Returns the object ID of the UCS table entry that is currently in use in the Paper Space of
the database (Paper Space value of UCSNAME). See the System Variables section of the
AutoCAD Command Reference for information on UCSNAME.
def pucsorg(self) -> PyGe.Point3d:
Returns an AcGePoint3d, which is the current Paper Space UCSORG value for the database. See
the System Variables section of the AutoCAD Command Reference for information on UCSORG.
def pucsxdir(self) -> PyGe.Vector3d:
Returns an AcGeVector3d, which is the current Paper Space UCSXDIR value for the database.
See the System Variables section of the AutoCAD Command Reference for information on
UCSXDIR.
def pucsydir(self) -> PyGe.Vector3d:
Returns an AcGeVector3d, which is the current Paper Space UCSYDIR value for the database.
See the System Variables section of the AutoCAD Command Reference for information on
UCSYDIR.
def purge(self, ids: list[PyDb.ObjectId]) -> list[PyDb.ObjectId]:
This version of the purge() method works in one pass. The method looks for references
between the objects passed in so that it does not need to be called multiple times. In
other words, if a Layer and a Linetype are passed in, and the only reference to the
Linetype is from the Layer, then the graph returned will indicate that both the Layer and
the Linetype can be purged. (The older AcDbObjectIdArray version of purge() would first
indicate that only the Layer could be purged. Then a second call, after erasing the Layer,
would say that the Linetype could be purged.) A graph is returned so that you do not need
to erase all the objects passed back, just like in the other purge(). However, if you want
to selectively erase only part of the objects passed back, you must only erase root-type
nodes on the graph. In other words, from the above example, the graph passed back would
contain both the Layer and Linetype nodes, but there would be an edge from the Layer to the
Linetype. Thus only the Layer would be a root-type node, with no incoming edges. That means
that you could erase the Layer by itself, but not the Linetype. If you want to erase the
Linetype, then you must also erase the Layer. That's why the return data is in a graph.
def purgeGraph(self, ids: PyDb.ObjectIdGraph) -> None:
This version of the purge() method works in one pass. The method looks for references
between the objects passed in so that it does not need to be called multiple times. In
other words, if a Layer and a Linetype are passed in, and the only reference to the
Linetype is from the Layer, then the graph returned will indicate that both the Layer and
the Linetype can be purged. (The older AcDbObjectIdArray version of purge() would first
indicate that only the Layer could be purged. Then a second call, after erasing the Layer,
would say that the Linetype could be purged.) A graph is returned so that you do not need
to erase all the objects passed back, just like in the other purge(). However, if you want
to selectively erase only part of the objects passed back, you must only erase root-type
nodes on the graph. In other words, from the above example, the graph passed back would
contain both the Layer and Linetype nodes, but there would be an edge from the Layer to the
Linetype. Thus only the Layer would be a root-type node, with no incoming edges. That means
that you could erase the Layer by itself, but not the Linetype. If you want to erase the
Linetype, then you must also erase the Layer. That's why the return data is in a graph.
def qtextmode(self) -> bool:
Returns the current QTEXTMODE value for the database. The value of false is 0. The value of
true is 1. See the System Variables section of the AutoCAD Command Reference for
information on QTEXTMODE.
def readDwgFile(self, fileName: str) -> None:
Reads the drawing file specified by fileName into the database object executing this
function. fileName must include the extension of the file (which does not have to be .dwg)
if the file to open has one, even if the extension is .dwg. This function uses the
'lazy-load' mechanism, which means that pieces of the drawing are read in only as needed.
So, the drawing file is left open until the database object is deleted, at which point the
database destructor closes the drawing file. This function always tries to open files with
read access. It fails if read access is not available. For an ObjectARX application, if
bAllowCPConversion is false, AutoCAD will pop up a dialog explaining the situation and
asking if the user wants to allow some kind of default conversion, which might cause a data
loss. The bAllowCPConversion argument controls the behavior when the user tries to read a
dwg file where the NLS files are not available to convert from the codepage of the drawing
to the codepage of the system (for example, a Japanese drawing on an English OS). However,
when a non-AutoCAD host application encounters this situation with an ObjectDBX module,
readDwgFile() will merely return the error status eNLSFileNotAvailable. At that point, the
application can decide whether it wants to allow the default conversion by whatever means
it chooses (including asking the user). If it chooses to allow the conversion, it can again
call readDwgFile() and set bAllowCPConversion to true. In either ObjectARX or ObjectDBX, if
bAllowCPConversion is true, the file will be opened and the conversion will happen
silently. If wszPassword is NULL, the user is prompted for a password if one is required
and if no applicable password exists in the password cache. Returns Acad::eOk if
successful. WarningThis function should only be used on a newly created AcDbDatabase that
was created with its constructor's buildDefaultDrawing argument set to Adesk::kFalse. If
this method is used on an AcDbDatabase that was created with buildDefaultDrawing set to
Adesk::kTrue, or an AcDbDatabase that already has information in it (for any reason
including a previous call to this function), then memory leaks (or worse) will result.
def readDwgFile(self, fileName: str, mode: PyDb.DatabaseOpenMode, bAllowCPConversion: bool, password: str) -> None:
Reads the drawing file specified by fileName into the database object executing this
function. fileName must include the extension of the file (which does not have to be .dwg)
if the file to open has one, even if the extension is .dwg. This function uses the
'lazy-load' mechanism, which means that pieces of the drawing are read in only as needed.
So, the drawing file is left open until the database object is deleted, at which point the
database destructor closes the drawing file. This function always tries to open files with
read access. It fails if read access is not available. For an ObjectARX application, if
bAllowCPConversion is false, AutoCAD will pop up a dialog explaining the situation and
asking if the user wants to allow some kind of default conversion, which might cause a data
loss. The bAllowCPConversion argument controls the behavior when the user tries to read a
dwg file where the NLS files are not available to convert from the codepage of the drawing
to the codepage of the system (for example, a Japanese drawing on an English OS). However,
when a non-AutoCAD host application encounters this situation with an ObjectDBX module,
readDwgFile() will merely return the error status eNLSFileNotAvailable. At that point, the
application can decide whether it wants to allow the default conversion by whatever means
it chooses (including asking the user). If it chooses to allow the conversion, it can again
call readDwgFile() and set bAllowCPConversion to true. In either ObjectARX or ObjectDBX, if
bAllowCPConversion is true, the file will be opened and the conversion will happen
silently. If wszPassword is NULL, the user is prompted for a password if one is required
and if no applicable password exists in the password cache. Returns Acad::eOk if
successful. WarningThis function should only be used on a newly created AcDbDatabase that
was created with its constructor's buildDefaultDrawing argument set to Adesk::kFalse. If
this method is used on an AcDbDatabase that was created with buildDefaultDrawing set to
Adesk::kTrue, or an AcDbDatabase that already has information in it (for any reason
including a previous call to this function), then memory leaks (or worse) will result.
def readDwgFile(*args) -> None:
Reads the drawing file specified by fileName into the database object executing this
function. fileName must include the extension of the file (which does not have to be .dwg)
if the file to open has one, even if the extension is .dwg. This function uses the
'lazy-load' mechanism, which means that pieces of the drawing are read in only as needed.
So, the drawing file is left open until the database object is deleted, at which point the
database destructor closes the drawing file. This function always tries to open files with
read access. It fails if read access is not available. For an ObjectARX application, if
bAllowCPConversion is false, AutoCAD will pop up a dialog explaining the situation and
asking if the user wants to allow some kind of default conversion, which might cause a data
loss. The bAllowCPConversion argument controls the behavior when the user tries to read a
dwg file where the NLS files are not available to convert from the codepage of the drawing
to the codepage of the system (for example, a Japanese drawing on an English OS). However,
when a non-AutoCAD host application encounters this situation with an ObjectDBX module,
readDwgFile() will merely return the error status eNLSFileNotAvailable. At that point, the
application can decide whether it wants to allow the default conversion by whatever means
it chooses (including asking the user). If it chooses to allow the conversion, it can again
call readDwgFile() and set bAllowCPConversion to true. In either ObjectARX or ObjectDBX, if
bAllowCPConversion is true, the file will be opened and the conversion will happen
silently. If wszPassword is NULL, the user is prompted for a password if one is required
and if no applicable password exists in the password cache. Returns Acad::eOk if
successful. WarningThis function should only be used on a newly created AcDbDatabase that
was created with its constructor's buildDefaultDrawing argument set to Adesk::kFalse. If
this method is used on an AcDbDatabase that was created with buildDefaultDrawing set to
Adesk::kTrue, or an AcDbDatabase that already has information in it (for any reason
including a previous call to this function), then memory leaks (or worse) will result.
def reclaimMemoryFromErasedObjects(self, ids: list[PyDb.ObjectId]) -> None:
This member function deletes the objects underneath the input object ids and performs some
related cleanup. The object ids in the input array must already be erased, and they should
reside in the invoked database. Objects owned by the objects listed in the input array will
be erased unless they already are, and their memory also reclaimed. The following table
describes the error conditions and their reasons: Error Code Reason Acad::eInvalidOpenState
There can be no active transactions, regardless of whether the entities in the input list
are in them or not. If there are any active transactions, then none of the input objects
will be deleted and no memory reclaimed. Acad::eWasNotErased If there are any objects whose
memory cannot be reclaimed because they are not erased. Acad::eInvalidOpenState If an
object is not entirely closed. Acad::eWrongDatabase If objects in the array are not from
the invoked database object. Acad::ePermanentlyErased If an object has already had its
memory reclaimed.
def regAppTableId(self) -> ObjectId:
Returns the object ID of the database's AcDbRegAppTable.
def regenmode(self) -> bool:
Returns the current REGENMODE value for the database. The value of false is 0. The value of
true is 1. See the System Variables section of the AutoCAD Command Reference for
information on REGENMODE.
def registerApp(self, appName: str) -> None:
Registers an application name (for use by Xdata).
def removeReactor(self, reactor: PyDb.DatabaseReactor) -> None:
Removes the reactor object pointed to by pReactor from the list of reactors for the
database executing this function.
def resetTimes(self) -> None:
This function resets the AcDbDatabase TDCREATE, TDUPDATE, TDINDWG, and TDUSRTIMER to the
settings for a new drawing (TDCREATE and TDUPDATE to the current date/time, and TDINDWG and
TDUSRTIMER to 0).
def restoreForwardingXrefSymbols(self) -> None:
This function must be used with restoreOriginalXrefSymbols(), and should be wrapped around
all code with plans to edit and/or save Xref databases. restoreForwardingXrefSymbols()
literally redoes all the changes back to a proper Xref resolve status. Thus, if the
original symbols are restored, and then changes are made to the symbols before
restoreForwardingXrefSymbols(), those changes will be overwritten. However, newly added
symbols will be properly resolved during restoreForwardingXrefSymbols(), and then will be
included in the undo/redo of future calls to these two methods. (The only work-around to
wanting to change the symbols themselves is to go ahead and make the changes, save them to
disk, and then let restoreForwardingXrefSymbols() overwrite the changes. When all is done,
reload the Xref from disk.) The symbols affected are the Table and Records for blocks,
layers, linetypes, text styles, dimension styles, registered applications, and plot styles,
as well as any custom object changes made during and between the beginAttach() and
otherAttach() notifications. In order to properly resolve the Xref,
restoreForwardingXrefSymbols() needs write access to the symbol tables and symbol table
records in the host drawing. Therefore, applications should close any open symbol tables or
symbol table records before calling restoreForwardingXrefSymbols().
restoreForwardingXrefSymbols() returns eLockViolation if the document the database belongs
to is not locked, eNotApplicable if the database is not an active Xref database or if
called from within the beginAttach() or otherAttach() callbacks, or eIllegalReplacement if
the Xref has been reloaded since the restoreOriginalXrefSymbols() call, which should not be
done. This function also may return eWasOpenForRead, eWasOpenForWrite, or
eHadMultipleReaders if the calling application fails to close any open symbol tables or
symbol table records before calling this function. These methods are also normally used
with the AcEdXrefFileLock class. The following code snippet is an example of using these
methods: AcEdXrefFileLock flock;flock.lockFile(stat,
pXrefDb->xrefBlockId());pXrefDb->restoreOriginalXrefSymbols()// Make changes, or add
objectsflock.releaseFile(stat); // Does the
savebackpXrefDb->restoreForwardingXrefSymbols();Normally, releaseFile() will call the
restore functions automatically, but it skips the calls if the restoration has already been
done. Putting the restoreForwardingXrefSymbols() call after the call to releaseFile() saves
having multiple calls to restore the symbols.
def restoreOriginalXrefSymbols(self) -> None:
This function must be used with restoreForwardingXrefSymbols(), and should be wrapped
around all code with plans to edit and/or save Xref databases. The
restoreOriginalXrefSymbols() method undoes all the changes the database did during its
resolve, so that the database is now in the same condition it was when it was first read in
from its file. The symbols affected are the Table and Records for blocks, layers,
linetypes, text styles, dimension styles, registered applications, and plot styles, as well
as any custom object changes made during and between the beginAttach() and otherAttach()
notifications. restoreOriginalXrefSymbols() returns eLockViolation if the document the
database belongs to is not locked, eNotApplicable if the database is not an active Xref
database or if called from within the beginAttach() or otherAttach() callbacks, or
eAlreadyInDb if the symbols are already restored. These methods are also normally used with
the AcEdXrefFileLock class. The following code snippet is an example of using these
methods: AcEdXrefFileLock flock;flock.lockFile(stat,
pXrefDb->xrefBlockId());pXrefDb->restoreOriginalXrefSymbols()// Make changes, or add
objectsflock.releaseFile(stat); // Does the
savebackpXrefDb->restoreForwardingXrefSymbols();Normally, releaseFile() will call the
restore functions automatically, but it skips the calls if the restoration has already been
done. Putting the restoreForwardingXrefSymbols() call after the call to releaseFile() saves
having multiple calls to restore the symbols.
def retainOriginalThumbnailBitmap(self) -> bool:
This function returns the status of the thumbnail bitmap toggle flag. The retainOriginal
status is FALSE by default. If it is toggled to TRUE, the AcDbDatabase will always try to
retain the original image, no matter what other action is taken.
def saveAs(self, filename: str, bBakAndRename: bool, dwgVer: PyDb.DwgVersion) -> None:
Runs the save process on the database and writes the drawing information out to fileName.
The fileName argument is taken as is. If no file extension is present, .dwg is not
appended. To specify security parameters, set pSecurity to point to a SecurityParams struct
that conveys your preferences. If pSecurity is non-NULL, its settings override any previous
database security settings. If pSecurity is NULL, any currently enforced security settings
remain in effect. If no previous security-related settings were specified, and pSecurity is
NULL, no security-related operation is attempted. If the SecurityParams struct passed as
the pSecurity argument is not properly initialized, the method fails. See SecurityParams
for more information on initializing this struct. Returns Acad::eOk if the process
completes successfully.
def saveproxygraphics(self) -> int:
Returns the current PROXYGRAPHICS value for the database. See the System Variables section
of the AutoCAD Command Reference for information on PROXYGRAPHICS.
def scaleListDictionaryId(self) -> ObjectId:
Returns the scale list dictionary ID.
def sectionViewStyle(self) -> ObjectId:
This method gets the Object ID of the current section view style.
def sectionViewStyleDictionaryId(self) -> ObjectId:
This method returns the Object ID of the AcDbDictionary that contains the section view
styles.
def set3dDwfPrec(self, dwfPrec: float) -> None:
Sets the 3D DWF precision for this database. The valid range is from 1 to 6, with higher
settings resulting in finer precision.
def setAngbase(self, angle: float) -> None:
Sets the database to use angle as the ANGBASE value. See the System Variables section of
the AutoCAD Command Reference for information on ANGBASE. Returns Acad::eOk if successful.
def setAngdir(self, dir: bool) -> None:
Sets dir to be the ANGDIR value for the database. The value of false is 0. The value of
true is 1. See the System Variables section of the AutoCAD Command Reference for
information on ANGDIR. Returns Acad::eOk if successful.
def setAnnoAllVisible(self, allvis: bool) -> None:
Set the desired ANNOALLVISIBLE value for the model space tab. Returns Acad::eOk if
successful.
def setAttdia(self, val: bool) -> None:
Beginning with AutoCAD 2000, the ATTDIA system variable value is no longer saved in the
database. This function always returns Acad::eNotApplicable. To set this system variable
for an AutoCAD session, please use the acedSetVar() function. See the System Variables
section of the AutoCAD Command Reference for information on ATTDIA.
def setAttmode(self, val: int) -> None:
Sets mode to be the ATTMODE value for the database. See the System Variables section of the
AutoCAD Command Reference for information on ATTMODE. Returns Acad::eOk if successful.
def setAttreq(self, val: bool) -> None:
Beginning with AutoCAD 2000, the ATTREQ system variable value is no longer saved in the
database. This function always returns Acad::eNotApplicable. To set this system variable
for an AutoCAD session, please use the acedSetVar() function. See the System Variables
section of the AutoCAD Command Reference for information on ATTREQ.
def setAunits(self, val: int) -> None:
Sets aunits to be the AUNITS value for the database. See the System Variables section of
the AutoCAD Command Reference for information on AUNITS. Returns Acad::eOk if successful.
def setAuprec(self, val: int) -> None:
Sets auprec to be the AUPREC value for the database. See the System Variables section of
the AutoCAD Command Reference for information on AUPREC. Returns Acad::eOk if successful.
def setBlipmode(self, val: bool) -> None:
Beginning with AutoCAD 2000, the BLIPMODE system variable value is no longer saved in the
database. This function always returns Acad::eNotApplicable. To set this system variable
for an AutoCAD session, please use the acedSetVar() function. See the System Variables
section of the AutoCAD Command Reference for information on BLIPMODE.
def setCDynDisplayMode(self, val: int) -> None:
Sets a new value for the CDYNDISPLAYMODE value for the database. It is a drawing variable
unique across different drawing files. Returns Acad::eOk if successful.
def setCameraDisplay(self, val: bool) -> None:
Sets the new value of the CAMERADISPLAY sysvar to display or hide cameras. Returns
Acad::eOk on success.
def setCameraHeight(self, val: float) -> None:
Sets the CAMERAHEIGHT system variable. This value is used as the default value for creating
new cameras. Returns Acad::eOk on success.
def setCannoscale(self, val: AnnotationScale) -> None:
Sets an AcDbAnnotationScale object which will be the CANNOSCALE value for the database when
model space is current. See the System Variables section of the AutoCAD Command Reference
for information on CANNOSCALE. This is an AcDbDatabase Header Variable Edit Function.
Returns Acad::eOk if successful; otherwise, returns an AutoCAD error status.
def setCePlotStyleName(self, val: PyDb.PlotStyleNameType, newId: PyDb.ObjectId) -> None:
The possible values for type are shown in the following table: AcDb::kPlotStyleNameByLayer
Use the plot style name of the layer table record referenced by the entity
AcDb::kPlotStyleNameByBlock Use the plot style name of the AcDbBlockReference that displays
the entity. AcDb::kPlotStyleNameIsDictDefault Use the PlotStyleName dictionary's default
entry AcDb::kPlotStyleNameById Use the PlotStyleName dictionary entry whose object ID is
returned by this function. If type is anything other than AcDb::kPlotStyleNameById, then id
will be ignored. If type is AcDb::kPlotStyleNameById, then id must be the objected of an
entry in the PlotStyleName dictionary. Returns Acad::eOk if successful. Returns
Acad::eInvalidInput if type is not a valid value, or if id is not valid when type is
AcDb::kPlotStyleNameById.
def setCecolor(self, val: Color) -> None:
Sets the AutoCAD color index in color to be the CECOLOR value for the database. See the
System Variables section of the AutoCAD Command Reference for information on CECOLOR.
Returns Acad::eOk if successful.
def setCeltscale(self, val: float) -> None:
Sets scale to be the CELTSCALE value for the database. See the System Variables section of
the AutoCAD Command Reference for information on CELTSCALE. Returns Acad::eOk if
successful.
def setCeltype(self, val: ObjectId) -> None:
Sets the LinetypeTableRecord with object ID objId to be the CELTYPE value of the database.
See the System Variables section of the AutoCAD Command Reference for information on
CELTYPE. Returns Acad::eOk if successful.
def setCelweight(self, val: LineWeight) -> None:
Sets weight to be the current lineweight (CELWEIGHT) for the database. See the System
Variables section of the AutoCAD Command Reference for information on CELWEIGHT. Returns
Acad::eOk if successful.
def setCetransparency(self, val: Transparency) -> None:
Sets the transparency value for the entity.
def setChamfera(self, val: float) -> None:
Sets val to be the CHAMFERA value for the database. See the System Variables section of the
AutoCAD Command Reference for information on CHAMFERA. Returns Acad::eOk if successful.
def setChamferb(self, val: float) -> None:
Sets val to be the CHAMFERB value for the database. See the System Variables section of the
AutoCAD Command Reference for information on CHAMFERB. Returns Acad::eOk if successful.
def setChamferc(self, val: float) -> None:
Sets val to be the CHAMFERC value for the database. See the System Variables section of the
AutoCAD Command Reference for information on CHAMFERC. Returns Acad::eOk if successful.
def setChamferd(self, val: float) -> None:
Sets val to be the CHAMFERD value for the database. See the System Variables section of the
AutoCAD Command Reference for information on CHAMFERD. Returns Acad::eOk if successful.
def setClayer(self, val: ObjectId) -> None:
Sets the LayerTableRecord with object ID objId to be the CLAYER value of the database. See
the System Variables section of the AutoCAD Command Reference for information on CLAYER.
Returns Acad::eOk if successful.
def setCmaterial(self, val: ObjectId) -> None:
This function sets the current material and provides a default material for new entities.
The specified Id must correspond to a valid AcDbMaterial object. Returns Acad::eOk if
successful.
def setCmljust(self, val: int) -> None:
Sets just to be the CMLJUST value for the database. See the System Variables section of the
AutoCAD Command Reference for information on CMLJUST. Returns Acad::eOk if successful.
def setCmlscale(self, val: float) -> None:
Sets scale to be the CMLSCALE value for the database. See the System Variables section of
the AutoCAD Command Reference for information on CMLSCALE. Returns Acad::eOk if successful.
def setCmlstyleID(self, val: ObjectId) -> None:
Sets the MlineStyle with object ID objId to be the CMLSTYLEID value of the database. See
the System Variables section of the AutoCAD Command Reference for information on
CMLSTYLEID. Returns Acad::eOk if successful.
def setCoords(self, val: int) -> None:
Beginning with AutoCAD 2000, the COORDS system variable value is no longer saved in the
database. This function always returns Acad::eNotApplicable. To set this system variable
for an AutoCAD session, please use the acedSetVar() function. See the System Variables
section of the AutoCAD Command Reference for information on COORDS.
def setCshadow(self, val: int) -> None:
Sets the value of the CSHADOW system variable. Returns Acad::eOk if successful. If val is
outside of the valid range, returns Acad::eInvalidInput.
def setDelUsedObj(self, val: int) -> None:
Beginning with AutoCAD 2000, the DELOBJ system variable value is no longer saved in the
database. This function always returns Acad::eNotApplicable. To set this system variable
for an AutoCAD session, please use the acedSetVar() function. See the System Variables
section of the AutoCAD Command Reference for information on DELOBJ.
def setDgnframe(self, val: int) -> None:
Reserved for future use.
def setDimAssoc(self, val: int) -> None:
Sets the database's DIMASSOC system variable to val. See the System Variables section of
the AutoCAD Command Reference for information on DIMASSOC. Returns Acad::eOk if successful.
def setDimaso(self, val: bool) -> None:
Sets v to be the DIMASO value for the database. The value of false is 0. The value of true
is 1. See the System Variables section of the AutoCAD Command Reference for information on
DIMASO. Returns Acad::eOk if successful.
def setDimfit(self, val: int) -> None:
Sets the database values of DIMATFIT and DIMTMOVE according the Release 14 variable DIMFIT
value of fit. See the System Variables section of the AutoCAD Command Reference for
information on DIMATFIT and DIMTMOVE. Returns Acad::eOk if successful. This method is
deprecated and may be removed in a future release.
def setDimsho(self, val: bool) -> None:
Sets sho to be the DIMSHO value for the database. The value of false is 0. The value of
true is 1. See the System Variables section of the AutoCAD Command Reference for
information on DIMSHO. Returns Acad::eOk if successful.
def setDimstyle(self, val: ObjectId) -> None:
Sets the AcDbDimStyleTableRecord with object ID styleId to be the DIMSTYLE value for the
database. See the System Variables section of the AutoCAD Command Reference for information
on DIMSTYLE. Returns Acad::eOk if successful.
def setDimstyleData(self, val: PyDb.DimStyleTableRecord | PyDb.ObjectId) -> None:
This function copies the dimension variable information in the DimStyleTableRecord
identified by id into the database on which this method is called, making those dimension
variable values current for the database. The DimStyleTableRecord with object ID id does
not have to reside in the database on which this method is called. Returns Acad::eOk if
operation is successful.
def setDimunit(self, val: int) -> None:
Sets the database values of DIMLUNIT and DIMFRAC according the Release 14 variable DIMUNIT
value of unit. See the System Variables section of the AutoCAD Command Reference for
information on DIMLUNIT and DIMFRAC. Returns Acad::eOk if successful. This method is
deprecated and may be removed in a future release.
def setDispSilh(self, val: bool) -> None:
Sets silh to be the DISPSILH value for the database. The value of false is 0. The value of
true is 1. See the System Variables section of the AutoCAD Command Reference for
information on DISPSILH. Returns Acad::eOk if successful.
def setDragVisStyle(self, val: ObjectId) -> None:
Sets the visual style for to be used while creating 3D solid primitives and extruded solids
and surfaces defined by the DRAGVS system variable. See the System Variables section of the
AutoCAD Command Reference for information on DRAGVS.
def setDragmode(self, val: int) -> None:
Beginning with AutoCAD 2000, the DRAGMODE system variable value is no longer saved in the
database. This function always returns Acad::eNotApplicable. To set this system variable
for an AutoCAD session, please use the acedSetVar() function. See the System Variables
section of the AutoCAD Command Reference for information on DRAGMODE.
def setDrawOrderCtl(self, val: int) -> None:
Sets the value of the DRAWORDERCTL system variable, which enables users to revert to legacy
draw order mode if required. This system variable is per drawing in order to be consistent
with SORTENTS. The set values are defined as follows: 0 Full draw order functionality. 1
In-place graphic updates are disabled. When this bit is set, objects that are edited appear
in front of other objects. It is important to note that this is actually not guaranteed to
be their location after doing a manual REGEN, saving the file, closing it and reopening it,
or when plotting. 2 Setting this bit disables inheritance of objects derived from other
objects, such as split objects. When off, the new line created from a split line will be in
front of all objects, and the old line will keep its existing draw order. 3 Both in-place
editing and inheritance of objects derived from other objects are disabled. If a value
outside of the 0-3 range is passed into setDrawOrderCtl(), it will return eInvalidInput.
Otherwise, it will return eOk.
def setDwfframe(self, val: int) -> None:
Sets the DWFFRAME value for the database. See the System Variables section of the AutoCAD
Command Reference for information on DWFFRAME. Returns Acad::eOk if successful.
def setElevation(self, val: float) -> None:
Sets elev to be the Model Space ELEVATION value for the database. See the System Variables
section of the AutoCAD Command Reference for information on ELEVATION. Returns Acad::eOk if
successful.
def setEndCaps(self, val: EndCaps) -> None:
Sets the database's endCaps header variable to type. Possible values for type are
AcDb::kEndCapNone, AcDb::kEndCapRound, AcDb::kEndCapAngle, or AcDb::kEndCapSquare. Returns
Acad::eOk if successful.
def setExtmax(self, val: PyGe.Point3d) -> None:
Sets max to the EXTMAX value of the current model space for this database. See the system
variables documentation in the AutoCAD Command Reference for information on EXTMAX.
def setExtmin(self, val: PyGe.Point3d) -> None:
Sets min to be the EXTMIN value for the current model space of this database. See the
system variables documentation in the AutoCAD Command Reference for information on EXTMIN.
def setFacetres(self, val: float) -> None:
Sets facetres to be the FACETRES value for the database. See the System Variables section
of the AutoCAD Command Reference for information on FACETRES. Returns Acad::eOk if
successful.
def setFilletrad(self, val: float) -> None:
Sets radius to be the FILLETRAD value for the database. See the System Variables section of
the AutoCAD Command Reference for information on FILLETRAD. Returns Acad::eOk if
successful.
def setFillmode(self, val: bool) -> None:
Sets mode to be the FILLMODE value for the database. The value of false is 0. The value of
true is 1. See the System Variables section of the AutoCAD Command Reference for
information on FILLMODE. Returns Acad::eOk if successful.
def setFingerprintGuid(self, guid: str) -> None:
Sets the database's fingerprintguid header variable to be a copy of the string pointed to
by pNewGuid. Returns Acad::eOk if successful.
def setFullSaveRequired(self) -> None:
This function sets a non-persistent flag in the AcDbDatabase so that the next save will be
a full save. The flag is cleared when that save takes place.
def setGeoMarkerVisibility(self, val: bool) -> None:
This function set the visible state for a GeoMarker object
def setHaloGap(self, val: int) -> None:
Sets the database's HALOGAP system variable to val. See the System Variables section of the
AutoCAD Command Reference for information on HALOGAP. Returns Acad::eOk if successful.
def setHandseed(self, val: Handle) -> None:
Sets the database to use handle as the next available handle for new objects added to the
database. WarningThis function must be used only with extreme caution. If the handle value
passed in is lower than handles already in use by the database, serious problems could
occur. Returns Acad::eOk if successful.
def setHideText(self, val: int) -> None:
Sets the database's HIDETEXT system variable to val. See the System Variables section of
the AutoCAD Command Reference for information on HIDETEXT. Returns Acad::eOk if successful.
def setHpInherit(self, val: bool) -> None:
Sets inherit to be the HPINHERIT value for the database. See the System Variables section
of the AutoCAD Command Reference for information on HPINHERIT. Returns Acad::eOk if
successful.
def setHpOrigin(self, val: PyGe.Point2d) -> None:
Sets origin to be the HPORIGIN value for the database. See the System Variables section of
the AutoCAD Command Reference for information on HPORIGIN. Returns Acad::eOk if successful.
def setHyperlinkBase(self, val: str) -> None:
Sets the database to use a copy of path as the new value for the HYPERLINKBASE header
variable. See the system variables documentation in the AutoCAD Command Reference for
information on HYPERLINKBASE. Returns Acad::eOk if successful.
def setIndexctl(self, val: int) -> None:
Sets the value of the INDEXCTL header variable. Returns Acad::eOk if successful.
def setInsbase(self, val: PyGe.Point3d) -> None:
Sets base (in WCS coordinates) to be the Model Space INSBASE value for the database. See
the System Variables section of the AutoCAD Command Reference for information on INSBASE.
Returns Acad::eOk if successful.
def setInsunits(self, val: UnitsValue) -> None:
Sets the INSUNITS variable for the database.
def setInterfereColor(self, val: Color) -> None:
Sets the database's INTERFERECOLOR system variable to val. See the System Variables section
of the AutoCAD Command Reference for information on INTERFERECOLOR.
def setInterfereObjVisStyle(self, val: PyDb.ObjectId) -> None:
Sets the database's INTERFEREOBJVS system variable to the visual style pointed to byid. See
the System Variables section of the AutoCAD Command Reference for information on
INTERFEREOBJVS.
def setInterfereVpVisStyle(self, val: PyDb.ObjectId) -> None:
Sets the database's INTERFEREVPVS system variable to the visual style pointed to by id. See
the System Variables section of the AutoCAD Command Reference for information on
INTERFEREVPVS.
def setIntersectColor(self, val: int) -> None:
Sets the database's INTERSECTIONCOLOR system variable to val. See the System Variables
section of the AutoCAD Command Reference for information on INTERSECTIONCOLOR.
def setIntersectDisplay(self, val: int) -> None:
Sets the database's INTERSECTIONDISPLAY system variable to val. See the System Variables
section of the AutoCAD Command Reference for information on INTERSECTIONDISPLAY.
def setIsolines(self, val: int) -> None:
Sets isolines to be the ISOLINES value for the database. See the System Variables section
of the AutoCAD Command Reference for information on ISOLINES. Returns Acad::eOk if
successful.
def setJoinStyle(self, val: JoinStyle) -> None:
Sets style to be the new value for the database's joinstyle header variable. style may be
one of the following values: AcDb::kJnStylNone, AcDb::kJnStylRound, AcDb::kJnStylAngle,
AcDb::kJnStylFlat. Returns Acad::eOk if successful.
def setLatitude(self, val: float) -> None:
Sets the latitude of the site where the drawing model is located. Returns Acad::eOk if a
valid value is passed in; Acad::eOutOfRange otherwise. The drawing latitude, longitude, and
north direction are used by the Sun, along with the Sun's date and time, to calculate the
correct angle for sunlight.
def setLayerEval(self, val: int) -> None:
Sets the value of the LAYEREVAL header variable. Returns Acad::eOk if successful.
def setLayerNotify(self, val: int) -> None:
Sets the value of the LAYERNOTIFY header variable. Returns Acad::eOk if successful.
def setLensLength(self, val: float) -> None:
Sets the LENSLENGTH system variable. Returns Acad::eOk on success.
def setLightGlyphDisplay(self, val: int) -> None:
Set whether light objects are displayed in the viewport. Returns Acad::eOk if 0 or 1 is
passed in, Acad::eOutOfRange otherwise.
def setLightingUnits(self, val: int) -> None:
Sets the lighting units for the drawing, where 0 = Generic, 1 = International, and 2 =
American. The default setting is 0. Returns Acad::eOk if a valid lighting units value is
passed in.
def setLightsInBlocks(self, val: bool) -> None:
Specify whether all lights in blocks are ignored and do not contribute lighting to the
scene. The default setting is true. Returns Acad::eOk on success.
def setLimcheck(self, val: bool) -> None:
Specify whether all lights in blocks are ignored and do not contribute lighting to the
scene. The default setting is true. Returns Acad::eOk on success.
def setLimmax(self, val: PyGe.Point2d) -> None:
Sets max (in WCS coordinates) to be the Model Space LIMMAX value for the database. See the
System Variables section of the AutoCAD Command Reference for information on LIMMAX.
Returns Acad::eOk if successful.
def setLimmin(self, val: PyGe.Point2d) -> None:
Sets min (in WCS coordinates) to be the Model Space LIMMIN value for the database. See the
System Variables section of the AutoCAD Command Reference for information on LIMMIN.
Returns Acad::eOk if successful.
def setLineWeightDisplay(self, val: bool) -> None:
Sets display to be the current lineweight display (LWDISPLAY) for the database. See the
System Variables section of the AutoCAD Command Reference for information on LWDISPLAY.
Returns Acad::eOk if successful.
def setLoftAng1(self, val: float) -> None:
Sets ang1 to be the LOFTANG1 value for the database. See the System Variables section of
the AutoCAD Command Reference for information on LOFTANG1. Returns Acad::eOk if successful.
def setLoftAng2(self, val: float) -> None:
Sets ang2 to be the LOFTANG2 value for the database. See the System Variables section of
the AutoCAD Command Reference for information on LOFTANG2. Returns Acad::eOk if successful.
def setLoftMag1(self, val: float) -> None:
Sets mag1 to be the LOFTMAG1 value for the database. See the System Variables section of
the AutoCAD Command Reference for information on LOFTMAG1. Returns Acad::eOk if successful.
def setLoftMag2(self, val: float) -> None:
Sets mag2 to be the LOFTMAG2 value for the database. See the System Variables section of
the AutoCAD Command Reference for information on LOFTMAG2. Returns Acad::eOk if successful.
def setLoftNormals(self, val: int) -> None:
Sets value to be the LOFTNORMALS value for the database. See the System Variables section
of the AutoCAD Command Reference for information on LOFTNORMALS. Returns Acad::eOk if
successful.
def setLoftParam(self, flags: int) -> None:
Sets flags to be the LOFTPARAM value for the database. See the System Variables section of
the AutoCAD Command Reference for information on LOFTPARAM. Returns Acad::eOk if
successful.
def setLongitude(self, val: float) -> None:
Sets the longitude of the site where the drawing model is located. Returns Acad::eOk if a
valid value is passed in; Acad::eOutOfRange otherwise. The drawing latitude, longitude, and
north direction are used by the Sun, along with the Sun's date and time, to calculate the
correct angle for sunlight.
def setLtscale(self, val: float) -> None:
Sets scale to be the LTSCALE value for the database. See the System Variables section of
the AutoCAD Command Reference for information on LTSCALE. Returns Acad::eOk if successful.
def setLunits(self, val: int) -> None:
Sets lunits to be the LUNITS value for the database. See the System Variables section of
the AutoCAD Command Reference for information on LUNITS. Returns Acad::eOk if successful.
def setLuprec(self, val: int) -> None:
Sets prec to be the LUPREC value for the database. See the System Variables section of the
AutoCAD Command Reference for information on LUPREC. Returns Acad::eOk if successful.
def setMLeaderscale(self, val: float) -> None:
Sets the MLeader scale value. Returns Acad::eOk if successful.
def setMLeaderstyle(self, val: ObjectId) -> None:
Sets the style of this MLeader object. Returns Acad::eOk if successful; otherwise, returns
an AutoCAD error status.
def setMaxactvp(self, val: int) -> None:
Sets max to be the MAXACTVP value for the database. See the System Variables section of the
AutoCAD Command Reference for information on MAXACTVP. Returns Acad::eOk if successful.
def setMeasurement(self, val: MeasurementValue) -> None:
Sets the current MEASUREMENT value for the database. type must be one of the
AcDb::MeasurementValue enumeration values (kEnglish or kMetric). See the System Variables
section of the AutoCAD Command Reference for information on MEASUREMENT.
def setMirrtext(self, val: bool) -> None:
Sets mirror to be the MIRRTEXT value for the database. The value of false is 0. The value
of true is 1. See the System Variables section of the AutoCAD Command Reference for
information on MIRRTEXT. Returns Acad::eOk if successful.
def setMsOleScale(self, val: float) -> None:
Sets the value of the MSOLESCALE header variable. Returns Acad::eOk if successful.
def setMsltscale(self, val: bool) -> None:
Sets the MSLTSCALE variable. Returns Acad::eOk if successful.
def setNorthDirection(self, val: float) -> None:
Sets the angle representing a direction towards North, based on the orientation of the
drawing model in the WCS. Returns Acad::eOk if successful. The drawing latitude, longitude,
and north direction are used by the Sun, along with the Sun's date and time, to calculate
the correct angle for sunlight.
def setObscuredColor(self, val: int) -> None:
Sets database's OBSCUREDCOLOR system variable to val. See the System Variables section of
the AutoCAD Command Reference for information on OBSCUREDCOLOR. Returns Acad::eOk if
successful.
def setObscuredLineType(self, val: int) -> None:
Sets database's OBSCUREDLINETYPE system variable to val. See the System Variables section
of the AutoCAD Command Reference for information on OBSCUREDLINETYPE. Returns Acad::eOk if
successful.
def setOleStartUp(self, val: bool) -> None:
Sets the database to use val as the new OLESTARTUP value. See the system variables
documentation in the AutoCAD Command Reference for information on OLESTARTUP.Returns
Acad::eOk if successful.
def setOrthomode(self, val: bool) -> None:
Sets mode to be the ORTHOMODE value for the database. The value of false is 0. The value of
true is 1. See the System Variables section of the AutoCAD Command Reference for
information on ORTHMODE. Returns Acad::eOk if successful.
def setPdfframe(self, val: int) -> None:
Sets the PDFFRAME header variable which controls visibility of frames from PDF Underlays.
def setPdmode(self, val: int) -> None:
Sets mode to be the current PDMODE value for the database. See the System Variables section
of the AutoCAD Command Reference for information on PDMODE. Returns Acad::eOk if
successful.
def setPdsize(self, val: float) -> None:
Sets size to be the PDSIZE value for the database. See the System Variables section of the
AutoCAD Command Reference for information on PDSIZE. Returns Acad::eOk if successful.
def setPelevation(self, val: float) -> None:
Sets elev to be the Paper Space ELEVATION value for the database. See the System Variables
section of the AutoCAD Command Reference for information on ELEVATION. Returns Acad::eOk if
successful.
def setPextmax(self, val: PyGe.Point3d) -> None:
Sets the EXTMAX value of this database's current paper space to max. See the system
variables documentation in the AutoCAD Command Reference for information on EXTMAX.
def setPextmin(self, val: PyGe.Point3d) -> None:
Sets the EXTMIN value of this database's current paper space to min. See the system
variables documentation in the AutoCAD Command Reference for information on EXTMIN.
def setPickstyle(self, val: int) -> None:
Beginning with AutoCAD 2000, the PICKSTYLE system variable value is no longer saved in the
database. This function always returns Acad::eNotApplicable. To set this system variable
for an AutoCAD session, please use the acedSetVar() function. See the System Variables
section of the AutoCAD Command Reference for information on PICKSTYLE.
def setPinsbase(self, val: PyGe.Point3d) -> None:
Sets base to be the Paper Space INSBASE value for the database. The point is in WCS
coordinates. See the System Variables section of the AutoCAD Command Reference for
information on INSBASE. Returns Acad::eOk if successful.
def setPlimcheck(self, val: bool) -> None:
Sets check to be the Paper Space LIMCHECK value for the database. The value of false is 0.
The value of true is 1. See the System Variables section of the AutoCAD Command Reference
for information on LIMCHECK. Returns Acad::eOk if successful.
def setPlimmax(self, val: PyGe.Point2d) -> None:
Sets max (in WCS coordinates) to be the Paper Space LIMMAX value for the database. See the
System Variables section of the AutoCAD Command Reference for information on LIMMAX.
Returns Acad::eOk if successful.
def setPlimmin(self, val: PyGe.Point2d) -> None:
Sets min (in WCS coordinates) to be the Paper Space LIMMIN value for the database. See the
System Variables section of the AutoCAD Command Reference for information on LIMMIN.
Returns Acad::eOk if successful.
def setPlineEllipse(self, val: bool) -> None:
Sets pline to be the PELLIPSE value for the database. The value of false is 0. The value of
true is 1. See the System Variables section of the AutoCAD Command Reference for
information on PELLIPSE. Returns Acad::eOk if successful.
def setPlinegen(self, val: bool) -> None:
Sets pline to be the PELLIPSE value for the database. The value of false is 0. The value of
true is 1. See the System Variables section of the AutoCAD Command Reference for
information on PELLIPSE. Returns Acad::eOk if successful.
def setPlinewid(self, val: float) -> None:
Sets width to be the PLINEWID value for the database. See the System Variables section of
the AutoCAD Command Reference for information on PLINEWID. Returns Acad::eOk if successful.
def setPreviewType(self, val: int) -> None:
Sets the value of the preview type. Returns Acad::eOk if successful.
def setProjectName(self, val: str) -> None:
Sets the database to use a copy of the string pointed to by pName as the new PROJECTNAME
header variable value. See the system variables documentation in the AutoCAD Command
Reference for information on PROJECTNAME. Returns Acad::eOk if successful.
def setPsltscale(self, val: bool) -> None:
Sets scale to be the PSLTSCALE value for the database. The value of false is 0. The value
of true is 1. See the System Variables section of the AutoCAD Command Reference for
information on PSLTSCALE. Returns Acad::eOk if successful.
def setPsolHeight(self, val: float) -> None:
Sets height to be the PSOLHEIGHT value for the database. See the System Variables section
of the AutoCAD Command Reference for information on PSOLHEIGHT. Returns Acad::eOk if
successful.
def setPsolWidth(self, val: float) -> None:
Sets width to be the PSOLWIDTH value for the database. See the System Variables section of
the AutoCAD Command Reference for information on PSOLWIDTH. Returns Acad::eOk if
successful.
def setPucs(self, ucsOrigin: PyGe.Point3d, ucsXDir: PyGe.Vector3d, ucsYDir: PyGe.Vector3d) -> None:
This method sets the Paper Space UCS to the UCS defined by ucsOrigin, ucsXDir, and ucsYDir.
The pucsorg(), pucsxdir(), and pucsydir() are the query functions for this UCS.
def setPucsBase(self, ucsid: ObjectId) -> None:
Sets the database to use the AcDbUcsTableRecord associated with ucsid to define the origin
and orientation of orthographic UCS settings for the database's current paper space. The
name of this AcDbUcsTableRecord is used as the database's PUCSNAME value. See the system
variables documentation in the AutoCAD Command Reference for information on PUCSNAME.
Returns Acad::eOk if successful.
def setPucsname(self, ucsrec: ObjectId) -> None:
This method sets the Paper Space UCS to the AcDbUCSTableRecord whose ObjectId is ucsRecId.
This is the Paper Space value of UCSNAME. See the System Variables section of the AutoCAD
Command Reference for information on UCSNAME.
def setQtextmode(self, mode: bool) -> None:
Sets mode to be the QTEXTMODE value for the database. The value of false is 0. The value of
true is 1. See the System Variables section of the AutoCAD Command Reference for
information on QTEXTMODE. Returns Acad::eOk if successful.
def setRealWorldScale(self, realWorldScale: float) -> None:
Reserved for future use.
def setRegenmode(self, mode: bool) -> None:
Sets mode to be the current REGENMODE value for the database. The value of false is 0. The
value of true is 1. See the System Variables section of the AutoCAD Command Reference for
information on REGENMODE. Returns Acad::eOk if successful.
def setRetainOriginalThumbnailBitmap(self, retain: bool) -> None:
This function will set the database to use retain as the flag indicating whether or not to
retain the existing thumbnail bitmap during saves.
def setSaveproxygraphics(self, val: int) -> None:
Sets saveimg to be the PROXYGRAPHICS value for the database. See the System Variables
section of the AutoCAD Command Reference for information on PROXYGRAPHICS. Returns
Acad::eOk if successful.
def setSectionViewStyle(self, val: ObjectId) -> None:
This method sets the current section view style using the given Object ID for an
AcDbSectionViewStyle object.
def setShadedge(self, val: int) -> None:
Sets mode to be the SHADEDGE value for the database. See the System Variables section of
the AutoCAD Command Reference for information on SHADEDGE. Returns Acad::eOk if successful.
def setShadedif(self, val: int) -> None:
Sets dif to be the SHADEDIF value for the database. See the System Variables section of the
AutoCAD Command Reference for information on SHADEDIF. Returns Acad::eOk if successful.
def setShadowPlaneLocation(self, val: float) -> None:
Sets the current ground plane z position in world coordinates. The ground plane is always
parallel to the X-Y world plane and this is the distance either above or below the X-Y
plane.
def setShowHist(self, val: int) -> None:
Sets val to be the SHOWHIST value for the database. See the System Variables section of the
AutoCAD Command Reference for information on SHOWHIST. Returns Acad::eOk if successful.
def setSketchinc(self, val: float) -> None:
Sets inc to be the SKETCHINC value for the database. See the System Variables section of
the AutoCAD Command Reference for information on SKETCHINC. Returns Acad::eOk if
successful.
def setSkpoly(self, val: bool) -> None:
Sets asPoly to be the SKPOLY value for the database. The value of false is 0. The value of
true is 1. See the System Variables section of the AutoCAD Command Reference for
information on SKPOLY. Returns Acad::eOk if successful.
def setSolidHist(self, val: int) -> None:
Sets val to be the SOLIDHIST value for the database. See the System Variables section of
the AutoCAD Command Reference for information on SOLIDHIST. Returns Acad::eOk if
successful.
def setSortEnts(self, val: int) -> None:
Sets the database's SORTENTS system variable to the value of sortEnts.
def setSplframe(self, val: bool) -> None:
Sets disp to be the SPLFRAME value for the database. The value of false is 0. The value of
true is 1. See the System Variables section of the AutoCAD Command Reference for
information on SPLFRAME. Returns Acad::eOk if successful.
def setSplinesegs(self, val: int) -> None:
Sets segs to be the SPLINESEGS value for the database. See the System Variables section of
the AutoCAD Command Reference for information on SPLINESEGS. Returns Acad::eOk if
successful.
def setSplinetype(self, val: int) -> None:
Sets type to be the SPLINETYPE value for the database. See the System Variables section of
the AutoCAD Command Reference for information on SPLINETYPE. Returns Acad::eOk if
successful.
def setStepSize(self, val: float) -> None:
Sets stepSize to be the STEPSIZE value for the database. See the System Variables section
of the AutoCAD Command Reference for information on STEPSIZE. Returns Acad::eOk if
successful.
def setStepsPerSec(self, val: float) -> None:
Sets stepsPerSec to be the STEPSPERSEC value for the database. See the System Variables
section of the AutoCAD Command Reference for information on STEPSPERSEC. Returns Acad::eOk
if successful.
def setStyleSheet(self, val: str) -> None:
Sets the database to use a copy of the string pointed to by pName as the plot style sheet
for the database. Returns Acad::eOk if successful.
def setSurftab1(self, val: int) -> None:
Sets tab1 to be the SURFTAB1 value for the database. See the System Variables section of
the AutoCAD Command Reference for information on SURFTAB1. Returns Acad::eOk if successful.
def setSurftab2(self, val: int) -> None:
Sets tab2 to be the SURFTAB2 value for the database. See the System Variables section of
the AutoCAD Command Reference for information on SURFTAB2. Returns Acad::eOk if successful.
def setSurftype(self, val: int) -> None:
Sets type to be the current SURFTYPE value for the database. See the System Variables
section of the AutoCAD Command Reference for information on SURFTYPE. Returns Acad::eOk if
successful.
def setSurfu(self, val: int) -> None:
Sets u to be the SURFU value for the database. See the System Variables section of the
AutoCAD Command Reference for information on SURFU. Returns Acad::eOk if successful.
def setSurfv(self, val: int) -> None:
Sets v to be the SURFV value for the database. See the System Variables section of the
AutoCAD Command Reference for information on SURFV. Returns Acad::eOk if successful.
def setTStackAlign(self, val: int) -> None:
Sets the database to use val as its TSTACKALIGN value. See the system variables
documentation in the AutoCAD Command Reference for information on TSTACKALIGN. Returns
Acad::eOk if successful.
def setTStackSize(self, val: int) -> None:
Sets the database to use val as its TSTACKSIZE value. See the system variables
documentation in the AutoCAD Command Reference for information on TSTACKSIZE . Returns
Acad::eOk if successful.
def setTablestyle(self, val: ObjectId) -> None:
Sets the object ID of the table style specified by the current CTABLESTYLE value of the
database. See the System Variables section of the AutoCAD Command Reference for information
on CTABLESTYLE. Returns Acad::eOk if successful. Otherwise, returns Acad::eInvalidInput.
def setTextsize(self, val: float) -> None:
Sets size to be the TEXTSIZE value for the database. See the System Variables section of
the AutoCAD Command Reference for information on TEXTSIZE. Returns Acad::eOk if successful.
def setTextstyle(self, val: ObjectId) -> None:
Sets the database to use the TextStyleTableRecord with object ID objId as the TEXTSTYLE
value. See the System Variables section of the AutoCAD Command Reference for information on
TEXTSTYLE. Returns Acad::eOk if successful.
def setThickness(self, val: float) -> None:
Sets thickness to be the THICKNESS value for the database. See the System Variables section
of the AutoCAD Command Reference for information on THICKNESS. Returns Acad::eOk if
successful.
def setTilemode(self, val: bool) -> None:
Sets mode to be the TILEMODE value for the database. The value of false is 0. The value of
true is 1. See the System Variables section of the AutoCAD Command Reference for
information on TILEMODE. Returns Acad::eOk if successful. Returns Acad::eInvalidContext
when invoked while the current document is editing a block (BLOCKEDITOR=1) where the new
tile mode is different than the current tile mode.
def setTimeZone(self, val: TimeZone) -> None:
Sets the time zone for this drawing.Time zone is best set through the Geographic Location
dialog. Returns Acad::eOk if a valid time zone is passed in.
def setTimeZoneAsUtcOffset(self, val: float) -> None:
Sets the time zone for this drawing using a time-based value, as opposed to the
AcDb::TimeZone enum. Time zone is best set through the Geographic Location dialog. Returns
Acad::eOk if a valid time zone offset is passed in.
def setTracewid(self, val: float) -> None:
Sets width to be the TRACEWID value for the database. See the System Variables section of
the AutoCAD Command Reference for information on TRACEWID. Returns Acad::eOk if successful.
def setTreedepth(self, val: int) -> None:
Sets depth to be the TREEDEPTH value for the database. See the System Variables section of
the AutoCAD Command Reference for information on TREEDEPTH. Returns Acad::eOk if
successful.
def setUcs(self, ucsOrigin: PyGe.Point3d, ucsXDir: PyGe.Vector3d, ucsYDir: PyGe.Vector3d) -> None:
This method sets the Model Space UCS to the UCS defined by ucsOrigin, ucsXDir, and ucsYDir.
The ucsorg(), ucsxdir(), and ucsydir() are the query functions for this UCS.
def setUcsBase(self, ucsid: ObjectId) -> None:
Sets the database to use the AcDbUcsTableRecord associated with ucsid to define the origin
and orientation of orthographic UCS settings for the database's model space. The name of
this AcDbUcsTableRecord is used as the database's UCSNAME value. See the system variables
documentation in the AutoCAD Command Reference for information on UCSNAME.
def setUcsname(self, ucsrecId: ObjectId) -> None:
This method sets the Model Space UCS to the AcDbUCSTableRecord whose ObjectId is ucsRecId.
This is the Model Space value of UCSNAME. See the System Variables section of the AutoCAD
Command Reference for information on UCSNAME.
def setUnitmode(self, val: int) -> None:
Sets mode to be the UNITMODE value for the database. See the System Variables section of
the AutoCAD Command Reference for information on UNITMODE. Returns Acad::eOk if successful.
def setUpdateThumbnail(self, val: int) -> None:
Sets the value of the UPDATETHUMBNAIL header variable. Returns Acad::eOk if successful.
def setUseri1(self, val: int) -> None:
Sets val to be the USERI1 value for the database. See the System Variables section of the
AutoCAD Command Reference for information on USERI1. Returns Acad::eOk if successful.
def setUseri2(self, val: int) -> None:
Sets val to be the USERI2 value for the database. See the System Variables section of the
AutoCAD Command Reference for information on USERI2. Returns Acad::eOk if successful.
def setUseri3(self, val: int) -> None:
Sets val to be the USERI3 value for the database. See the System Variables section of the
AutoCAD Command Reference for information on USERI3. Returns Acad::eOk if successful.
def setUseri4(self, val: int) -> None:
Sets val to be the USERI4 value for the database. See the System Variables section of the
AutoCAD Command Reference for information on USERI4. Returns Acad::eOk if successful.
def setUseri5(self, val: int) -> None:
Sets val to be the USERI5 value for the database. See the System Variables section of the
AutoCAD Command Reference for information on USERI5. Returns Acad::eOk if successful.
def setUserr1(self, val: float) -> None:
Sets val to be the USERR1 value for the database. See the System Variables section of the
AutoCAD Command Reference for information on USERR1. Returns Acad::eOk if successful.
def setUserr2(self, val: float) -> None:
Sets val to be the USERR2 value for the database. See the System Variables section of the
AutoCAD Command Reference for information on USERR2. Returns Acad::eOk if successful.
def setUserr3(self, val: float) -> None:
Sets val to be the USERR3 value for the database. See the System Variables section of the
AutoCAD Command Reference for information on USERR3. Returns Acad::eOk if successful.
def setUserr4(self, val: float) -> None:
Sets val to be the USERR4 value for the database. See the System Variables section of the
AutoCAD Command Reference for information on USERR4. Returns Acad::eOk if successful.
def setUserr5(self, val: float) -> None:
Sets val to be the USERR5 value for the database. See the System Variables section of the
AutoCAD Command Reference for information on USERR5. Returns Acad::eOk if successful.
def setUsrtimer(self, val: bool) -> None:
If timer==true, then the user timer is turned on in the database. If timer==false, then the
user timer is turned off in the database. The user timer for the database currently loaded
in the AutoCAD editor is also controlled by the AutoCAD TIME command's On and Off options.
The TDUSRTIMER system variable and the AcDbDatabase::tdusrtimer() method both report the
time kept by this timer. Returns Acad::eOk if successful.
def setVersionGuid(self, val: str) -> None:
This function sets the database to use a copy of the pNewGuid string as the Version GUID
for the database. Returns Acad::eOk if successful.
def setViewportScaleDefault(self, newDefaultVPScale: float) -> None:
This function sets the database to use newDefaultVPScale as the scale value for all
viewports created subsequent to calling this function. newDefaultVPScale must be greater
than or equal to 0.0. A value of 0.0 causes viewports to be scaled to fit. Returns
Acad::eOk if successful. Returns Acad::eInvalidInput if newDefaultVPScale is less than 0.
def setVisretain(self, val: bool) -> None:
Sets retain to be the current VISRETAIN value for the database. The value of false is 0.
The value of true is 1. See the System Variables section of the AutoCAD Command Reference
for information on VISRETAIN. Returns Acad::eOk if successful.
def setWorldPucsBaseOrigin(self, ucsOrigin: PyGe.Point3d, orthoView: OrthographicView) -> None:
This function sets origin to be the new paperspace 'default' UCS origin point for the view
specified by orthoView. orthoView may be any one of the AcDb::OrthographicView enumerators.
Returns Acad::eOk if successful.
def setWorldUcsBaseOrigin(self, ucsOrigin: PyGe.Point3d, orthoView: OrthographicView) -> None:
This function sets origin to be the new model space 'default' UCS origin point for the view
specified by orthoView. orthoView may be any one of the AcDb::OrthographicView enumerators.
Returns Acad::eOk if successful.
def setWorldview(self, view: bool) -> None:
Sets view to be the WORLDVIEW value for the database. The value of false is 0. The value of
true is 1. See the System Variables section of the AutoCAD Command Reference for
information on WORLDVIEW. Returns Acad::eOk if successful.
def setXclipFrame(self, disp: int) -> None:
Sets the value of the XCLIPFRAME header variable.
def setXrefEditEnabled(self, enable: bool) -> None:
If enable is true, the XEDIT value of this database is set to 1. Otherwise, it is set to 0.
See the system variables documentation in the AutoCAD Command Reference for information on
XEDIT. Returns Acad::eOk if successful.
def shadedge(self) -> int:
Returns the current SHADEDGE value for the database. See the System Variables section of
the AutoCAD Command Reference for information on SHADEDGE.
def shadedif(self) -> int:
Returns the current SHADEDIF value for the database. See the System Variables section of
the AutoCAD Command Reference for information on SHADEDIF.
def shadowPlaneLocation(self) -> float:
Returns the current ground plane z position in world coordinates. The ground plane is
always parallel to the X-Y world plane. The default value is 0.0.
def showHist(self) -> int:
Returns the current SHOWHIST value for the database. See the System Variables section of
the AutoCAD Command Reference for information on SHOWHIST.
def sketchinc(self) -> float:
Returns the current SKETCHINC value for the database. See the System Variables section of
the AutoCAD Command Reference for information on SKETCHINC.
def skpoly(self) -> bool:
Returns the current SKPOLY value for the database. The value of false is 0. The value of
true is 1. See the System Variables section of the AutoCAD Command Reference for
information on SKPOLY.
def solidHist(self) -> int:
Returns the current SOLIDHIST value for the database. See the System Variables section of
the AutoCAD Command Reference for information on SOLIDHIST.
def sortEnts(self) -> int:
Returns the current SORTENTS value for the database.
def splframe(self) -> bool:
Returns the current SPLFRAME value for the database. The value of false is 0. The value of
true is 1. See the System Variables section of the AutoCAD Command Reference for
information on SPLFRAME.
def splinesegs(self) -> int:
Returns the current SPLINESEGS value for the database. See the System Variables section of
the AutoCAD Command Reference for information on SPLINESEGS.
def splinetype(self) -> int:
Returns the current SPLINETYPE value for the database. See the System Variables section of
the AutoCAD Command Reference for information on SPLINETYPE.
def stepSize(self) -> float:
Returns the current STEPSIZE value for the database. See the System Variables section of
the AutoCAD Command Reference for information on STEPSIZE.
def stepsPerSec(self) -> float:
Returns the current STEPSPERSEC value for the database. See the System Variables section of
the AutoCAD Command Reference for information on STEPSPERSEC.
def surftab1(self) -> int:
Returns the current SURFTAB1 value for the database. See the System Variables section of
the AutoCAD Command Reference for information on SURFTAB1.
def surftab2(self) -> int:
Returns the current SURFTAB2 value for the database. See the System Variables section of
the AutoCAD Command Reference for information on SURFTAB2.
def surftype(self) -> int:
Returns the current SURFTYPE value for the database. See the System Variables section of
the AutoCAD Command Reference for information on SURFTYPE.
def surfu(self) -> int:
Returns the current SURFU value for the database. See the System Variables section of the
AutoCAD Command Reference for information on SURFU.
def surfv(self) -> int:
Returns the current SURFV value for the database. See the System Variables section of the
AutoCAD Command Reference for information on SURFV.
def tableStyleDictionaryId(self) -> ObjectId:
Returns the object ID of the table style dictionary in named object dictionary. If the
function fails, the return value is AcDbObjectId::kNull.
def tablestyle(self) -> ObjectId:
Returns the object ID of the table style specified by the current CTABLESTYLE value of the
database. See the System Variables section of the AutoCAD Command Reference for information
on CTABLESTYLE. If the function fails, the return value is AcDbObjectId::kNull.
def tdcreate(self) -> Date:
Returns an AcDbDate object which contains the current TDCREATE value for the database. See
the System Variables section of the AutoCAD Command Reference for information on TDCREATE.
def tdindwg(self) -> Date:
Returns an AcDbDate object which contains the current TDINDWG value for the database. See
the System Variables section of the AutoCAD Command Reference for information on TDINDWG.
def tducreate(self) -> Date:
Returns the database's TDUCREATE value. See the System Variables section of the AutoCAD
Command Reference for information on TDUCREATE.
def tdupdate(self) -> Date:
Returns an AcDbDate object which contains the current TDUPDATE value for the database. See
the System Variables section of the AutoCAD Command Reference for information on TDUPDATE.
def tdusrtimer(self) -> Date:
Returns an AcDbDate object which contains the current TDUSRTIMER value for the database.
See the System Variables section of the AutoCAD Command Reference for information on
TDUSRTIMER.
def tduupdate(self) -> Date:
Returns the database's TDUUPDATE value. See the System Variables section of the AutoCAD
Command Reference for information on TDUUPDATE.
def textStyleTableId(self) -> ObjectId:
Returns the object ID of the database's AcDbTextStyleTable.
def textsize(self) -> float:
Returns the current TEXTSIZE value for the database. See the System Variables section of
the AutoCAD Command Reference for information on TEXTSIZE.
def textstyle(self) -> ObjectId:
Returns the object ID of the TextStyle specified by the current TEXTSTYLE value of the
database. See the System Variables section of the AutoCAD Command Reference for information
on TEXTSTYLE.
def thickness(self) -> float:
Returns the current THICKNESS value for the database. See the System Variables section of
the AutoCAD Command Reference for information on THICKNESS.
def tileModeLightSynch(self) -> int:
For internal use only.
def tilemode(self) -> bool:
Returns the current TILEMODE value for the database. The value of false is 0. The value of
true is 1. See the System Variables section of the AutoCAD Command Reference for
information on TILEMODE.
def timeZone(self) -> TimeZone:
Returns the current time zone for the drawing, an enumerated value. Time zone is best set
through the Geographic Location dialog.
def tracewid(self) -> float:
Returns the current TRACEWID value for the database. See the System Variables section of
the AutoCAD Command Reference for information on TRACEWID.
def transactionManager(self) -> TransactionManager:
Returns a pointer to the AcDbTransactionManager for the database.
def treedepth(self) -> int:
Returns the current TREEDEPTH value for the database. See the System Variables section of
the AutoCAD Command Reference for information on TREEDEPTH.
def tryGetObjectId(self, createIfNotFound: bool, objHandle: Handle, xRefId: int) -> ObjectId:
def tstackalign(self) -> int:
Returns the database's TSTACKALIGN value. See the system variables documentation in the
AutoCAD Command Reference for information on TSTACKALIGN.
def tstacksize(self) -> int:
Returns the database's TSTACKSIZE value. See the system variables documentation in the
AutoCAD Command Reference for information on TSTACKSIZE .
def ucsBase(self) -> ObjectId:
Returns the object ID of the AcDbUcsTableRecord that defines the origin and orientation of
orthographic UCS settings for the database's model space. The name of this
AcDbUcsTableRecord is used as the database's UCSNAME value. See the system variables
documentation in the AutoCAD Command Reference for information on UCSNAME.
def ucsname(self) -> ObjectId:
Returns the object ID of the UCS table entry that is currently in use in the Model Space of
the database; that is, the Model Space value of UCSNAME. See the System Variables section
of the AutoCAD Command Reference for information on UCSNAME.
def ucsorg(self) -> PyGe.Point3d:
Returns an AcGePoint3d, which is the current Model Space UCSORG value for the database. See
the System Variables section of the AutoCAD Command Reference for information on UCSORG.
def ucsxdir(self) -> PyGe.Vector3d:
Returns an AcGeVector3d, which is the current Model Space UCSXDIR value for the database.
See the System Variables section of the AutoCAD Command Reference for information on
UCSXDIR.
def ucsydir(self) -> PyGe.Vector3d:
Returns an AcGeVector3d, which is the current Model Space UCSYDIR value for the database.
See the System Variables section of the AutoCAD Command Reference for information on
UCSYDIR.
def undoRecording(self) -> bool:
Returns true if undo recording is enabled for the database.
def unitmode(self) -> int:
Returns the current UNITMODE value for the database. See the System Variables section of
the AutoCAD Command Reference for information on UNITMODE.
def updateDataLink(self, nDir: UpdateDirection, opt: UpdateOption) -> None:
Updates the data link manager. Returns Acad::eOk if successful; otherwise, returns an
AutoCAD error status.
def updateExt(self, doBestFit: bool) -> None:
This function iterates through all the entities in the database's Model Space and updates
the database's Model Space extents variables EXTMAX and EXTMIN to the values determined
during the iteration. Setting the argument doBestFit to TRUE means that while traversing
the database, any AcDbBlockReference entities found should have their geomExtentsBestFit()
method called instead of geomExtents(). This will be slower but will generate a tighter
bounding box (extents). Using the default argument of FALSE will be faster but may not
produce the tightest bounding box. Returns Acad::eOk if operation is successful.
def updateThumbnail(self) -> int:
Returns the UPDATETHUMBNAIL header variable value.
def useri1(self) -> int:
Returns the current USERI1 value for the database. See the System Variables section of the
AutoCAD Command Reference for information on USERI1.
def useri2(self) -> int:
Returns the current USERI2 value for the database. See the System Variables section of the
AutoCAD Command Reference for information on USERI2.
def useri3(self) -> int:
Returns the current USERI3 value for the database. See the System Variables section of the
AutoCAD Command Reference for information on USERI3.
def useri4(self) -> int:
Returns the current USERI4 value for the database. See the System Variables section of the
AutoCAD Command Reference for information on USERI4.
def useri5(self) -> int:
Returns the current USERI5 value for the database. See the System Variables section of the
AutoCAD Command Reference for information on USERI5.
def userr1(self) -> float:
Returns the current USERR1 value for the database. See the System Variables section of the
AutoCAD Command Reference for information on USERR1.
def userr2(self) -> float:
Returns the current USERR2 value for the database. See the System Variables section of the
AutoCAD Command Reference for information on USERR2.
def userr3(self) -> float:
Returns the current USERR3 value for the database. See the System Variables section of the
AutoCAD Command Reference for information on USERR3.
def userr4(self) -> float:
Returns the current USERR4 value for the database. See the System Variables section of the
AutoCAD Command Reference for information on USERR4.
def userr5(self) -> float:
Returns the current USERR5 value for the database. See the System Variables section of the
AutoCAD Command Reference for information on USERR5.
def usrtimer(self) -> bool:
Returns the current USRTIMER value for the database. A value of false is off. A value of
true is on. The usrtimer value indicates the on or off state of the user timer. The user
timer for the database currently loaded in the AutoCAD editor is also controlled via the
AutoCAD TIME command's On and Off options. The TDUSRTIMER system variable and the
AcDbDatabase::tdusrtimer() method both report the time kept by this timer.
def viewTableId(self) -> ObjectId:
Returns the object ID of the database's AcDbViewTable.
def viewportScaleDefault(self) -> float:
Returns the database's default value for viewport scale.
def viewportTableId(self) -> ObjectId:
Returns the object ID of the database's AcDbViewportTable.
def visretain(self) -> bool:
Returns the current VISRETAIN value for the database. The value of false is 0. The value of
true is 1. See the System Variables section of the AutoCAD Command Reference for
information on VISRETAIN.
def visualStyleDictionaryId(self) -> ObjectId:
Returns the object ID of the ACAD_VISUALSTYLE dictionary, which contains objects of type
AcDbVisualStyle.
def wblock(self) -> Database:
Creates a new AcDbDatabase object, sets pOutputDb to point to it, and then uses the
wblockClone mechanism to write the array of objects specified by outObjId entities out to
the Model Space block table record of the database pointed to by pOutputDb, using basePoint
as the base point value for pOutputDb. The calling application is responsible for
deallocating (via the C++ delete operator) the AcDbDatabase object that pOutputDb is set to
point to. Returns Acad::eOk if operation is successful. See the BASE command documentation
in the AutoCAD online help for more information on base point.
def wblock(self, blockId: PyDb.ObjectId) -> Database:
Creates a new AcDbDatabase object, sets pOutputDb to point to it, and then uses the
wblockClone mechanism to write the array of objects specified by outObjId entities out to
the Model Space block table record of the database pointed to by pOutputDb, using basePoint
as the base point value for pOutputDb. The calling application is responsible for
deallocating (via the C++ delete operator) the AcDbDatabase object that pOutputDb is set to
point to. Returns Acad::eOk if operation is successful. See the BASE command documentation
in the AutoCAD online help for more information on base point.
def wblock(self, blockIds: list[PyDb.ObjectId], basePoint: PyGe.Point3d) -> Database:
Creates a new AcDbDatabase object, sets pOutputDb to point to it, and then uses the
wblockClone mechanism to write the array of objects specified by outObjId entities out to
the Model Space block table record of the database pointed to by pOutputDb, using basePoint
as the base point value for pOutputDb. The calling application is responsible for
deallocating (via the C++ delete operator) the AcDbDatabase object that pOutputDb is set to
point to. Returns Acad::eOk if operation is successful. See the BASE command documentation
in the AutoCAD online help for more information on base point.
def wblock(*args) -> Database:
Creates a new AcDbDatabase object, sets pOutputDb to point to it, and then uses the
wblockClone mechanism to write the array of objects specified by outObjId entities out to
the Model Space block table record of the database pointed to by pOutputDb, using basePoint
as the base point value for pOutputDb. The calling application is responsible for
deallocating (via the C++ delete operator) the AcDbDatabase object that pOutputDb is set to
point to. Returns Acad::eOk if operation is successful. See the BASE command documentation
in the AutoCAD online help for more information on base point.
def wblockByRef(self, dbByRef: PyDb.Database, ids: list[PyDb.ObjectId], basePoint: PyGe.Point3d, drc: PyDb.DuplicateRecordCloning) -> None:
This method uses the wblockClone() mechanism to write the array of objects specified by
outObjIds to the model space block table record of the database pointed to by pOutputDb,
using basePoint as the base point value for pOutputDb. The AcDbDatabase pointed to by
pOutputDb must contain a header and symbol tables. Thus, if it was created with the
AcDbDatabase constructor's buildDefaultDrawing argument set to false, a drawing must have
already been read into it in order to populate it with a header and symbol tables. The drc
value determines what happens if symbols or dictionary entries are cloned when one or more
duplicates already exist in the destination database. drc must keep the same setting in
multiple calls, and can be only one of the following:
def wblockCloneObjects(self, ids: list[PyDb.ObjectId], owner: PyDb.ObjectId, idmap: PyDb.IdMapping, drc: PyDb.DuplicateRecordCloning, deferXlation: bool) -> None:
Clones all objects in the objectIds array and appends them to the container object
specified by owner. The objects can be from multiple source databases, and must match the
type of owner supplied, but must be from a different database than the owner object. owner
can only be an AcDbBlockTableRecord, AcDbDictionary, or AcDbSymbolTable object. In multiple
calls, the owners must be from the same destination database. If the owner is a dictionary,
newly cloned entries are set as anonymous. The idMap is filled with AcDbIdPair objects that
contain the objectId entities of the original and cloned object pairs. This array can be
used for post-processing the objects involved in the deepClone operation. The drc value
determines what happens if symbols or dictionary entries are cloned, and a duplicate is
found to already exist in the destination database. drc must keep the same setting in
multiple calls, and can be only one of the following: AcDb::kDrcIgnore -- If a duplicate is
found, ignore the clone, and continue to use the existing record in the destination
database. This is how the INSERT command and AcDbDatabase::insert()
operate.AcDb::kDrcReplace -- If a duplicate is found, replace it with the cloned
record.AcDb::kDrcMangleName -- Mangle all the incoming record names. The mangling will also
ensure unique names. This is how the RefEdit command works.AcDb::kDrcUnmangleName --
Primarily used by RefEdit when it checks the records back into the origin database. Any
mangling done by kDrcMangleName is undone, and then it defaults to kDrcIgnore. In other
words, if a duplicate is found after removing the mangling, AutoCAD continues to use the
existing record, and ignores the cloned one. When the objects to be cloned do not all have
the same owner, then it is necessary to make up individual AcDbObjectIdArray entities, each
one containing all the objects with the same owner. The wblockCloneObjects() method is then
called once for each array, with the deferXlation argument set to true for all but the last
call, so that ID translation will be done to complete the cloning. Refer to the ObjectARX
Developer's Guide for more information on the use of this function. Possible return value
are as follows: Various open errors -- if the owner cannot be opened for
kForWrite.eInvalidOwnerObject -- if the owner is not one of the three valid types of
object.eInvalidInput -- if the drc is not one of the four valid types, or not the same on
multiple calls.eWrongDatabase -- if the owners are not from the same
databaseeIllegalEntityType -- if the objects being cloned do not accept the owner passed
in.
def worldPucsBaseOrigin(self, view: OrthographicView) -> PyGe.Point3d:
This function returns the database's paperspace 'default' UCS origin point (in WCS
coordinates) for the view specified by orthoView. orthoView may be any one of the
AcDb::OrthographicView enumerators.
def worldUcsBaseOrigin(self, view: OrthographicView) -> PyGe.Point3d:
This function returns the database's model space 'default' UCS origin point (in WCS
coordinates) for the view specified by orthoView. orthoView may be any one of the
AcDb::OrthographicView enumerators.
def worldview(self) -> bool:
Returns the current WORLDVIEW value for the database. The value of false is 0. The value of
true is 1. See the System Variables section of the AutoCAD Command Reference for
information on WORLDVIEW.
def xclipFrame(self) -> int:
The value of the XCLIPFRAME header variable.
def xrefBlockId(self) -> ObjectId:
This function returns the object ID of the AcDbBlockTableRecord which refers to this
database as an xref. When an xref is reloaded by any means (for example, by the XREF Reload
or XREF Path commands), the former database is kept in memory for Undo. This means that
more than one database may point to the same xref block table record. However, only one may
be the currently active xref database for that record. The database pointer returned by the
AcDbBlockTableRecord::xrefDatabase() function on the found record is the active database
for that xref.
def xrefEditEnabled(self) -> bool:
Returns the database's XEDIT value. A return value of true is the same as an XEDIT value of
1. See the system variables documentation in the AutoCAD Command Reference for information
on XEDIT.
class DatabaseOpenMode Class
kForReadAndReadShare: ClassVar[Self]
kForReadAndWriteNoShare: ClassVar[Self]
kForReadAndAllShare: ClassVar[Self]
kTryForReadShare: ClassVar[Self]
class DatabaseReactor Class
def __init__(self) -> None:
The AcDbDatabaseReactor class, if defined, allows notification to be issued when an object
is appended, modified, or erased from a drawing database.
def __reduce__(self) -> Any:
def className() -> str:
def desc() -> PyRx.RxClass:
Returns a pointer to the AcRxClass object representing the specific class, or most recent
parent class explicitly registered with ObjectARX of either the pointer type used to invoke
it or the class qualifier used with it. (Remember that when a static member function is
invoked via a pointer, the pointer type, not the object type, determines which
implementation of the function is invoked.) When working with a pointer to an object and
the proper AcRxClass object for the class of the object pointed to is desired, the
AcRxObject::isA() function should be used, since it is a virtual non-static method and is
therefore not pointer type dependent. Caching the value of the pointer returned by this
method is acceptable, provided the application knows that the AcRxClass object pointed to
by the returned pointer was created by an ObjectARX application that will not be unloaded.
def goodbye(self, db: PyDb.Database) -> None:
This notification occurs when the DWG database is about to be deleted.
def headerSysVarChanged(self, db: PyDb.Database, name: str, success: bool) -> None:
This callback indicates that an attempt was made to change the 'name' system variable. It
does not indicate that the actual value was changed. In some cases, it is possible to set a
system variable without causing its value to change. For example, if FILLMODE was 0 and
someone tried to set it to 0, then you would get a callback for that system variable, even
though the call had no actual affect on the value of FILLMODE. If bSuccess == False, it
indicates that an attempt was made to set the system variable to an invalid value. This
method only handles database-resident system variables. See the AcDbDatabase class for the
get and set methods for the database-resident system variables. See also the
AcEditorReactor::headerSysVarChanged method for non-database-resident system variable
notifications.
def headerSysVarWillChange(self, db: PyDb.Database, name: str) -> None:
This callback indicates that an attempt is being made to change the 'name' system variable.
This callback provides applications with the ability to find out what the original value of
the system variable was before the value changed. This callback is always called when a
system variable is changed through the command interface. If a system variable is changed
through the API, it only gets called if the new value is valid. This method only handles
database-resident system variables. See the AcDbDatabase class for the get and set methods
for the database-resident system variables. See also the
AcEditorReactor::headerSysVarWillChange method for non-database-resident system variable
notifications.
def objectAppended(self, db: PyDb.Database, obj: PyDb.DbObject) -> None:
This function is invoked when an AcDbObject is added to any AcDbDatabase. The arguments dwg
and dbObj are const pointers to the actual objects involved in the operation. This function
is invoked after the object has been added to the database.
def objectErased(self, db: PyDb.Database, obj: PyDb.DbObject, erased: bool) -> None:
This function is invoked when an AcDbObject object is being erased or unerased from an
AcDbDatabase. The pErased argument is a Boolean, indicating whether the object has been
erased or unerased. The invocation of this function takes place after the operation has
completed. A value of True indicates that the object is being erased. A value of False
indicates that the object is being unerased.
def objectModified(self, db: PyDb.Database, obj: PyDb.DbObject) -> None:
This function is invoked after the object has been modified. The arguments indicate which
drawing database and which object were modified. The notification takes place after the
Modify operation is complete.
def objectOpenedForModify(self, db: PyDb.Database, obj: PyDb.DbObject) -> None:
This function is invoked before the object has been modified. The arguments indicate which
drawing database and which object were modified. The notification takes place before any
Modify operation.
def objectReAppended(self, db: PyDb.Database, obj: PyDb.DbObject) -> None:
This notification occurs when the object pointed to by dbObj has had its addition to the
AcDbDatabase dwg undone during an Undo operation and has now been reappended to the
database due to an execution of the AutoCAD REDO command.
def objectUnAppended(self, db: PyDb.Database, obj: PyDb.DbObject) -> None:
This notification occurs when the object pointed to by dbObj has its addition to the
AcDbDatabasedwg undone by an Undo operation.
def proxyResurrectionCompleted(self, db: PyDb.Database, name: str, ids: list[PyDb.ObjectId]) -> None:
This function is invoked when the loading of an ObjectARX or ObjectDBX module resurrects
proxy objects in the DWG database. This function is invoked only if the application that
was loaded has registered a logical appname. The notification is sent after the application
is loaded and all affected proxies are resurrected.
class DatabaseSummaryInfo Class
def __getitem__(self, index: int) -> tuple:
def __init__() -> None:
Raises an exception.
This class cannot be instantiated from Python.
def __reduce__(self) -> Any:
def addCustomSummaryInfo(self, key: str, val: str) -> None:
def asDict(self) -> dict:
def className() -> str:
def deleteCustomSummaryInfo(self, index: int) -> None:
def deleteCustomSummaryInfo(self, key: str) -> None:
def deleteCustomSummaryInfo(*args) -> None:
def getAuthor(self) -> str:
def getComments(self) -> str:
def getCustomSummaryInfo(self, index: int) -> tuple[str, str]:
def getCustomSummaryInfo(self, key: str) -> tuple[str, str]:
def getCustomSummaryInfo(*args) -> tuple[str, str]:
def getHyperlinkBase(self) -> str:
def getKeywords(self) -> str:
def getLastSavedBy(self) -> str:
def getRevisionNumber(self) -> str:
def getSubject(self) -> str:
def getTitle(self) -> str:
def numCustomInfo(self) -> int:
def setAuthor(self, val: str) -> None:
def setComments(self, val: str) -> None:
def setCustomSummaryFromDict(self, keyValues: dict) -> None:
def setCustomSummaryInfo(self, customInfoKey: str, value: str) -> None:
def setCustomSummaryInfo(self, index: int, key: str, value: str) -> None:
def setCustomSummaryInfo(*args) -> None:
def setHyperlinkBase(self, val: str) -> None:
def setKeywords(self, keywordlist: str) -> None:
def setLastSavedBy(self, val: str) -> None:
def setRevisionNumber(self, val: str) -> None:
def setSubject(self, val: str) -> None:
def setTitle(self, val: str) -> None:
class Date Class
def __add__(self, val: PyDb.Date) -> Date:
def __ge__(self, val: PyDb.Date) -> bool:
def __gt__(self, val: PyDb.Date) -> bool:
def __iadd__(self, val: PyDb.Date) -> Date:
def __init__(self) -> None:
This class is used to pass date and time information to or from various AutoCAD ObjectARX
functions. This class exports a conventional representation of date and time as well as a
Julian date and time representation. AutoLISP uses Julian dates. For reference, see the
DATE system variable in the AutoCAD Command Reference.
def __isub__(self, val: PyDb.Date) -> Date:
def __le__(self, val: PyDb.Date) -> bool:
def __lt__(self, val: PyDb.Date) -> bool:
def __reduce__(self) -> Any:
def __sub__(self, val: PyDb.Date) -> Date:
def className() -> object:
def day(self) -> int:
Returns a number in the range 1 to 31 indicating the day of the month.
def getDate(self) -> tuple[int, int, int]:
Gets the date through the parameters month, day, and year. month is in the range 1 to 12.
day is in the range 1 to 31. year is a standard year value such as 1998.
def getLocalDisplayString(self) -> str:
This is getLocalDisplayString, a member of class AcDbDate.
def getLocalTime(self) -> None:
Sets the AcDbDate object to the current time based on the local machine's time.
def getTime(self) -> tuple[int, int, int, int]:
This method fills st with this AcDbDate's time_t information.
def getUniversalTime(self) -> None:
Sets the AcDbDate object to the current time based on the Microsoft 'Coordinated Universal
Time.'
def hour(self) -> int:
Returns the hour past midnight value. This is a number in the range 0 to 23.
def julianDay(self) -> int:
Returns the Julian day portion of the Julian date representation.
def julianFraction(self) -> float:
Returns the Julian fraction portion of the Julian date representation.
def localToUniversal(self) -> None:
This method converts the AcDbDate's date from local to universal time.
def microsecond(self) -> int:
def millisecond(self) -> int:
Returns the milliseconds past the second (the second is the second past the minute past the
hour past midnight) portion of the time value. This is a number in the range 0 to 999.
def minute(self) -> int:
Returns the minute past the hour (the hour is the hour past midnight) portion of the time
value. This is a number in the range 0 to 59.
def month(self) -> int:
Returns the month of the year part of the Date object's Julian date value. This is a number
in the range 1 to 12.
def msecsPastMidnight(self) -> int:
Returns the number of milliseconds past midnight for this date.
def second(self) -> int:
Returns the seconds past the minute (the minute is the minute past the hour past midnight)
a number in the range 0 to 59.
def setDate(self, month: int, day: int, year: int) -> None:
Sets month, day, and year to be the month, day, and year portion of the AcDbDate object's
value. The month must be in the range 1 to 12, the day in the range 1 to 31, and the year
is a value such as 1998.
def setDay(self, day: int) -> None:
Sets day to be the day of the month portion of the AcDbDate object's value. Must be in the
range 1 to 31. WarningThis class does not rationalize or validate input. Be careful to
check the state of the object against your input data before setting date elements
individually. For instance, if you set the month to a value that is invalid for the current
day setting, or vice versa, the internal Julian date calculation may yield unintended
results, as shown below: AcDbDate mydate(AcDbDate::kInitLocalTime);// the date today
happens to be 10/31/2005// this call asks the date class to set the date to 9/31,// which
doesn't existmydate.setMonth(9);// date has been 'rolled over' to 10/1mydate.setDay(21);//
date is now 10/21 instead of 9/21For best consistency and efficiency, use the setDate()
function.
def setHour(self, hour: int) -> None:
Sets hour to be the hour of the day portion of the AcDbDate object's value. Must be in the
range 0 to 23.
def setJulianDate(self, julianDay: int, msec: int) -> None:
Sets the Julian day value of the AcDbDate object to julianDay and the milliseconds past
midnight value of the Date object to msec. The Julian day is a number from 1 to 366.
def setJulianDay(self, day: int) -> None:
Sets the Julian day value of the AcDbDate object to julianDay. The Julian day is a number
from 1 to 366.
def setJulianFraction(self, val: float) -> None:
Sets the Julian fraction portion of the AcDbDate object to fraction.
def setMillisecond(self, msec: int) -> None:
Sets msec to be the AcDbDate object's milliseconds past the second value (the second is the
second past the minute past the hour past midnight). Must be in the range 0 to 999.
def setMinute(self, min: int) -> None:
Sets min to be the AcDbDate object's minutes past the hour value (the hour is the hour past
midnight). Must be in the range 0 to 59.
def setMonth(self, month: int) -> None:
Sets month to be the AcDbDate object's month of the year value. Must be in the range 1 to
12. WarningThis class does not rationalize or validate input. Be careful to check the state
of the object against your input data before setting date elements individually. For
instance, if you set the month to a value that is invalid for the current day setting, or
vice versa, the internal Julian date calculation may yield unintended results, as shown
below: AcDbDate mydate(AcDbDate::kInitLocalTime);// the date today happens to be
10/31/2005// this call asks the date class to set the date to 9/31,// which doesn't
existmydate.setMonth(9);// date has been 'rolled over' to 10/1mydate.setDay(21);// date is
now 10/21 instead of 9/21For best consistency and efficiency, use the setDate() function.
def setMsecsPastMidnight(self, msec: int) -> None:
Sets msec to be the milliseconds past midnight (not milliseconds past the second) value for
the AcDbDate object. msec must be in the range 0 to 86,399,999.
def setSecond(self, sec: int) -> None:
Sets second to be the AcDbDate object's seconds past the minute value (the minute is the
minute past the hour past midnight). Must be in the range 0 to 59.
def setTime(self, hour: int, min: int, sec: int, msec: int) -> None:
This method sets this AcDbDate from the information in st.
def setToZero(self) -> None:
This method sets the AcDbDate's date to 0.
def setYear(self, year: int) -> None:
Sets year to be the year part of the Julian date in the AcDbDate object in standard format,
such as 1998.
def timestamp(self) -> float:
def universalToLocal(self) -> None:
This method converts the AcDbDate's date from universal to local time.
def year(self) -> int:
Returns the year (for example, 2001).
class DbObject Class
def __init__(self, id: PyDb.ObjectId, mode: PyDb.OpenMode, erased: bool) -> None:
The AcDbObject class is the base class for all objects that reside in an AcDbDatabase
object. This class provides all the functionality for database residency such as objectId,
handle, ownership backpointer, filing, persistent reactor notification, xdata, deepClone,
object state queries, erase, audit, etc. Many of these involve virtual functions so that
they can be overridden in classes derived from AcDbObject.Construction / DeletionWhen you
wish to add an object to an AcDbDatabase, you must allocate it via new(), never by
declaring it directly on the stack. Once an object is added to an AcDbDatabase object,
whether directly (that is, via AcDbDatabase::addAcDbObject())or indirectly (that is, adding
it to an AcDbBlockTableRecord or AcDbDictionary object), responsibility of deleting the
object lies with the AcDbDatabase object. No form of Undo or Cancel overrides this! To
remove an object from a database, use AcDbObject::erase() to mark it as erased so that it
is not filed out during any subsequent saves. Relying on other AcDbObject instances during
construction or deletion is prohibited, and likely to end in program failure. Objects
needing to free up objects from other object chains, such as non-persistent reactors, are
advised toreconsider using persistent reactors, andoverride their AcDbObject::goodbye()
member to do cleanup.For a given database, all objects have their goodbye() members invoked
before all objects are subsequently deleted in an arbitrary order. Relying on order of
AcDbObject deletion at drawing close time is not considered a healthy, or supportable,
practice. Beware that when xrefs are present, the databases are deleted in sequence. So,
inter-xref references can be unpredictably broken unless the references set up callbacks to
AcDbObjectReactor::goodbye(), and listen for each other's goodbyes.AccessNever access a
pointer to an object that is closed.Opening ObjectsObjects can be opened in one of three
modes: Value Meaning AcDb::kForRead Up to 256 readers can be opened at once, as long as
object is not already open kForWrite or kForNotify. Member functions invoked when an object
is opened kForRead should not cause object to be modified. AcDb::kForWrite Can be opened
for write if it is not open at all, otherwise an open kForWrite fails. Member functions
invoked when an object is opened kForWrite may or may not modify the object.
AcDb::kForNotify Can be opened for notification whenever it is closed, open for read (any
number) or open for write, but not when it is already open for notify. Member functions
allowed to be invoked when open in this mode should not interfere with any current readers
or writers, although they may cause the object to alter itself. kForNotify is intended to
be the most powerful open function, and the most transient. Opening in kForNotify mode can
only fail if a previous user has left it open in this mode. When open in this mode, any
subsequent open requests fail, even kForNotify. Therefore, this mode should be used
sparingly, and objects opened in this mode should be sent the proper member function call
or calls and closed as soon as possible. Because of the restrictions on multiple opening of
objects, never leave objects open any longer than necessary and always try to open in the
least restrictive mode necessary.ImplementationDefinitions of member functions in custom
classes derived from AcDbObject should begin with a call to one of the following AcDbObject
methods in order to be sure the object is opened in the correct mode and to prime or
trigger the notification mechanism (if
appropriate):assertReadEnabled()assertWriteEnabled()assertNotifyEnabled()Classes that
derive from AcDbObject and then use dllexport() on that class will need to add their own
new[] and delete[] operators.
def __reduce__(self) -> Any:
def addContext(self, obj: PyDb.ObjectContext) -> None:
def addPersistentReactor(self, id: PyDb.ObjectId) -> None:
Adds the database-resident object specified by objId to the reactor list of the AcDbObject
object.
def addReactor(self, reactor: PyDb.DbObjectReactor) -> None:
Adds the transient reactor pointed to by pNewObj to the AcDbObject object's reactor list.
def assertNotifyEnabled(self) -> None:
This function is used only inside of member functions of classes derived from AcDbObject.
It should be used inside of member functions that are only called when the object is open
kForNotify. When used, it should be the first function called inside the member function.
def assertReadEnabled(self) -> None:
This function is used only inside of member functions of classes derived from AcDbObject.
It should only be used inside of member functions that access the object's data in a
read-only fashion (for example, dxfOutFields()). When used, it should be the first function
called inside the member function. Its purpose is to make sure that the object is open
AcDb::kForRead. If this function is called while the object is not open, AutoCAD terminates
(allowing the user to save changes).
def assertWriteEnabled(self) -> None:
This function is used only inside of member functions of classes derived from AcDbObject.
It should only be used inside of member functions that modify the object's data (for
example, dxfInFields()). When used, it should be the first function called inside the
member function. Its purpose is to make sure that the object is indeed open for write (if
it is not, then AutoCAD terminates); to trigger an immediate sending of 'openedForModify'
notification; to set up the notification mechanism so that 'modified' and
'modifiedGraphics' (if the object is derived from AcDbEntity) are sent at the appropriate
times; and to ensure that graphics get updated if the object is derived from AcDbEntity. If
this function is called on a database resident object, 'openedForModify' will be sent if
the object is not newly created, and 'modified', and 'modifiedGraphics' (if appropriate)
notifications will be sent when the object is next closed. If recordModified is false, then
the autoUndo argument is ignored, and the undo filer is not initialized, no undo recording
will take place, but notifications will be sent. If autoUndo and recordModified are both
true, then automatic undo recording will be performed and notifications will be sent. If
autoUndo is false and recordModified is true, then there will not be any automatic undo
recording, but the undo filer is initialized and the object must manually write out partial
Undo records and must implement its applyPartialUndo() method. Notifications will be sent.
If this function is called while the object is not open AcDb::kForWrite, AutoCAD terminates
(allowing the user to save changes).
def cancel(self) -> None:
Terminates the current open operation. All changes made to the object since it was opened
are undone, the object is marked as closed, and 'cancel' notification is sent. Returns
Acad::eOk if successful.
def cast(otherObject: PyRx.RxObject) -> DbObject:
def className() -> str:
def cloneFrom(otherObject: PyRx.RxObject) -> DbObject:
def close(self) -> None:
Closes the object. All changes made to the object since it was opened are committed to the
database, the object is marked as pageable, and a 'closed' notification (as well as any
other appropriate notification such as 'modified', 'erased', and so on) is sent. Returns
Acad::eOk if successful. If the object is not in an AcDbDatabase yet, then
Acad::eNoDatabase is returned. If the object is sending notification, then
Acad::eCloseWasNotifying is returned. If the subClose() call made within the close() method
returns anything other than Acad::eOk, then that ErrorStatus is returned.
def createExtensionDictionary(self) -> None:
Creates an AcDbDictionary object and sets it up as the extension dictionary for the
AcDbObject. Returns Acad::eOk if successful. If an extension dictionary already exists,
Acad::eAlreadyInDb is returned.
def database(self) -> Database:
Returns a pointer to the AcDbDatabase object that contains the AcDbObject.
def databaseToUse(self) -> Database:
This method returns a pointer to a AcDbDatabase object that can be used with this
AcDbObject. If the AcDbObject is in an AcDbDatabase, then a pointer to the AcDbDatabase
returned by the object's database() method will be returned, otherwise, if the AcDbObject
has a non-nullptr intendedDatabase, then a pointer to that AcDbDatabase will be returned,
otherwise a pointer to the current AcDbHostApplicationServices' workingDatabase will be
returned.
def deepClone(self, owner: PyDb.DbObject, mapping: PyDb.IdMapping, isPrimary: bool) -> DbObject:
This function gives control of deep clone operations to the object. In the default
implementation, the object is cloned and appended to the owner object (pOwnerObject). The
cloning is performed by an AcDbDeepCloneFiler. A record is also added to the idMap. Then,
using the filer, any owned objects are deep cloned, with isPrimary set to Adesk::kFalse.
def desc() -> PyRx.RxClass:
Returns a pointer to the AcRxClass object representing the specific class, or most recent
parent class explicitly registered with ObjectARX of either the pointer type used to invoke
it or the class qualifier used with it. (Remember that when a static member function is
invoked via a pointer, the pointer type, not the object type, determines which
implementation of the function is invoked.) When working with a pointer to an object and
the proper AcRxClass object for the class of the object pointed to is desired, the
AcRxObject::isA() function should be used, since it is a virtual non-static method and is
therefore not pointer type dependent. Caching the value of the pointer returned by this
method is acceptable, provided the application knows that the AcRxClass object pointed to
by the returned pointer was created by an ObjectARX application that will not be unloaded.
def disableUndoRecording(self, disable: bool) -> None:
Turns off or on the Undo recording for the object. If disable == Adesk::kTrue, then Undo
recording is turned off until this function is called with disable == Adesk::kFalse, at
which time Undo recording is turned back on.
def downgradeOpen(self) -> None:
Downgrades the object from being open AcDb::kForWrite, to being AcDb::kForRead. In the
process, all changes made to the object while it was open for write are committed to the
database and appropriate notification is sent.
def downgradeToNotify(self, wasWritable: bool) -> None:
Restores an object from being open both AcDb::kForNotify and AcDb::kForWrite, to being open
just AcDb::kForNotify. The wasWritable value that was returned from the matching
AcDbObject::upgradeFromNotify() call should be passed into this function to restore the
proper open status. This function must have been preceded by a call to upgradeFromNotify().
Returns Acad::eOk if successful.
def erase(self, erasing: bool) -> None:
Sets the erase bit of the object. If erasing == Adesk::kTrue, then the erase bit is set on.
If erasing == Adesk::kFalse, then the erase bit is set off.
def extensionDictionary(self) -> ObjectId:
Returns the objectId of the extension dictionary owned by the object. If the object does
not own an extension dictionary, then the returned objectId is set to AcDbObjectId::kNull.
def getBinaryData(self, key: str) -> object:
def getField(self, prop: str) -> ObjectId:
Gets the field ID. A field can be stored in an object using the property name as the key.
Returns Acad::eOk if the object has a field for the specified property. Otherwise, returns
an AutoCAD error status.
def getFieldDictionary(self) -> ObjectId:
Returns the field dictionary ID. The field dictionary stores all the fields set in the
object as property name-field object pairs. The ID will be null if there is no field in the
object.
def getHandle(self) -> Handle:
Fills in handle with the handle value for the object. If the object is not yet
database-resident, then it will not have a handle. Use AcDbHandle::isNull to test for this
condition.
def getXDBinaryData(self, key: str) -> object:
def handOverTo(self, newObject: PyDb.DbObject, keepXData: bool, keepExtDict: bool) -> None:
This function provides the ability to exchange a non-database-resident object (NDBRO) in
place of an existing database-resident object (DBRO) while retaining the objectId, handle,
and reactor list of the DBRO. An example of this situation is when the BREAK command is
used to break a circle into one or two arc segments. AcDbArc is a completely different
class from AcDbCircle, so a new AcDbArc object must be substituted in place of the
AcDbCircle object that is there now, yet the arc must get the handle and objectId that the
circle has. To use the handOverTo() function, the object to be replaced (the AcDbCircle in
the example) must be open AcDb::kForWrite. The object's handOverTo() function is called
with newObject pointing to a non-database-resident object that replaces it (the AcDbArc in
the example). keepXData is set to Adesk::kTrue if the xdata is to be retained or
Adesk::kFalse if the xdata is to be thrown out. keepExtDict is set to Adesk::kTrue if the
extension dictionary and its contents are to be retained, or set to Adesk::kFalse if the
extension dictionary and its contents are to be thrown out. Once returned from this
function, the replacement object (the AcDbArc in the example) is open for AcDb::kForWrite
and must have its close() member called to commit the change and close out Undo recording.
Then it's up to the ObjectARX application to delete the old object (the AcDbCircle in the
example) from memory since it's no longer database-resident. Returns
Acad::eObjectToBeDeleted if the operation is successful. If newObject is pointing to an
object that is already in the database, or the object invoking handOverTo() is not
database-resident, then Acad::eIllegalReplacement is returned.
def hasFields(self) -> bool:
Returns true if the object has one or more PyDb.Field Objects. Otherwise returns false.
def hasPersistentReactor(self, id: PyDb.ObjectId) -> bool:
This method returns true if objId is the object ID of a reactor attached to this object.
Otherwise, it returns false.
def hasXData(self, appname: str) -> bool:
def isAProxy(self) -> bool:
Returns Adesk::kTrue if the object is a proxy object or entity. Otherwise returns
Adesk::kFalse.
def isAcDbObjectIdsInFlux(self) -> bool:
This function refers to a condition that occurs during deep clone operations. It returns
Adesk::kTrue when the cloned objects' IDs have not yet been translated and thus cannot be
used in any operations on the objects. This condition normally occurs only during
AcEditorReactor::beginDeepCloneXlation, AcDbObject::deepClone, or AcDbObject::wblockClone.
Any operations that involve AcDbObjectId references, such as symbol table records, should
be postponed until after endDeepClone. AcDbObject::subClose is never called on any objects
whose IDs are in flux.
def isAnnotative(self) -> AnnotativeStates:
def isCancelling(self) -> bool:
Returns Adesk::kTrue if the object is currently in the middle of a cancel() call (that is,
an open is being canceled and all changes made are being rolled back). Otherwise returns
Adesk::kFalse.
def isEraseStatusToggled(self) -> bool:
Returns Adesk::kTrue if the object's erase bit has been toggled since it was opened.
Otherwise returns Adesk::kFalse.
def isErased(self) -> bool:
Returns Adesk::kTrue if the object is currently erased. Otherwise returns Adesk::kFalse.
def isModified(self) -> bool:
Returns Adesk::kTrue if the object has had an assertWriteEnabled() called since it was
opened (which would indicate that a member function that can change its data was called).
Otherwise returns Adesk::kFalse.
def isModifiedGraphics(self) -> bool:
Returns Adesk::kTrue if the object is derived from AcDbEntity and has had either an
assertWriteEnabled() called since it was opened (which would indicate that a member
function that can change its data was called), or its recordGraphicsModified() function
called with an Adesk::kTrue argument value. Otherwise it returns Adesk::kFalse.
def isModifiedXData(self) -> bool:
Returns Adesk::kTrue if the object has had an assertWriteEnabled() called since it was
opened (which would indicate that a member function that can change its data was called)
and has then had its setXData() method called. Otherwise it returns Adesk::kFalse.
def isNewObject(self) -> bool:
Returns Adesk::kTrue if the object has not yet been closed since it was first created.
Otherwise returns Adesk::kFalse.
def isNotifyEnabled(self) -> bool:
Returns Adesk::kTrue if the object is currently open AcDb::kForNotify. Otherwise returns
Adesk::kFalse.
def isNotifying(self) -> bool:
Returns Adesk::kTrue if the object is in the process of sending notification. Otherwise
returns Adesk::kFalse.
def isReadEnabled(self) -> bool:
Returns Adesk::kTrue if the object is currently open AcDb::kForRead. Otherwise returns
Adesk::kFalse.
def isReallyClosing(self) -> bool:
Returns true if calling close() at this time would really close the object completely. For
example, if the object is not in a transaction, and is open for read with only one reader,
then Adesk::kTrue would be returned. If, on the other hand, the object is in a transaction,
then Adesk::kFalse would be returned.
def isTransactionResident(self) -> bool:
Returns Adesk::kTrue if the object is currently part of a transaction. Otherwise returns
Adesk::kFalse.
def isUndoRecordingDisabled(self) -> bool:
Returns true if undo recording is disabled.
def isUndoing(self) -> bool:
Returns Adesk::kTrue if the object is involved in an Undo operation at this time. Otherwise
returns Adesk::kFalse.
def isWriteEnabled(self) -> bool:
Returns Adesk::kTrue if the object is currently open AcDb::kForWrite and is not currently
sending notification. Otherwise returns Adesk::kFalse.
def objectId(self) -> ObjectId:
Returns the objectId of the object. If the object is not yet database-resident, then the
returned objectId will be set to AcDbObjectId::kNull.
def ownerId(self) -> ObjectId:
Returns the objectId of the owner of the object. If the object does not yet have an owner,
or the ownerId data member has not yet been set using AcDbObject::setOwnerId, then the
returned objectId will be set to AcDbObjectId::kNull. Appending the object to a BlockTable
record, a symbol table, or a dictionary automatically calls AcDbObject::setOwnerId.
def releaseExtensionDictionary(self) -> None:
Removes the object's extension dictionary (that is, removes the object as the owner of the
dictionary object) if it exists and is empty. Once removed, this function calls the
dictionary's erase() method. Any reactors attached to the extension dictionary receive
normal notification appropriate to an open for write, erase, close sequence. Returns
Acad::eOk if successful. If the dictionary is not empty, then this function fails and
returns Acad::eContainerNotEmpty.
def removeContext(self, obj: PyDb.ObjectContext) -> None:
def removeField(self, id: str | PyDb.ObjectId) -> None:
Removes the specified field. Returns Acad::eOk if successful. Otherwise, returns an AutoCAD
error status.
def removePersistentReactor(self, id: PyDb.ObjectId) -> None:
Removes the persistent reactor specified by objId from the reactor list of the object. The
object must be open AcDb::kForWrite to be able to execute this function. Returns Acad::eOk
if successful. If the object is currently sending notification and is not open
AcDb::kForWrite, then Acad::eWasNotifying is returned.
def removeReactor(self, reactor: PyDb.DbObjectReactor) -> None:
Removes reactor pointed to by pNewObj from the object's reactor list. The object may be
open AcDb::kForRead or AcDb::kForWrite when this function is called.
def setAcDbObjectIdsInFlux(self) -> None:
This function must be called on any newly created objects in AcDbObject::deepClone or
AcDbObject::wblockClone. It indicates that reference object IDs are not yet pointing to the
correct objects. The references can be translated only when the entire deep clone operation
is complete. The flag is cleared at that time.
def setAnnotative(self, state: PyDb.AnnotativeStates) -> None:
def setBinaryData(self, key: str, data: memoryview) -> ObjectId:
def setField(self, field: PyDb.Field) -> ObjectId:
def setField(self, propName: str, field: PyDb.Field) -> ObjectId:
def setField(*args) -> ObjectId:
def setOwnerId(self, owner: PyDb.ObjectId) -> None:
Sets the ownerId data member of the object to be objId, thus establishing a 'backpointer.'
This backpointer is used by WBLOCK to be sure all necessary objects are written out.
Returns Acad::eOk if successful.
def setXDBinaryData(self, key: str, data: memoryview) -> None:
def setXData(self, xdata: list[tuple[int, Any]]) -> None:
Each regapp sublist (delimited by a resbuf with restype == 1001 and resval.rstring == a
valid regappName string) within the resbuf chain pointed to by xdata, is placed in the
xdata area of the object. If any of the regappNames in xdata are already present in the
xdata area of the object, then that regappName's existing data on the object is overwritten
by that regappName's new data in xdata. All resbufs with restype == 1001 must have valid
regappNames for the database the object resides in (that is, the regappNames must be in the
APPID table of the database). Only valid xdata group codes (1000--1071) are accepted in the
restype fields of the resbufs in xdata. No '-3' group code is necessary, and in fact, is
not accepted. So, the first element in the resbuf chain must be a 1001 group code with a
resval.rstring set to a regappName that's already registered in the regapp table. To
register a regappName, use the acdbRegApp() function. To remove an appName (and its xdata)
from an object, just use a resbuf with restype == 1001, resval == and no data resbufs
following it (that is, either its rbnext == NULL or the next resbuf is another 1001) This
function is virtual because some objects or entities may need to store some or all of their
'built-in' state as xdata. Classes defining such objects can override this function in
order to monitor and validate xdata requests as they see fit. If an object does not care
about what xdata is attached to it (which is the preferred practice), then it need not
override this member. If this function is overridden, then it should supermessage its
parent in order to invoke the built-in mechanism to add the xdata to the object. Returns
Acad::eOk if the xdata is successfully added to the object. If there is insufficient space
in the xdata area of the object, then Acad::eXdataSizeExceeded is returned. If any of the
regappNames in xdata are not in the APPID table, then Acad::eRegappIdNotFound is returned.
def snoop(self, filer: PyDb.SnoopDwgFiler) -> None:
def snoopdxf(self, filer: PyDb.SnoopDxfFiler) -> None:
def swapIdWith(self, otherId: PyDb.ObjectId, swapXdata: bool, swapExtDict: bool) -> None:
This function swaps objectIds and handles between the object specified by otherId and the
object invoking this function. Both objects must currently be database-resident and must
reside in the same database. If swapXdata == Adesk::kTrue, then the objects swap extended
entity data as well. If swapExtDict == Adesk::kTrue, then the objects swap extension
dictionaries also. If the object specified by otherId or the object invoking this function
are not database-resident, then Acad::eNoDatabase is returned. If both objects involved are
not in the same database, then Acad::eWrongDatabase is returned.
def upgradeFromNotify(self, wasWritable: bool) -> None:
Upgrades the object from being at least open AcDb::kForNotify to being open both
AcDb::kForNotify and AcDb::kForWrite. The wasWritable argument is set to Adesk::kTrue if
the object was already open for write, otherwise it's set to Adesk::kFalse. The wasWritable
value should be saved to be passed into the downgradeToNotify() call later. This function
must be followed at some point by a call to downgradeToNotify() with no open() (in any of
its forms) or close() calls in between. This method should only be called from within other
methods of the same object it is being called from. In other words, this method is intended
to be used by an object to change it's own open status so that it can safely modify itself.
upgradeFromNotify() and downgradeToNotify() call pairs are not nestable. Returns Acad::eOk
if successful. If the object is not currently open AcDb::kForNotify, then
Acad::eNotApplicable is returned. If the object is currently in the process of actually
sending notification (that is, isNotifying() returns Adesk::kTrue), then
Acad::eWasNotifying is returned.
def upgradeOpen(self) -> None:
If the object is currently open AcDb::kForRead with only one reader, then this function
upgrades the object to open AcDb::kForWrite. In the process of changing to open for write,
the object is closed, thus triggering any pertinent notification. Returns Acad::eOk if
successful. If the object has more than one reader, then the open status is not changed and
Adesk::eHadMultipleReaders is returned. If the object is already open AcDb::kForWrite, then
Acad::eWasOpenForWrite is returned. If the object is currently sending notification, then
the open status is not changed and Acad::eWasNotifying is returned.
def wblockClone(self, owner: PyRx.RxObject, mapping: PyDb.IdMapping, isPrimary: bool) -> DbObject:
This function is almost identical to AcDbObject::deepClone, except that an
AcDbWblockCloneFiler is used and ownership is not carried across database boundaries.
Subcloning is based on hard owner and hard pointer connections.
def xData(self, appname: str) -> list:
Returns a linked list of resbuf structures containing a copy of the xdata for the object.
If regappName == NULL is passed in, all xdata is returned, otherwise only the xdata for the
specified name is returned. If not all xdata is required, but the xdata for more than one
regappName is desired, then multiple calls to this member function must be made--one for
each regappName. The caller of this function is responsible for releasing the memory used
by the resbuf list that is returned. The most commonly used way to deallocate such a list
is via the acutRelRb() function. This function is virtual because some objects or entities
may need to store some or all of their 'built-in' state as xdata. Classes defining such
objects can override this function in order to monitor and validate xdata requests as they
see fit. If an object does not care about what xdata is attached to it (which is the
preferred practice), then it need not override this member. If a failure accessing the
xdata occurs, NULL is returned.
def xDataTransformBy(self, xform: PyGe.Matrix3d) -> None:
This method applies the xform transformation matrix to any XData data types 1011, 1021,
1031, 1012, 1022, 1032, 1013, 1023, 1033, 1041, and 1042 in the object's XData. See the
documentation on XData for more information on the way the transformation matrix is applied
to the different data types. This method should be called from within the transformBy()
method on custom entities so that such entities will transform XData in the same way that
the built-in AcDb entities do. Returns Acad::eOk if successful.
def xmitPropagateModify(self) -> None:
Within an object's close() method is a call to the object's xmitPropagateModify().The
AcDbObject::xmitPropagateModify() default implementation is to inform the containing
database that the object has been modified, appended to the database, or erased. The
database then sends out the appropriate notification to any AcDbDatabaseReactors attached
to it. Within AutoCAD, this function is used by complex entities such as polylines to allow
the subentities to notify the header that they have been changed. The header can then
'propagate' the notification by sending its own notification that the 'complex entity' has
been modified. The way this works is: The subobject class has it's xmitPropagateModify()
class overridden such that it calls it's parent class's xmitPropagateModify() and also
calls the owning object's recvPropagateModify().The 'root' or 'header' class has it's
recvPropagateModify() overridden to provide an implementation that triggers 'modified'
notification to be sent for the 'root' or 'header' (which effectively represents the whole
complex object).The subobject's close() triggers 'modified' notification for the subobject
and calls the subobject's xmitPropagateModify() function. So, when the subobject's close()
is called, its xmitPropagateModify() is called. This then calls the owning object's
recvPropagateModify(), which then triggers the owner to send 'modified' notification. So,
the result is a 'modified' notification from both the subentity and the 'root' or 'header'
entity. When overridden, this function should: Call its parent class's
xmitPropagateModify() (which ultimately results in the execution of
AcDbObject::xmitPropagateModify() to trigger database notification).Call its owner's
recvPropagateModify() (passing in its 'this' pointer) to 'propagate' the notification
information to the 'root' owner to be sent out.
class DbObjectOverrule Class
def __init__(self) -> None:
AcDbObjectOverrule overrules a subset of operations that AcDbObject class specifies. It is
intended as a base class for clients who want to alter some or all behavior of a given
AcDbObject-derived class. At the base level, each default implementation simply calls the
corresponding method in the target class.
def __reduce__(self) -> Any:
def baseCancel(self, object: PyDb.DbObject) -> ErrorStatus:
def baseClose(self, object: PyDb.DbObject) -> ErrorStatus:
def baseDeepClone(self, subject: PyDb.DbObject, owner: PyDb.DbObject, mapping: PyDb.IdMapping, isPrimary: bool) -> DbObject:
def baseErase(self, object: PyDb.DbObject, erased: bool) -> ErrorStatus:
def baseOpen(self, object: PyDb.DbObject, mode: OpenMode) -> ErrorStatus:
def baseWblockClone(self, subject: PyDb.DbObject, owner: PyRx.RxObject, mapping: PyDb.IdMapping, isPrimary: bool) -> DbObject:
def cancel(self, object: PyDb.DbObject) -> ErrorStatus:
def className() -> str:
def close(self, object: PyDb.DbObject) -> ErrorStatus:
def deepClone(self, subject: PyDb.DbObject, owner: PyDb.DbObject, mapping: PyDb.IdMapping, isPrimary: bool) -> DbObject:
def desc() -> PyRx.RxClass:
Returns a pointer to the AcRxClass object representing the specific class, or most recent
parent class explicitly registered with ObjectARX of either the pointer type used to invoke
it or the class qualifier used with it. (Remember that when a static member function is
invoked via a pointer, the pointer type, not the object type, determines which
implementation of the function is invoked.) When working with a pointer to an object and
the proper AcRxClass object for the class of the object pointed to is desired, the
AcRxObject::isA() function should be used, since it is a virtual non-static method and is
therefore not pointer type dependent. Caching the value of the pointer returned by this
method is acceptable, provided the application knows that the AcRxClass object pointed to
by the returned pointer was created by an ObjectARX application that will not be unloaded.
def erase(self, object: PyDb.DbObject, erased: bool) -> ErrorStatus:
def isApplicable(self, object: PyRx.RxObject) -> bool:
def open(self, object: PyDb.DbObject, mode: OpenMode) -> ErrorStatus:
def wblockClone(self, subject: PyDb.DbObject, owner: PyRx.RxObject, mapping: PyDb.IdMapping, isPrimary: bool) -> DbObject:
class DbObjectReactor Class
def __init__(self) -> None:
def __reduce__(self) -> Any:
def cancelled(self, obj: PyDb.DbObject) -> None:
def className() -> str:
def copied(self, obj: PyDb.DbObject, newObj: PyDb.DbObject) -> None:
def desc() -> PyRx.RxClass:
Returns a pointer to the AcRxClass object representing the specific class, or most recent
parent class explicitly registered with ObjectARX of either the pointer type used to invoke
it or the class qualifier used with it. (Remember that when a static member function is
invoked via a pointer, the pointer type, not the object type, determines which
implementation of the function is invoked.) When working with a pointer to an object and
the proper AcRxClass object for the class of the object pointed to is desired, the
AcRxObject::isA() function should be used, since it is a virtual non-static method and is
therefore not pointer type dependent. Caching the value of the pointer returned by this
method is acceptable, provided the application knows that the AcRxClass object pointed to
by the returned pointer was created by an ObjectARX application that will not be unloaded.
def erased(self, obj: PyDb.DbObject, flag: bool) -> None:
def goodbye(self, obj: PyDb.DbObject) -> None:
def modified(self, obj: PyDb.DbObject) -> None:
def modifiedXData(self, obj: PyDb.DbObject) -> None:
def modifyUndone(self, obj: PyDb.DbObject) -> None:
def objectClosed(self, obj: PyDb.ObjectId) -> None:
def openedForModify(self, obj: PyDb.DbObject) -> None:
def reappended(self, obj: PyDb.DbObject) -> None:
def subObjModified(self, obj: PyDb.DbObject, subObj: PyDb.DbObject) -> None:
def unappended(self, obj: PyDb.DbObject) -> None:
class DeepCloneType Class
kDcCopy: ClassVar[Self]
kDcExplode: ClassVar[Self]
kDcBlock: ClassVar[Self]
kDcXrefBind: ClassVar[Self]
kDcSymTableMerge: ClassVar[Self]
kDcInsert: ClassVar[Self]
kDcWblock: ClassVar[Self]
kDcObjects: ClassVar[Self]
kDcXrefInsert: ClassVar[Self]
kDcInsertCopy: ClassVar[Self]
kDcWblkObjects: ClassVar[Self]
class DiametricDimension Class
def __init__(self) -> None:
The AcDbDiametricDimension class represents the diameter dimension type in AutoCAD. This
dimension type requires two points that define a diameter chord on the curve being
dimensioned to be able to draw the dimension line from one chord point to the other. In
addition, if the text is located outside the curve being dimensioned, then a 'leader
length' value is used to determine how far the dimension line extends out past the curve
before doing a horizontal dogleg (if necessary) to the annotation text.
def __init__(self, chordPoint: PyGe.Point3d, farChordPoint: PyGe.Point3d, leaderLength: float) -> None:
The AcDbDiametricDimension class represents the diameter dimension type in AutoCAD. This
dimension type requires two points that define a diameter chord on the curve being
dimensioned to be able to draw the dimension line from one chord point to the other. In
addition, if the text is located outside the curve being dimensioned, then a 'leader
length' value is used to determine how far the dimension line extends out past the curve
before doing a horizontal dogleg (if necessary) to the annotation text.
def __init__(self, chordPoint: PyGe.Point3d, farChordPoint: PyGe.Point3d, leaderLength: float, dimText: str) -> None:
The AcDbDiametricDimension class represents the diameter dimension type in AutoCAD. This
dimension type requires two points that define a diameter chord on the curve being
dimensioned to be able to draw the dimension line from one chord point to the other. In
addition, if the text is located outside the curve being dimensioned, then a 'leader
length' value is used to determine how far the dimension line extends out past the curve
before doing a horizontal dogleg (if necessary) to the annotation text.
def __init__(self, chordPoint: PyGe.Point3d, farChordPoint: PyGe.Point3d, leaderLength: float, dimText: str, id: PyDb.ObjectId) -> None:
The AcDbDiametricDimension class represents the diameter dimension type in AutoCAD. This
dimension type requires two points that define a diameter chord on the curve being
dimensioned to be able to draw the dimension line from one chord point to the other. In
addition, if the text is located outside the curve being dimensioned, then a 'leader
length' value is used to determine how far the dimension line extends out past the curve
before doing a horizontal dogleg (if necessary) to the annotation text.
def __init__(self, id: PyDb.ObjectId) -> None:
The AcDbDiametricDimension class represents the diameter dimension type in AutoCAD. This
dimension type requires two points that define a diameter chord on the curve being
dimensioned to be able to draw the dimension line from one chord point to the other. In
addition, if the text is located outside the curve being dimensioned, then a 'leader
length' value is used to determine how far the dimension line extends out past the curve
before doing a horizontal dogleg (if necessary) to the annotation text.
def __init__(self, id: PyDb.ObjectId, mode: PyDb.OpenMode) -> None:
The AcDbDiametricDimension class represents the diameter dimension type in AutoCAD. This
dimension type requires two points that define a diameter chord on the curve being
dimensioned to be able to draw the dimension line from one chord point to the other. In
addition, if the text is located outside the curve being dimensioned, then a 'leader
length' value is used to determine how far the dimension line extends out past the curve
before doing a horizontal dogleg (if necessary) to the annotation text.
def __init__(self, id: PyDb.ObjectId, mode: PyDb.OpenMode, erased: bool) -> None:
The AcDbDiametricDimension class represents the diameter dimension type in AutoCAD. This
dimension type requires two points that define a diameter chord on the curve being
dimensioned to be able to draw the dimension line from one chord point to the other. In
addition, if the text is located outside the curve being dimensioned, then a 'leader
length' value is used to determine how far the dimension line extends out past the curve
before doing a horizontal dogleg (if necessary) to the annotation text.
def __init__(*args) -> None:
The AcDbDiametricDimension class represents the diameter dimension type in AutoCAD. This
dimension type requires two points that define a diameter chord on the curve being
dimensioned to be able to draw the dimension line from one chord point to the other. In
addition, if the text is located outside the curve being dimensioned, then a 'leader
length' value is used to determine how far the dimension line extends out past the curve
before doing a horizontal dogleg (if necessary) to the annotation text.
def __reduce__(self) -> Any:
def cast(otherObject: PyRx.RxObject) -> DiametricDimension:
def chordPoint(self) -> PyGe.Point3d:
This function returns the point (in WCS coordinates) where the dimension line intersects
the curve being dimensioned and extends outside the curve, if the text is outside the
curve. The chord point is used for DXF group code 15.
def className() -> str:
def cloneFrom(otherObject: PyRx.RxObject) -> DiametricDimension:
def desc() -> PyRx.RxClass:
Returns a pointer to the AcRxClass object representing the specific class, or most recent
parent class explicitly registered with ObjectARX of either the pointer type used to invoke
it or the class qualifier used with it. (Remember that when a static member function is
invoked via a pointer, the pointer type, not the object type, determines which
implementation of the function is invoked.) When working with a pointer to an object and
the proper AcRxClass object for the class of the object pointed to is desired, the
AcRxObject::isA() function should be used, since it is a virtual non-static method and is
therefore not pointer type dependent. Caching the value of the pointer returned by this
method is acceptable, provided the application knows that the AcRxClass object pointed to
by the returned pointer was created by an ObjectARX application that will not be unloaded.
def extArcEndAngle(self) -> float:
This function returns the extension arc end angle.
def extArcStartAngle(self) -> float:
This function returns the extension arc start angle.
def farChordPoint(self) -> PyGe.Point3d:
This function returns the far chord point (in WCS coordinates) of the curve being
dimensioned. This is the point on the curve that is diametrically opposite the point where
the dimension line extends outside the curve, if the text is outside the curve.
def leaderLength(self) -> float:
This function is obsolete and always returns 0 unless the length has been set at time of
the dimension's creation.
def setChordPoint(self, pt: PyGe.Point3d) -> None:
This function sets the dimension to use pt (in WCS coordinates) as the point where the
dimension line intersects the curve being dimensioned and extends outside the curve, if the
text is outside the curve. The chord point is used for DXF group code 15. This function
always returns Acad::eOk.
def setExtArcEndAngle(self, val: float) -> None:
This function sets the extension arc end angle. Returns Acad::eOk if successful. Otherwise,
it returns Acad::eInvalidInput.
def setExtArcStartAngle(self, val: float) -> None:
This function sets the extension arc start angle. Returns Acad::eOk if successful.
Otherwise, it returns Acad::eInvalidInput.
def setFarChordPoint(self, pt: PyGe.Point3d) -> None:
This function sets the dimension to use pt (in WCS coordinates) as the point on the curve
that is diametrically opposite the point where the dimension line extends outside the
curve, if the text is outside the curve.
def setLeaderLength(self, val: float) -> None:
This function sets the dimension to use length as the distance from the chordPoint
dimension definition point, out to where the dimension will do a horizontal dogleg to the
annotation text (or stop if no dogleg is necessary). Warning The leaderLength setting is
only used during the creation of the dimension (and even then only if the dimension is set
to use the default text position value). After the dimension has been closed for the first
time, changing the leaderLength value will not affect how the dimension displays, but the
new setting will be stored and will show up in DXF, LISP, ObjectARX, and the leaderLength()
method. leaderLength is used for DXF group code 40. This function always returns Acad::eOk.
class DictUtil Class
def __init__(self) -> None:
def __reduce__(self) -> Any:
def dictionaryGetAt(name: str, owner: PyDb.ObjectId) -> ObjectId:
def dictionaryNameAt(id: PyDb.ObjectId, owner: PyDb.ObjectId.kNull) -> str:
def getColorName(id: PyDb.ObjectId) -> str:
def getGroupId(val: str, db: PyDb.Database) -> ObjectId:
def getGroupName(id: PyDb.ObjectId) -> str:
def getLayoutId(val: str, db: PyDb.Database) -> ObjectId:
def getLayoutName(id: PyDb.ObjectId) -> str:
def getMLStyleId(val: str, db: PyDb.Database) -> ObjectId:
def getMLStyleName(itemId: PyDb.ObjectId) -> str:
def getMaterialId(val: str, db: PyDb.Database) -> ObjectId:
def getMaterialName(id: PyDb.ObjectId) -> str:
def getPlotSettingsId(val: str, db: PyDb.Database) -> ObjectId:
def getPlotSettingsName(itemId: PyDb.ObjectId) -> str:
def getPlotStyleNameId(val: str, db: PyDb.Database) -> ObjectId:
def getPlotStyleNameName(itemId: PyDb.ObjectId) -> str:
def getTableStyleId(val: str, db: PyDb.Database) -> ObjectId:
def getTableStyleName(itemId: PyDb.ObjectId) -> str:
def getVisualStyleId(val: str, db: PyDb.Database) -> ObjectId:
def getVisualStyleName(itemId: PyDb.ObjectId) -> str:
def hasColor(val: str, db: PyDb.Database) -> bool:
def hasGroup(val: str, db: PyDb.Database) -> bool:
def hasLayout(val: str, db: PyDb.Database) -> bool:
def hasMLStyle(val: str, db: PyDb.Database) -> bool:
def hasMaterial(val: str, db: PyDb.Database) -> bool:
def hasPlotSettings(val: str, db: PyDb.Database) -> bool:
def hasPlotStyleName(val: str, db: PyDb.Database) -> bool:
def hasTableStyle(val: str, db: PyDb.Database) -> bool:
def hasVisualStyle(val: str, db: PyDb.Database) -> bool:
class Dictionary Class
def __contains__(self, val: str | PyDb.ObjectId) -> bool:
This function reports whether the entry specified by entryName is contained in the
dictionary. The search for entryName is not case sensitive. Returns true if the entry is
found, false if it is not found.
def __getitem__(self, val: str) -> ObjectId:
This is just a templated version of the pre-existing getAt() method. The template version
uses the acdbOpenObject template which does type checking and will return an error if the
object being opened is not the correct type. The pre-existing getObject() method does not
do type checking.
def __init__(self) -> None:
AcDbDictionary is a database-resident object dictionary, which maintains a map between text
strings and database objects. An instance of this class represents a single object, such as
Drawing Symbol Table, to which objects derived from AcDbObject may be added, accessed, and
removed. Entries in an AcDbDictionary must be unique. Entries consist of a unique
AcDbObject and string, which comprises the entry's key name. The key may be either an
explicit null-terminated text string, or an asterisk (' * ') as the first character in the
string to signify an anonymous entry. An anonymous entry's key will be constructed
internally by appending an 'A' plus a unique integer value to the asterisk; for example,
'*A13'. When an object is placed in a dictionary, the dictionary is established as the
object's owner, the lookup key string is associated with the object's object ID, and the
dictionary itself is attached to the object as a persistent reactor so that the dictionary
is notified when the object is erased.
def __init__(self, id: PyDb.ObjectId) -> None:
AcDbDictionary is a database-resident object dictionary, which maintains a map between text
strings and database objects. An instance of this class represents a single object, such as
Drawing Symbol Table, to which objects derived from AcDbObject may be added, accessed, and
removed. Entries in an AcDbDictionary must be unique. Entries consist of a unique
AcDbObject and string, which comprises the entry's key name. The key may be either an
explicit null-terminated text string, or an asterisk (' * ') as the first character in the
string to signify an anonymous entry. An anonymous entry's key will be constructed
internally by appending an 'A' plus a unique integer value to the asterisk; for example,
'*A13'. When an object is placed in a dictionary, the dictionary is established as the
object's owner, the lookup key string is associated with the object's object ID, and the
dictionary itself is attached to the object as a persistent reactor so that the dictionary
is notified when the object is erased.
def __init__(self, id: PyDb.ObjectId, mode: PyDb.OpenMode) -> None:
AcDbDictionary is a database-resident object dictionary, which maintains a map between text
strings and database objects. An instance of this class represents a single object, such as
Drawing Symbol Table, to which objects derived from AcDbObject may be added, accessed, and
removed. Entries in an AcDbDictionary must be unique. Entries consist of a unique
AcDbObject and string, which comprises the entry's key name. The key may be either an
explicit null-terminated text string, or an asterisk (' * ') as the first character in the
string to signify an anonymous entry. An anonymous entry's key will be constructed
internally by appending an 'A' plus a unique integer value to the asterisk; for example,
'*A13'. When an object is placed in a dictionary, the dictionary is established as the
object's owner, the lookup key string is associated with the object's object ID, and the
dictionary itself is attached to the object as a persistent reactor so that the dictionary
is notified when the object is erased.
def __init__(self, id: PyDb.ObjectId, mode: PyDb.OpenMode, erased: bool) -> None:
AcDbDictionary is a database-resident object dictionary, which maintains a map between text
strings and database objects. An instance of this class represents a single object, such as
Drawing Symbol Table, to which objects derived from AcDbObject may be added, accessed, and
removed. Entries in an AcDbDictionary must be unique. Entries consist of a unique
AcDbObject and string, which comprises the entry's key name. The key may be either an
explicit null-terminated text string, or an asterisk (' * ') as the first character in the
string to signify an anonymous entry. An anonymous entry's key will be constructed
internally by appending an 'A' plus a unique integer value to the asterisk; for example,
'*A13'. When an object is placed in a dictionary, the dictionary is established as the
object's owner, the lookup key string is associated with the object's object ID, and the
dictionary itself is attached to the object as a persistent reactor so that the dictionary
is notified when the object is erased.
def __init__(*args) -> None:
AcDbDictionary is a database-resident object dictionary, which maintains a map between text
strings and database objects. An instance of this class represents a single object, such as
Drawing Symbol Table, to which objects derived from AcDbObject may be added, accessed, and
removed. Entries in an AcDbDictionary must be unique. Entries consist of a unique
AcDbObject and string, which comprises the entry's key name. The key may be either an
explicit null-terminated text string, or an asterisk (' * ') as the first character in the
string to signify an anonymous entry. An anonymous entry's key will be constructed
internally by appending an 'A' plus a unique integer value to the asterisk; for example,
'*A13'. When an object is placed in a dictionary, the dictionary is established as the
object's owner, the lookup key string is associated with the object's object ID, and the
dictionary itself is attached to the object as a persistent reactor so that the dictionary
is notified when the object is erased.
def __reduce__(self) -> Any:
def asDict(self) -> dict[str, PyDb.ObjectId]:
def cast(otherObject: PyRx.RxObject) -> Dictionary:
def className() -> str:
def cloneFrom(otherObject: PyRx.RxObject) -> Dictionary:
def desc() -> PyRx.RxClass:
Returns a pointer to the AcRxClass object representing the specific class, or most recent
parent class explicitly registered with ObjectARX of either the pointer type used to invoke
it or the class qualifier used with it. (Remember that when a static member function is
invoked via a pointer, the pointer type, not the object type, determines which
implementation of the function is invoked.) When working with a pointer to an object and
the proper AcRxClass object for the class of the object pointed to is desired, the
AcRxObject::isA() function should be used, since it is a virtual non-static method and is
therefore not pointer type dependent. Caching the value of the pointer returned by this
method is acceptable, provided the application knows that the AcRxClass object pointed to
by the returned pointer was created by an ObjectARX application that will not be unloaded.
def getAt(self, val: str) -> ObjectId:
This is just a templated version of the pre-existing getAt() method. The template version
uses the acdbOpenObject template which does type checking and will return an error if the
object being opened is not the correct type. The pre-existing getObject() method does not
do type checking.
def has(self, val: str | PyDb.ObjectId) -> bool:
This function reports whether the entry specified by entryName is contained in the
dictionary. The search for entryName is not case sensitive. Returns true if the entry is
found, false if it is not found.
def nameAt(self, val: PyDb.ObjectId) -> str:
Searches the dictionary for an entry with object ID objId and returns the search key name
of the dictionary entry in name.
def numEntries(self) -> int:
This function returns the number of non-deleted entries in the dictionary.
def remove(self, key: str) -> None:
This function removes an entry specified by its 'key' from the dictionary, and also returns
the object ID of the entry in returnId. Removal entails removing the key and object's
objectId entry from the dictionary and removing the dictionary as a persistent reactor on
the object. The removed object is still in the database so you should not deallocate its
memory. The caller is responsible for erasing the removed object if that is desired (this
is not necessary to prevent it from being saved since it no longer has an owner). Returns
Acad::eOk if successful. If key == NULL, then Acad::eInvalidKey is returned. If key is not
found in the dictionary then Acad::eKeyNotFound is returned.
def remove(self, key: PyDb.ObjectId) -> None:
This function removes an entry specified by its 'key' from the dictionary, and also returns
the object ID of the entry in returnId. Removal entails removing the key and object's
objectId entry from the dictionary and removing the dictionary as a persistent reactor on
the object. The removed object is still in the database so you should not deallocate its
memory. The caller is responsible for erasing the removed object if that is desired (this
is not necessary to prevent it from being saved since it no longer has an owner). Returns
Acad::eOk if successful. If key == NULL, then Acad::eInvalidKey is returned. If key is not
found in the dictionary then Acad::eKeyNotFound is returned.
def remove(self, key: str, returnId: PyDb.ObjectId) -> None:
This function removes an entry specified by its 'key' from the dictionary, and also returns
the object ID of the entry in returnId. Removal entails removing the key and object's
objectId entry from the dictionary and removing the dictionary as a persistent reactor on
the object. The removed object is still in the database so you should not deallocate its
memory. The caller is responsible for erasing the removed object if that is desired (this
is not necessary to prevent it from being saved since it no longer has an owner). Returns
Acad::eOk if successful. If key == NULL, then Acad::eInvalidKey is returned. If key is not
found in the dictionary then Acad::eKeyNotFound is returned.
def remove(*args) -> None:
This function removes an entry specified by its 'key' from the dictionary, and also returns
the object ID of the entry in returnId. Removal entails removing the key and object's
objectId entry from the dictionary and removing the dictionary as a persistent reactor on
the object. The removed object is still in the database so you should not deallocate its
memory. The caller is responsible for erasing the removed object if that is desired (this
is not necessary to prevent it from being saved since it no longer has an owner). Returns
Acad::eOk if successful. If key == NULL, then Acad::eInvalidKey is returned. If key is not
found in the dictionary then Acad::eKeyNotFound is returned.
def setAt(self) -> ObjectId:
This function adds a new entry specified by newValue into the dictionary, if srchKey does
not already exist in the dictionary. If the entry with key srchKey already exists, the
existing entry is erased, the dictionary is removed from its reactor list, and it is
replaced by the newValue object is added to the dictionary in its place. The name of the
object is specified by srchKey. The object's objectId entry is returned in retObjId.
def setName(self, old: str, new: str) -> bool:
This function renames the entry specified by oldName to the new name specified by newName.
Returns true if successful; otherwise, returns false.
def toDict(self) -> dict[str, PyDb.ObjectId]:
class DimArrowFlags Class
kNoMap: ClassVar[Self]
kAerial: ClassVar[Self]
class DimAssoc Class
def __init__(self) -> None:
This class is the main class used to associate dimensions to geometry.
def __init__(self, id: PyDb.ObjectId) -> None:
This class is the main class used to associate dimensions to geometry.
def __init__(self, id: PyDb.ObjectId, mode: PyDb.OpenMode) -> None:
This class is the main class used to associate dimensions to geometry.
def __init__(self, id: PyDb.ObjectId, mode: PyDb.OpenMode, erased: bool) -> None:
This class is the main class used to associate dimensions to geometry.
def __init__(*args) -> None:
This class is the main class used to associate dimensions to geometry.
def __reduce__(self) -> Any:
def addToDimensionReactor(self, add: bool) -> None:
Add or remove the reactor between the dimension and the AcDbDimAssoc object. For internal
use.
def addToPointRefReactor(self) -> None:
For each piece of geometry within each point reference, this function adds a reactor
between the geometry and the dimension the object it is associated to. If Acad::eOk is
returned the function was successful. Anything else means an error occurred. For internal
use.
def assocFlag(self) -> int:
Returns true if the given point reference index is associated.
def assocFlag(self, ptType: int) -> int:
Returns true if the given point reference index is associated.
def assocFlag(*args) -> int:
Returns true if the given point reference index is associated.
def cast(otherObject: PyRx.RxObject) -> DimAssoc:
def className() -> str:
def cloneFrom(otherObject: PyRx.RxObject) -> DimAssoc:
def desc() -> PyRx.RxClass:
Returns a pointer to the AcRxClass object representing the specific class, or most recent
parent class explicitly registered with ObjectARX of either the pointer type used to invoke
it or the class qualifier used with it. (Remember that when a static member function is
invoked via a pointer, the pointer type, not the object type, determines which
implementation of the function is invoked.) When working with a pointer to an object and
the proper AcRxClass object for the class of the object pointed to is desired, the
AcRxObject::isA() function should be used, since it is a virtual non-static method and is
therefore not pointer type dependent. Caching the value of the pointer returned by this
method is acceptable, provided the application knows that the AcRxClass object pointed to
by the returned pointer was created by an ObjectARX application that will not be unloaded.
def dimObjId(self) -> ObjectId:
Returns the object ID of the associative dimension managed by this class.
def getDimAssocGeomIds(self) -> list[PyDb.ObjectId]:
Returns a list of all associated geometry objects from all the point reference objects. If
Acad::eOk is returned the geometry IDs are returned properly. Anything else means an error
occurred.
def hasOopsWatcher(self) -> bool:
Returns true if this database has an active OOPS command watcher.
def isAllGeomErased(self) -> bool:
Returns true if all geometry within all point reference objects are erased.
def isTransSpatial(self) -> bool:
Return true if the dimension in paper space is associated to geometry in model space;
returns false if the dimension is associated to geometry in the same space.
def osnapPointRef(self, _type: int) -> OsnapPointRef:
def pointRef(self, _type: int) -> PointRef:
Returns the point reference for the given point reference index.
def post(self, id: PyDb.ObjectId, isAcive: bool) -> ObjectId:
Posts the AcDbDimAssoc object to the database and establishes a reactor between it and its
associated dimension. If Acad::eOk is returned the post was successful. Anything else means
an error occurred.
def removeAssociativity(self, force: bool) -> None:
Remove all association between the dimension, the AcDbDimAssoc object, and all point
reference objects. If Acad::eOk is returned the point reference at the given point
reference index was removed properly. Anything else means an error occured
def removeOopsWatcher(self) -> None:
Remove and delete the reactor based mechanism that monitors for an OOPS command invocation.
For internal use.
def removePointRef(self, _type: int) -> None:
Removes the point reference at the given point reference index. If Acad::eOk is returned
the point reference at the given point reference index was removed properly. Anything else
means an error occurred.
def restoreAssocFromOopsWatcher(self) -> None:
Re-associates the dimension with the associated geometry by restoring the point references
from the oops watcher. If Acad::eOk is returned the associations were restored properly.
Anything else means an error occurred. For internal use.
def rotatedDimType(self) -> RotatedDimType:
Returns the rotated dimension type flag for our associative dimension. This must be a value
from the RotatedDimType enum.
def setAssocFlag(self, flag: int) -> None:
Sets the index of point reference being used and establishes or clears the association
flag. If Acad::eOk is returned the index of the point reference used and the association
flag was set properly. Anything else means an error occurred.
def setAssocFlag(self, flag: int, val: bool) -> None:
Sets the index of point reference being used and establishes or clears the association
flag. If Acad::eOk is returned the index of the point reference used and the association
flag was set properly. Anything else means an error occurred.
def setAssocFlag(*args) -> None:
Sets the index of point reference being used and establishes or clears the association
flag. If Acad::eOk is returned the index of the point reference used and the association
flag was set properly. Anything else means an error occurred.
def setDimObjId(self, id: PyDb.ObjectId) -> None:
Sets the object ID of the associative dimension managed by this class. If Acad::eOk is
returned the object ID of the associative dimension was set properly. Anything else means
an error occurred.
def setPointRef(self, _type: int, ptRef: PyDb.PointRef) -> None:
Sets the point reference at the given index using the given point reference object. If
Acad::eOk is returned the point reference at the given index was set properly. Anything
else means an error occurred.
def setRotatedDimType(self, dimType: PyDb.RotatedDimType) -> None:
Sets the rotated dimension type flag for our associative dimension. If Acad::eOk is
returned the rotated dimension type flag was set properly. Anything else means an error
occurred.
def setTransSpatial(self, val: bool) -> None:
Sets a flag noting whether the dimension is associated to geometry in a different space. If
Acad::eOk is returned the flag was set properly. Anything else means an error occurred.
def startCmdWatcher(self) -> None:
Start the reactor based mechanism that monitors for changes in geometry that have
dimensions associated to them. If Acad::eOk is returned the watcher was started properly.
Anything else means an error occurred. For internal use.
def startOopsWatcher(self, val: bool) -> None:
Start the reactor based mechanism that monitors for an OOPS command invocation. If
Acad::eOk is returned the watcher was started properly. Anything else means an error
occurred. For internal use.
def swapReferences(self, val: PyDb.IdMapping) -> None:
This method is called during AcDbLongTransaction::checkIn(). In checkIn(), the long
transaction manager first clones the workset objects back into the origin block, and then
calls swapIdWith() on each object that is not newly added to exchange it with its original
object. This method is called after swapIdWith(). It is called on every new object, and on
every original object that was swapped. The purpose of this method is similar to the object
ID reference translations done at the end of deep cloning. References between objects in
the workset have their object IDs translated to the swapped object IDs of the referenced
objects. Unlike cloning, this translation must happen in both directions. Thus, it is
possible to see two different ID maps passed in on different calls to this method. For
example, an original object swapped with a new one will get a mapping of all other original
objects swapped with their new ones. Because the long transaction manager is about to erase
these original objects, it is important that their inter-object relationships be correct
for purposes such as sending erase notifications. A new object may or may not have an
original with which to swap. In either case, its references must be updated using a mapping
from all the other new objects to their originals. The default behavior of this method in
AcDbObject is to translate object ID references on the object using idMap, in the same way
that translation is done for a deepClone() operation. WarningCustom objects that override
this method must super-message their parent. Failure to super-message will cause the
process to abort at runtime. This method returns Acad::eOk if successful.
def updateAssociativity(self, ids: list[PyDb.ObjectId]) -> None:
This function performs a re-association after the BREAK, TRIM, and PEDIT commands are
performed. If Acad::eOk is returned, the re-associations were completed properly. Anything
else means an error occurred. For internal use.
def updateDimension(self, update: bool, skipReactors: bool) -> None:
Updates a rotated dimension when the geometry it is associated to is changed. If Acad::eOk
is returned, the dimension was updated or its associations were removed properly. Anything
else means an error occurred.
def updateDueToMirror(self, val: bool) -> None:
This functions handles updating associations due to the MIRROR command. For internal use.
def updateFillet(self, ids: list[PyDb.ObjectId]) -> None:
This function performs re-associations after FILLET/CHAMFER commands for light weight
polylines using INT, APINT, CEN, NEAR and QUAD osnap modes. If Acad::eOk is returned, the
re-associations were completed properly. Anything else means an error occurred. For
internal use.
def updateSubentPath(self, val: PyDb.IdMapping) -> None:
This function updates the idPath using an AcDbIdMapping. Since subent paths may refer to
objects in block references whose IDs are changed when the block reference is saved in the
block editor, the existing IDs are translated in cached paths to the new ids. Returns
Acad::eOk if successful. For internal use.
def updateXrefSubentPath(self) -> None:
This function updates the idPath for associated xref geometry. If Acad::eOk is returned,
IDs were updated properly. Anything else means an error occurred. For internal use.
class DimAssocPointType Class
kXline1Point: ClassVar[Self]
kXline2Point: ClassVar[Self]
kOriginPoint: ClassVar[Self]
kDefiningPoint: ClassVar[Self]
kXline1Start: ClassVar[Self]
kXline1End: ClassVar[Self]
kXline2Start: ClassVar[Self]
kXline2End: ClassVar[Self]
kVertexPoint: ClassVar[Self]
kChordPoint: ClassVar[Self]
kCenterPoint: ClassVar[Self]
kFarChordPoint: ClassVar[Self]
kOverrideCenterPoint: ClassVar[Self]
kAngLineStart: ClassVar[Self]
kJogPoint: ClassVar[Self]
kAngLineEnd: ClassVar[Self]
kLeaderPoint: ClassVar[Self]
class DimInspect Class
kShapeRemove: ClassVar[Self]
kShapeRound: ClassVar[Self]
kShapeAngular: ClassVar[Self]
kShapeNone: ClassVar[Self]
kShapeLabel: ClassVar[Self]
kShapeRate: ClassVar[Self]
class DimStyleTable Class
def __init__(self, id: PyDb.ObjectId, mode: PyDb.OpenMode, erased: bool) -> None:
def __reduce__(self) -> Any:
def add(self, val: PyDb.DimStyleTableRecord) -> ObjectId:
This function adds the record pointed to by pRecord to both the database containing the
table and the table itself. If the addition succeeds, recordId is set to the AcDbObjectId
of the pRecord once it has been added to the database. Possible return ErrorStatus codes
are: Acad::eOk, Acad::eOutOfMemory, Acad::eDuplicateRecordName, or Acad::eNoDatabase (if
the DimStyleTable is not in a database).
def cast(otherObject: PyRx.RxObject) -> DimStyleTable:
def className() -> str:
def cloneFrom(otherObject: PyRx.RxObject) -> DimStyleTable:
def desc() -> PyRx.RxClass:
Returns a pointer to the AcRxClass object representing the specific class, or most recent
parent class explicitly registered with ObjectARX of either the pointer type used to invoke
it or the class qualifier used with it. (Remember that when a static member function is
invoked via a pointer, the pointer type, not the object type, determines which
implementation of the function is invoked.) When working with a pointer to an object and
the proper AcRxClass object for the class of the object pointed to is desired, the
AcRxObject::isA() function should be used, since it is a virtual non-static method and is
therefore not pointer type dependent. Caching the value of the pointer returned by this
method is acceptable, provided the application knows that the AcRxClass object pointed to
by the returned pointer was created by an ObjectARX application that will not be unloaded.
class DimStyleTableRecord Class
def __init__(self) -> None:
Objects of this class represent the records found in the AcDbDimStyleTable. Each of these
records contains the information necessary to generate a specific appearance (that is, text
above, in, or below the line; arrows, slashes, or dots at the end of the dimension line,
and so on) for dimensions that reference it.
def __init__(self, id: PyDb.ObjectId) -> None:
Objects of this class represent the records found in the AcDbDimStyleTable. Each of these
records contains the information necessary to generate a specific appearance (that is, text
above, in, or below the line; arrows, slashes, or dots at the end of the dimension line,
and so on) for dimensions that reference it.
def __init__(self, id: PyDb.ObjectId, mode: PyDb.OpenMode) -> None:
Objects of this class represent the records found in the AcDbDimStyleTable. Each of these
records contains the information necessary to generate a specific appearance (that is, text
above, in, or below the line; arrows, slashes, or dots at the end of the dimension line,
and so on) for dimensions that reference it.
def __init__(self, id: PyDb.ObjectId, mode: PyDb.OpenMode, erased: bool) -> None:
Objects of this class represent the records found in the AcDbDimStyleTable. Each of these
records contains the information necessary to generate a specific appearance (that is, text
above, in, or below the line; arrows, slashes, or dots at the end of the dimension line,
and so on) for dimensions that reference it.
def __init__(*args) -> None:
Objects of this class represent the records found in the AcDbDimStyleTable. Each of these
records contains the information necessary to generate a specific appearance (that is, text
above, in, or below the line; arrows, slashes, or dots at the end of the dimension line,
and so on) for dimensions that reference it.
def __reduce__(self) -> Any:
def arrowId(self, val: PyDb.DimArrowFlags) -> ObjectId:
def cast(otherObject: PyRx.RxObject) -> DimStyleTableRecord:
def className() -> str:
def cloneFrom(otherObject: PyRx.RxObject) -> DimStyleTableRecord:
def desc() -> PyRx.RxClass:
Returns a pointer to the AcRxClass object representing the specific class, or most recent
parent class explicitly registered with ObjectARX of either the pointer type used to invoke
it or the class qualifier used with it. (Remember that when a static member function is
invoked via a pointer, the pointer type, not the object type, determines which
implementation of the function is invoked.) When working with a pointer to an object and
the proper AcRxClass object for the class of the object pointed to is desired, the
AcRxObject::isA() function should be used, since it is a virtual non-static method and is
therefore not pointer type dependent. Caching the value of the pointer returned by this
method is acceptable, provided the application knows that the AcRxClass object pointed to
by the returned pointer was created by an ObjectARX application that will not be unloaded.
def dimadec(self) -> int:
def dimalt(self) -> bool:
def dimaltd(self) -> int:
def dimaltf(self) -> float:
def dimaltmzf(self) -> float:
def dimaltmzs(self) -> str:
def dimaltrnd(self) -> float:
def dimalttd(self) -> int:
def dimalttz(self) -> int:
def dimaltu(self) -> int:
def dimaltz(self) -> int:
def dimapost(self) -> str:
def dimarcsym(self) -> int:
def dimasz(self) -> float:
def dimatfit(self) -> int:
def dimaunit(self) -> int:
def dimazin(self) -> int:
def dimblk(self) -> ObjectId:
def dimblk1(self) -> ObjectId:
def dimblk2(self) -> ObjectId:
def dimcen(self) -> float:
def dimclrd(self) -> Color:
def dimclre(self) -> Color:
def dimclrt(self) -> Color:
def dimdec(self) -> int:
def dimdle(self) -> float:
def dimdli(self) -> float:
def dimdsep(self) -> str:
def dimexe(self) -> float:
def dimexo(self) -> float:
def dimfrac(self) -> int:
def dimfxlen(self) -> float:
def dimfxlenOn(self) -> bool:
def dimgap(self) -> float:
def dimjogang(self) -> float:
def dimjust(self) -> int:
def dimldrblk(self) -> ObjectId:
def dimlfac(self) -> float:
def dimlim(self) -> bool:
def dimltex1(self) -> ObjectId:
def dimltex2(self) -> ObjectId:
def dimltype(self) -> ObjectId:
def dimlunit(self) -> int:
def dimlwd(self) -> LineWeight:
def dimlwe(self) -> LineWeight:
def dimmzf(self) -> float:
def dimmzs(self) -> str:
def dimpost(self) -> str:
def dimrnd(self) -> float:
def dimsah(self) -> bool:
def dimscale(self) -> float:
def dimsd1(self) -> bool:
def dimsd2(self) -> bool:
def dimse1(self) -> bool:
def dimse2(self) -> bool:
def dimsoxd(self) -> bool:
def dimtad(self) -> int:
def dimtdec(self) -> int:
def dimtfac(self) -> float:
def dimtfill(self) -> int:
def dimtfillclr(self) -> Color:
def dimtih(self) -> bool:
def dimtix(self) -> bool:
def dimtm(self) -> float:
def dimtmove(self) -> int:
def dimtofl(self) -> bool:
def dimtoh(self) -> bool:
def dimtol(self) -> bool:
def dimtolj(self) -> int:
def dimtp(self) -> float:
def dimtsz(self) -> float:
def dimtvp(self) -> float:
def dimtxsty(self) -> ObjectId:
def dimtxt(self) -> float:
def dimtxtdirection(self) -> bool:
def dimtzin(self) -> int:
def dimupt(self) -> bool:
def dimzin(self) -> int:
def isModifiedForRecompute(self) -> bool:
def setDimadec(self, val: int) -> None:
def setDimalt(self, val: bool) -> None:
def setDimaltd(self, val: int) -> None:
def setDimaltf(self, val: float) -> None:
def setDimaltmzf(self, val: float) -> None:
def setDimaltmzs(self, val: str) -> None:
def setDimaltrnd(self, val: float) -> None:
def setDimalttd(self, val: int) -> None:
def setDimalttz(self, val: int) -> None:
def setDimaltu(self, val: int) -> None:
def setDimaltz(self, val: int) -> None:
def setDimapost(self, val: str) -> None:
def setDimarcsym(self, val: int) -> None:
def setDimasz(self, val: float) -> None:
def setDimatfit(self, val: int) -> None:
def setDimaunit(self, val: int) -> None:
def setDimazin(self, val: int) -> None:
def setDimblk(self, val: str | PyDb.ObjectId) -> None:
def setDimblk1(self, val: str | PyDb.ObjectId) -> None:
def setDimblk2(self, val: str | PyDb.ObjectId) -> None:
def setDimcen(self, val: float) -> None:
def setDimclrd(self, val: PyDb.AcCmColor) -> None:
def setDimclre(self, val: PyDb.AcCmColor) -> None:
def setDimclrt(self, val: PyDb.AcCmColor) -> None:
def setDimdec(self, val: int) -> None:
def setDimdle(self, val: float) -> None:
def setDimdli(self, val: float) -> None:
def setDimdsep(self, val: int) -> None:
def setDimexe(self, val: float) -> None:
def setDimexo(self, val: float) -> None:
def setDimfrac(self, val: int) -> None:
def setDimfxlen(self, val: float) -> None:
def setDimfxlenOn(self, val: bool) -> None:
def setDimgap(self, val: float) -> None:
def setDimjogang(self, val: float) -> None:
def setDimjust(self, val: int) -> None:
def setDimldrblk(self, val: str | PyDb.ObjectId) -> None:
def setDimlfac(self, val: float) -> None:
def setDimlim(self, val: bool) -> None:
def setDimltex1(self, val: PyDb.ObjectId) -> None:
def setDimltex2(self, val: PyDb.ObjectId) -> None:
def setDimltype(self, val: PyDb.ObjectId) -> None:
def setDimlunit(self, val: int) -> None:
def setDimlwd(self, val: PyDb.LineWeight) -> None:
def setDimlwe(self, val: PyDb.LineWeight) -> None:
def setDimmzf(self, val: float) -> None:
def setDimmzs(self, val: str) -> None:
def setDimpost(self, val: str) -> None:
def setDimrnd(self, val: float) -> None:
def setDimsah(self, val: bool) -> None:
def setDimscale(self, val: float) -> None:
def setDimsd1(self, val: bool) -> None:
def setDimsd2(self, val: bool) -> None:
def setDimse1(self, val: bool) -> None:
def setDimse2(self, val: bool) -> None:
def setDimsoxd(self, val: bool) -> None:
def setDimtad(self, val: int) -> None:
def setDimtdec(self, val: int) -> None:
def setDimtfac(self, val: float) -> None:
def setDimtfill(self, val: int) -> None:
def setDimtfillclr(self, val: PyDb.AcCmColor) -> None:
def setDimtih(self, val: bool) -> None:
def setDimtix(self, val: bool) -> None:
def setDimtm(self, val: float) -> None:
def setDimtmove(self, val: int) -> None:
def setDimtofl(self, val: bool) -> None:
def setDimtoh(self, val: bool) -> None:
def setDimtol(self, val: bool) -> None:
def setDimtolj(self, val: int) -> None:
def setDimtp(self, val: float) -> None:
def setDimtsz(self, val: float) -> None:
def setDimtvp(self, val: float) -> None:
def setDimtxsty(self, val: PyDb.ObjectId) -> None:
def setDimtxt(self, val: float) -> None:
def setDimtxtdirection(self, val: bool) -> None:
def setDimtzin(self, val: int) -> None:
def setDimupt(self, val: bool) -> None:
def setDimzin(self, val: int) -> None:
class Dimension Class
def __init__(self, id: PyDb.ObjectId, mode: PyDb.OpenMode, erased: bool) -> None:
The AcDbDimension class is the base class for the classes that represent all the dimension
entity types within AutoCAD. The appearance of dimensions is controlled by dimension
variable settings and dimension styles.
def __reduce__(self) -> Any:
def altSuppressLeadingZeros(self) -> bool:
This is altSuppressLeadingZeros, a member of class AcDbDimension.
def altSuppressTrailingZeros(self) -> bool:
This is altSuppressTrailingZeros, a member of class AcDbDimension.
def altSuppressZeroFeet(self) -> bool:
This is altSuppressZeroFeet, a member of class AcDbDimension.
def altSuppressZeroInches(self) -> bool:
This is altSuppressZeroInches, a member of class AcDbDimension.
def altToleranceSuppressLeadingZeros(self) -> bool:
This is altToleranceSuppressLeadingZeros, a member of class AcDbDimension.
def altToleranceSuppressTrailingZeros(self) -> bool:
This is altToleranceSuppressTrailingZeros, a member of class AcDbDimension.
def altToleranceSuppressZeroFeet(self) -> bool:
This is altToleranceSuppressZeroFeet, a member of class AcDbDimension.
def altToleranceSuppressZeroInches(self) -> bool:
This is altToleranceSuppressZeroInches, a member of class AcDbDimension.
def alternatePrefix(self) -> str:
This is alternatePrefix, a member of class AcDbDimension.
def alternateSuffix(self) -> str:
This is alternateSuffix, a member of class AcDbDimension.
def blockTransform(self) -> PyGe.Matrix3d:
Returns an AcGeMatrix3d matrix that describes the mapping from the dim block table record's
MCS (the WCS within the block table record's microspace) out to the AcDbDatabase's WCS.
def cast(otherObject: PyRx.RxObject) -> Dimension:
def centerMarkSize(self) -> float:
This is centerMarkSize, a member of class AcDbDimension.
def className() -> str:
def cloneFrom(otherObject: PyRx.RxObject) -> Dimension:
def desc() -> PyRx.RxClass:
Returns a pointer to the AcRxClass object representing the specific class, or most recent
parent class explicitly registered with ObjectARX of either the pointer type used to invoke
it or the class qualifier used with it. (Remember that when a static member function is
invoked via a pointer, the pointer type, not the object type, determines which
implementation of the function is invoked.) When working with a pointer to an object and
the proper AcRxClass object for the class of the object pointed to is desired, the
AcRxObject::isA() function should be used, since it is a virtual non-static method and is
therefore not pointer type dependent. Caching the value of the pointer returned by this
method is acceptable, provided the application knows that the AcRxClass object pointed to
by the returned pointer was created by an ObjectARX application that will not be unloaded.
def dimBlockId(self) -> ObjectId:
This function returns the object ID of the AcDbBlockTableRecord containing the entities
that this dimension displays. The text string name within the referenced block table record
is used for DXF group code 2.
def dimBlockPosition(self) -> PyGe.Point3d:
This function returns the relative position point of the block referenced by the dimension
(in WCS coordinates). The block position is the insertion point of the block referenced by
the dimension, relative to the primary definition point (DXF group code 10) of the
dimension itself. The block position (in WCS) is added to the dimension primary definition
point (also in WCS) to get the actual insertion point for the anonymous block that is
referenced by the dimension. So, for example, changing a dimension's block position from
(0,0,0) to (0,0,1) (in WCS) will cause the dimension to display as though it has been moved
1 unit along the WCS Z axis. For a dimension newly created via any dimension command, the
block position will be (0,0,0). For copies of existing dimensions, or if a dimension is
moved, the block position will be the offset vector (in WCS) from where the original
dimension was located. For example, moving a dimension 1 unit down the WCS Y axis will
cause AutoCAD to update the block position value from (0,0,0) to (0,-1,0) (in WCS
coordinates). The position point is used for DXF group code 12.
def dimExt1Linetype(self) -> ObjectId:
For internal use only.
def dimExt2Linetype(self) -> ObjectId:
For internal use only.
def dimLineLinetype(self) -> ObjectId:
For internal use only.
def dimensionStyle(self) -> ObjectId:
This function returns the object ID of the AcDbDimStyleTableRecord referenced by the
dimension. The text string name within the referenced DimStyleTableRecord is used for DXF
group code 3.
def dimensionText(self) -> str:
This function returns a copy of the user-supplied dimension annotation text string
(including any multiline text formatting characters). If the default text is the only text
in the dimension, this function will return an empty string (for example, ''). If the
dimension contains user-defined text along with the default text, this function will return
the text with the default text denoted with angle brackets (for example, 'This is the
default text <>'). If the dimension contains no text, for example using the '.' syntax), it
will return the '.'. Finally, if the text is user defined but there is no default text,
only the user-defined text is returned. Call AcDbDimension::measurement() to obtain the
default measurement and computed text. Alternately, to identify the substring in the block
table record is, you can look at the AcDbText entity within the block table record (the
object ID for this block table record can be obtained via AcDbDimension::dimBlockId()). The
caller of this function is responsible for deallocating the memory used by the returned
text string using the C++ delete[] operator. The annotation text string is used for DXF
group code 1.
def elevation(self) -> float:
This function returns a copy of the dimension's elevation value. Elevation defines the
distance from WCS origin to the plane on which the dimension lies.
def fieldFromMText(self, ref: PyDb.MText) -> None:
If pDimMText contains a text field, this function copies that field and adds the copy to
this object. Returns Acad::eOk if successful.
def fieldToMText(self, ref: PyDb.MText) -> None:
If this object contains a text field, this function copies the field and adds the copy to
pDimMText. Returns Acad::eOk if successful.
def formatMeasurement(self, measurement: float) -> str:
This method returns a string in the MTextContentBuffer argument that is suitable for
passing into setDimensionText(). A typical use would be as follows: AcDbDimension *pDim =
...;// The client allocates the return bufferchar dimTBuf[1000];double userLen = 22/7; //
or whatever...pDim->formatMeasurement(dimTBuf, userLen,
pDim->dimensionText());pDim->setDimensionText(dimTBuf);This method gives you access to the
dimension classes' text assembly and formatting logic. You pass in a double corresponding
to the desired measurement and get back a string suitable for building MText objects. That
MText content string reflects the dimension's dimstyle settings for prefixes, suffixes,
units, precision, alternate units, tolerances, text style, and so on. The dimensionText
string can either be a replacement for the dimension measurement, as in
setDimensionText('5.000'), or it can be a template that influences the dimension text, as
in setDimensionText('{}X[]Ptypical'). This dimension text string gets combined with
DIMPOST, DIMAPOST, and the alternate and primary measurements in the final dimension text.
Another case would be to format a measurement for use in some other MText object. You
create a dummy dimension object, assign whatever dimstyle data needed to that dimension,
then use this method to generate other MText notes: AcDbDatabase *pDb =
...;AcDbRotatedDimension *pDim = ...;AcDbDimStyleTableRecord Style, *pStyle =
&style;pDb->getDimstyleData(pStyle);pDim->setDimensionstyle(pDb->dimstyle());pDim->setDimstyleData(pStyle);AcDbMText
*pMt = ...;char measureBuf[1000];double measureX;pDim->formatMeasurement(measureBuf,
measureX, '');pMt->setContents(dimTBuf);
def formatMeasurement(self, measurement: float, dimensionText: str) -> str:
This method returns a string in the MTextContentBuffer argument that is suitable for
passing into setDimensionText(). A typical use would be as follows: AcDbDimension *pDim =
...;// The client allocates the return bufferchar dimTBuf[1000];double userLen = 22/7; //
or whatever...pDim->formatMeasurement(dimTBuf, userLen,
pDim->dimensionText());pDim->setDimensionText(dimTBuf);This method gives you access to the
dimension classes' text assembly and formatting logic. You pass in a double corresponding
to the desired measurement and get back a string suitable for building MText objects. That
MText content string reflects the dimension's dimstyle settings for prefixes, suffixes,
units, precision, alternate units, tolerances, text style, and so on. The dimensionText
string can either be a replacement for the dimension measurement, as in
setDimensionText('5.000'), or it can be a template that influences the dimension text, as
in setDimensionText('{}X[]Ptypical'). This dimension text string gets combined with
DIMPOST, DIMAPOST, and the alternate and primary measurements in the final dimension text.
Another case would be to format a measurement for use in some other MText object. You
create a dummy dimension object, assign whatever dimstyle data needed to that dimension,
then use this method to generate other MText notes: AcDbDatabase *pDb =
...;AcDbRotatedDimension *pDim = ...;AcDbDimStyleTableRecord Style, *pStyle =
&style;pDb->getDimstyleData(pStyle);pDim->setDimensionstyle(pDb->dimstyle());pDim->setDimstyleData(pStyle);AcDbMText
*pMt = ...;char measureBuf[1000];double measureX;pDim->formatMeasurement(measureBuf,
measureX, '');pMt->setContents(dimTBuf);
def formatMeasurement(*args) -> str:
This method returns a string in the MTextContentBuffer argument that is suitable for
passing into setDimensionText(). A typical use would be as follows: AcDbDimension *pDim =
...;// The client allocates the return bufferchar dimTBuf[1000];double userLen = 22/7; //
or whatever...pDim->formatMeasurement(dimTBuf, userLen,
pDim->dimensionText());pDim->setDimensionText(dimTBuf);This method gives you access to the
dimension classes' text assembly and formatting logic. You pass in a double corresponding
to the desired measurement and get back a string suitable for building MText objects. That
MText content string reflects the dimension's dimstyle settings for prefixes, suffixes,
units, precision, alternate units, tolerances, text style, and so on. The dimensionText
string can either be a replacement for the dimension measurement, as in
setDimensionText('5.000'), or it can be a template that influences the dimension text, as
in setDimensionText('{}X[]Ptypical'). This dimension text string gets combined with
DIMPOST, DIMAPOST, and the alternate and primary measurements in the final dimension text.
Another case would be to format a measurement for use in some other MText object. You
create a dummy dimension object, assign whatever dimstyle data needed to that dimension,
then use this method to generate other MText notes: AcDbDatabase *pDb =
...;AcDbRotatedDimension *pDim = ...;AcDbDimStyleTableRecord Style, *pStyle =
&style;pDb->getDimstyleData(pStyle);pDim->setDimensionstyle(pDb->dimstyle());pDim->setDimstyleData(pStyle);AcDbMText
*pMt = ...;char measureBuf[1000];double measureX;pDim->formatMeasurement(measureBuf,
measureX, '');pMt->setContents(dimTBuf);
def generateLayout(self) -> None:
This function will update the dimension according to the current dimension style. It works
similar to the Dim, Update subcommand. It computes dimension geometry, including extension
lines, dimension lines, dimension arcs, dimension text, arrowheads from given definition
points and dimension style. The generated dimension geometry are maintained internally by
member data 'mGeom' which is a list of in-memory AcDbEntity pointers. This API function
does not generate the dimension block. The dimension block is created automatically from
the in-memory entity list when the application posts the dimension object to database and
close the object. This function enables the dimension object for full use regardless of its
database status - resident or non resident. For example, the application may create an
instance of AcDbDimension, explode it to get dimension geometry information and delete the
object. The application may never need to post the dimension object to database in order to
get its dimension geometry data. The generated in-memory dimension geometry will be deleted
automatically by dimension object destructor. This function returns Acad::eOk if
successful.
def getArrowFirstIsFlipped(self) -> bool:
Returns true if the first arrowhead of the dimension is flipped. Otherwise, it returns
false.
def getArrowSecondIsFlipped(self) -> bool:
Returns true if the second arrowhead of the dimension is flipped. Otherwise, it returns
false.
def getDimstyleData(self) -> DimStyleTableRecord:
This function copies the dimstyle information from the AcDbDimStyleTableRecord referenced
by the dimension into the AcDbDimStyleTableRecord pointed to by pRecord. After copying the
data, any dimension variable overrides currently applied to the dimension will be copied
into the record pointed to by pRecord. The result is that pRecord represents the effective
style settings currently in use by this object. This function returns Acad::eOk if
successful. Acad::eInvalidInput will be returned if pRecord is not a valid
AcDbDimStyleTableRecord. Acad::eInvalidDimStyle will be returned if the dimension there is
an invalid dimension style associated with this dimension. Various open codes can be
returned if the associated AcDbDimStyleTableRecord cannot be opened.
Acad::eNullObjectPointer will be returned if pRecord or the associated
AcDbDimStyleTableRecord is NULL.
def horizontalRotation(self) -> float:
This function returns the horizontal rotation value (in radians) of the dimension. This is
the angle from the dimension's positive horizontal axis (which is the X axis of the UCS in
effect when the Dimension was created) to the X axis of the dimension's OCS (as defined by
the dimension's normal vector and the arbitrary axis algorithm). Positive angles are
counterclockwise when looking down the OCS Z axis towards the OCS origin. The dimension's
positive horizontal axis direction is used as the default left-to-right direction for the
dimension text. The horizontal rotation value is used for DXF group code 51.
def inspection(self) -> bool:
This function returns true or false for the inspection dimension flag.
def inspectionFrame(self) -> int:
This function returns the inspection frame style, round or angular.
def inspectionLabel(self) -> str:
This function returns a string for the inspection label.
def isConstraintDynamic(self) -> bool:
def isConstraintObject(self) -> tuple[bool, bool]:
def isDynamicDimension(self) -> bool:
Returns true if the dimension object is a dynamic dimension type. Otherwise, returns false.
def isHorizontalRefTextRotation(self) -> bool:
For internal use only.
def isUsingDefaultTextPosition(self) -> bool:
This function returns Adesk::kTrue if the text is in the default position for the
dimension; otherwise, this function returns Adesk::kFalse. The text in default position
true/false value is reflected in the eighth bit of the DXF group code 70 (if this bit is
set, then the text is not in the default position).
def measurement(self) -> float:
This function sets val to the current measurement value. Returns Acad::eOk if successful.
def normal(self) -> PyGe.Vector3d:
This function returns the unit normal vector (in WCS coordinates) for the dimension. The
normal vector is used for DXF group code 210.
def prefix(self) -> str:
This is prefix, a member of class AcDbDimension.
def recomputeDimBlock(self, force: bool) -> None:
This function updates the block table record the dimension references to match any changes
made to the dimension since the last time the block table record was updated. If
forceUpdate == true, then the block table record will be updated regardless of whether or
not the dimension has had any changes since the last time the block table record was
updated. If forceUpdate == false, then the block table record will only be updated if the
dimension has been changed since it was opened, is not currently erased, and is not in the
middle of an Undo operation. This function returns Acad::eOk.
def removeTextField(self) -> None:
If this object contains a text field, this function removes it from the extension
dictionary and deletes the field object. Returns Acad::eOk if successful. Returns
Acad::eNotApplicable if no text field is found.
def resetTextDefinedSize(self) -> None:
Resets dimension text defined width and defined height to MText in dimension block.
def setAltSuppressLeadingZeros(self, val: bool) -> None:
This is setAltSuppressLeadingZeros, a member of class AcDbDimension.
def setAltSuppressTrailingZeros(self, val: bool) -> None:
This is setAltSuppressTrailingZeros, a member of class AcDbDimension.
def setAltSuppressZeroFeet(self, val: bool) -> None:
This is setAltSuppressZeroFeet, a member of class AcDbDimension.
def setAltSuppressZeroInches(self, val: bool) -> None:
This is setAltSuppressZeroInches, a member of class AcDbDimension.
def setAltToleranceSuppressLeadingZeros(self, val: bool) -> None:
This is setAltToleranceSuppressLeadingZeros, a member of class AcDbDimension.
def setAltToleranceSuppressTrailingZeros(self, val: bool) -> None:
This is setAltToleranceSuppressTrailingZeros, a member of class AcDbDimension.
def setAltToleranceSuppressZeroFeet(self, val: bool) -> None:
This is setAltToleranceSuppressZeroFeet, a member of class AcDbDimension.
def setAltToleranceSuppressZeroInches(self, val: bool) -> None:
This is setAltToleranceSuppressZeroInches, a member of class AcDbDimension.
def setAlternatePrefix(self, val: str) -> None:
This is setAlternatePrefix, a member of class AcDbDimension.
def setAlternateSuffix(self, val: str) -> None:
This is setAlternateSuffix, a member of class AcDbDimension.
def setArrowFirstIsFlipped(self, val: bool) -> None:
This function flips the first arrowhead of the dimension. Returns Acad::eOk if successful.
def setArrowSecondIsFlipped(self, val: bool) -> None:
This function flips the second arrowhead of the dimension. Returns Acad::eOk if successful.
def setConstraintDynamic(self, val: bool) -> None:
def setDimBlockId(self, val: PyDb.ObjectId) -> None:
This function sets the dimension to use blkId as the object ID of the AcDbBlockTableRecord
containing the entities this dimension displays. The text string name within the referenced
block table record is used for DXF group code 2. This function returns Acad::eOk.
def setDimBlockPosition(self, val: PyGe.Point3d) -> None:
This function is not to be used by an ObjectARX Developer. It is intended for internal use
only. The dimension update code will always force the value to (0,0,0). This function
returns Acad::eNotApplicable.
def setDimExt1Linetype(self, val: PyDb.ObjectId) -> None:
For internal use only.
def setDimExt2Linetype(self, val: PyDb.ObjectId) -> None:
For internal use only.
def setDimLineLinetype(self, val: PyDb.ObjectId) -> None:
For internal use only.
def setDimensionStyle(self, val: PyDb.ObjectId) -> None:
This function sets the dimension to use the AcDbDimStyleTableRecord with the object ID
styleId. If styleId is AcDbObjectId::kNull (or just NULL), then when the dimension is
closed it will be set to use the current default dimStyle in the AutoCAD editor. The text
string name within the referenced DimStyleTableRecord is used for DXF group code 3. This
function returns Acad::eOk.
def setDimensionText(self, val: str) -> None:
This function sets the dimension to use a copy of text as the user-supplied dimension
annotation text string. This string will need to contain any desired multiline text
formatting characters. This function returns a copy of the user-supplied dimension
annotation text string (including any multiline text formatting characters). If the default
text is the only text in the dimension, provide this function with an empty string (for
example, ''). If the dimension contains user-defined text along with the defualt text,
provide this function with the default text denoted with angle brackets (for example, 'This
is the default text <>'). If the dimension contains no text, for example using the '.'
syntax), provide the '.'. Finally if the text is user defined, but there is no default
text, provide only the user-defined text to this function. To set the dimension to use only
the default text in the block table record, call this function with text==NULL. Then when
the dimension is closed, the dimension text string will be set to an empty string and the
default text will be used. The annotation text string is used for DXF group code 1. This
function returns Acad::eOk.
def setDimstyleData(self, id: PyDb.ObjectId) -> None:
This function copies the dimension variable information in the DimStyleTableRecord
identified by id into the database on which this method is called, making those dimension
variable values current for the database. The DimStyleTableRecord with object ID id does
not have to reside in the database on which this method is called. Returns Acad::eOk if
operation is successful.
def setDimstyleData(self, rec: PyDb.DimStyleTableRecord) -> None:
This function copies the dimension variable information in the DimStyleTableRecord
identified by id into the database on which this method is called, making those dimension
variable values current for the database. The DimStyleTableRecord with object ID id does
not have to reside in the database on which this method is called. Returns Acad::eOk if
operation is successful.
def setDimstyleData(*args) -> None:
This function copies the dimension variable information in the DimStyleTableRecord
identified by id into the database on which this method is called, making those dimension
variable values current for the database. The DimStyleTableRecord with object ID id does
not have to reside in the database on which this method is called. Returns Acad::eOk if
operation is successful.
def setDynamicDimension(self, val: bool) -> None:
This function allows an application to set a flag (true/false) to an AcDbDimension object
indicating that it is a dynamic dimension type. Returns Acad::eOk if successful. Otherwise,
it returns Acad::eInvalidInput.
def setElevation(self, val: float) -> None:
This function sets the dimension's elevation value. Elevation defines the distance from WCS
origin to the plane on which the dimension lies. The default elevation is 0. This function
returns Acad::eOk.
def setHorizontalRefTextRotation(self, val: bool) -> None:
For internal use only.
def setHorizontalRotation(self, val: float) -> None:
This function sets the dimension to use newVal as the horizontal rotation value (in
radians) for the dimension. This is the angle from the dimension's positive horizontal axis
(which is the X axis of the UCS in effect when the dimension was created) to the X axis of
the dimension's OCS (as defined by the dimension's normal vector and the arbitrary axis
algorithm). Positive angles are counterclockwise when looking down the OCS Z axis towards
the OCS origin. The dimension's positive horizontal axis direction is used as the default
left-to-right direction for the dimension text. The horizontal rotation value is used for
DXF group code 51. This function returns Acad::eOk.
def setInspection(self, val: bool) -> None:
This function turns the inspection dimension flag on or off. Returns Acad::eOk if
successful. Otherwise, it returns Acad::eInvalidInput.
def setInspectionFrame(self, val: int) -> None:
This function sets the inspection frame for the dimension. The input argument can be set to
0. The highest integer representation of a valid combination of flags is Label (0x10) and
Rate (0x20), with no frame(0x04) = 34. Other values are as follows: Name Value kShapeRound
0x01 kShapeAngular 0x021 kShapeNone 0x04 kShapeLabel 0x010 (1 = On, 0 = Off) kShapeRate
0x020 (1 = On, 0 = Off) Returns Acad::eOk if successful. Otherwise, it returns
Acad::eInvalidInput.
def setInspectionLabel(self, val: str) -> None:
This function sets the inspection frame for the dimension. Returns Acad::eOk if successful.
Otherwise, it returns Acad::eInvalidInput.
def setNormal(self, val: PyGe.Vector3d) -> None:
This function sets normal to be the dimension's plane normal vector. normal must be in WCS
coordinates. The normal vector is used for DXF group code 210. This function returns
Acad::eOk.
def setPrefix(self, val: str) -> None:
This is setPrefix, a member of class AcDbDimension.
def setShouldParticipateInOPM(self, val: bool) -> None:
def setSuffix(self, val: str) -> None:
This is setSuffix, a member of class AcDbDimension.
def setSuppressAngularTrailingZeros(self, val: bool) -> None:
This is suppressAngularTrailingZeros, a member of class AcDbDimension.
def setSuppressLeadingZeros(self, val: bool) -> None:
This is setSuppressLeadingZeros, a member of class AcDbDimension.
def setSuppressTrailingZeros(self, val: bool) -> None:
This is setSuppressTrailingZeros, a member of class AcDbDimension.
def setSuppressZeroFeet(self, val: bool) -> None:
This is setSuppressZeroFeet, a member of class AcDbDimension.
def setSuppressZeroInches(self, val: bool) -> None:
This is setSuppressZeroInches, a member of class AcDbDimension.
def setTextAttachment(self, val: PyDb.MTextAttachmentPoint) -> None:
Sets the dimension's attachment point value to eAtt. See AcDbMText::AttachmentPoint enum
for possible eAtt values. See the AcDbMText::attachment() function for an explanation of
what this value means. Returns Acad::eOk if successful.
def setTextDefinedSize(self, width: float, height: float) -> None:
Sets text defined width and defined height to MText in dimension block.
def setTextLineSpacingFactor(self, val: float) -> None:
Sets dFactor to be the line spacing factor. A value of 1.0 is single-spaced, 2.0 is
double-spaced, and so on. The spacing factor must be between 0.25 and 4.00, inclusive. Thsi
method returns Acad::eOk if successful, or Acad::eInvalidInput if dFactor is not within the
valid range. See the AcDb::LineSpacingStyle enum for more information and examples.
def setTextLineSpacingStyle(self, val: PyDb.LineSpacingStyle) -> None:
This function sets the dimension's line spacing style to eStyle. See the
AcDb::LineSpacingStyle enum for for more information and examples. Returns Acad::eOk if
successful.
def setTextPosition(self, val: PyGe.Point3d) -> None:
This function sets pt (in WCS coordinates) to be the dimension's text position point. This
is the middle center point of the text (which is itself an MText object with middle-center
justification). The text position point is the WCS equivalent of DXF group code 11. This
function returns Acad::eOk.
def setTextRotation(self, val: float) -> None:
This function sets the dimension to use rot as the rotation angle (in radians) for its
annotation text. This is the angle from the dimension's horizontal axis to the horizontal
axis used by the text. The angle is in the dimension's OCS X-Y plane with positive angles
going counterclockwise when looking down the OCS Z axis towards the OCS origin. The value
obtained from: (2 x pi) + the dimension's text rotation angle--the dimension's horizontal
rotation angle provides the angle between the dimension's OCS X axis and the text's
horizontal axis. This can then be converted back to the WCS if desired. The dimension's
horizontal rotation angle can be obtained using the AcDbDimension::horizontalRotation()
function. The text rotation angle is used for DXF group code 53. This function returns
Acad::eOk.
def setToleranceSuppressLeadingZeros(self, val: bool) -> None:
This is setToleranceSuppressLeadingZeros, a member of class AcDbDimension.
def setToleranceSuppressTrailingZeros(self, val: bool) -> None:
This is setToleranceSuppressTrailingZeros, a member of class AcDbDimension.
def setToleranceSuppressZeroFeet(self, val: bool) -> None:
This is setToleranceSuppressZeroFeet, a member of class AcDbDimension.
def setToleranceSuppressZeroInches(self, val: bool) -> None:
This is setToleranceSuppressZeroInches, a member of class AcDbDimension.
def setUsingDefaultTextPosition(self, val: bool) -> None:
This is setUsingDefaultTextPosition, a member of class AcDbDimension.
def shouldParticipateInOPM(self) -> bool:
def suffix(self) -> str:
This is suffix, a member of class AcDbDimension.
def suppressAngularLeadingZeros(self) -> bool:
This is suppressAngularLeadingZeros, a member of class AcDbDimension.
def suppressAngularTrailingZeros(self) -> bool:
This is suppressAngularTrailingZeros, a member of class AcDbDimension.
def suppressLeadingZeros(self) -> bool:
This is suppressLeadingZeros, a member of class AcDbDimension.
def suppressTrailingZeros(self) -> bool:
This is suppressTrailingZeros, a member of class AcDbDimension.
def suppressZeroFeet(self) -> bool:
This is suppressZeroFeet, a member of class AcDbDimension.
def suppressZeroInches(self) -> bool:
This is suppressZeroInches, a member of class AcDbDimension.
def textAttachment(self) -> MTextAttachmentPoint:
Returns the attachment point value for the text of the dimension. See the
AcDbMText::AttachmentPoint enum for possible values. See the AcDbMText::attachment()
function for an explanation of what this value means.
def textDefinedSize(self) -> tuple[float, float]:
Resets dimension text defined width and defined height to MText in dimension block.
def textLineSpacingFactor(self) -> float:
Returns the line spacing factor (a value between 0.25 and 4.00). See the
AcDb::LineSpacingStyle enum for more information and examples.
def textLineSpacingStyle(self) -> LineSpacingStyle:
Returns the line spacing style for the dimension. See the AcDb::LineSpacingStyle enum for
possible values and what they mean.
def textPosition(self) -> PyGe.Point3d:
This function returns the text position point (in WCS coordinates). This is the middle
center point of the text (which is itself an MText object with middle-center
justification). The text position point is the WCS equivalent of DXF group code 11.
def textRotation(self) -> float:
This function returns the rotation angle (in radians) of the dimension's annotation text.
This is the angle from the dimension's horizontal axis to the horizontal axis used by the
text. The angle is in the dimension's OCS X-Y plane with positive angles going
counterclockwise when looking down the OCS Z axis towards the OCS origin. The value
obtained from: (2 * pi) + the dimension's text rotation angle--the dimension's horizontal
rotation angle provides the angle between the dimension's OCS X axis and the text's
horizontal axis. This can then be converted back to the WCS if desired. The dimension's
horizontal rotation angle can be obtained using the AcDbDimension::horizontalRotation()
function. The text rotation angle is used for DXF group code 53.
def toleranceSuppressLeadingZeros(self) -> bool:
This is toleranceSuppressLeadingZeros, a member of class AcDbDimension.
def toleranceSuppressTrailingZeros(self) -> bool:
This is toleranceSuppressTrailingZeros, a member of class AcDbDimension.
def toleranceSuppressZeroFeet(self) -> bool:
This is toleranceSuppressZeroFeet, a member of class AcDbDimension.
def toleranceSuppressZeroInches(self) -> bool:
This is toleranceSuppressZeroInches, a member of class AcDbDimension.
def useDefaultTextPosition(self) -> None:
This function sets the dimension to use the default text position so that the text position
is automatically updated whenever the dimension is changed in such a way that the default
text position changes. Setting the dimension to use the default text position clears the
eighth bit of the DXF group code 70. This function returns Acad::eOk.
def useSetTextPosition(self) -> None:
This function sets the dimension not to use the default text position so that the text
remains unmoved when the dimension's default text position changes (that is, no automatic
text position updates will occur). Setting the dimension not to use the default text
position sets the eighth bit of the DXF group code 70. This function returns Acad::eOk.
class DrawLeaderOrderType Class
kDrawLeaderHeadFirst: ClassVar[Self]
kDrawLeaderTailFirst: ClassVar[Self]
class DrawMLeaderOrderType Class
kDrawContentFirst: ClassVar[Self]
kDrawLeaderFirst: ClassVar[Self]
class DuplicateRecordCloning Class
kDrcNotApplicable: ClassVar[Self]
kDrcIgnore: ClassVar[Self]
kDrcReplace: ClassVar[Self]
kDrcXrefMangleName: ClassVar[Self]
kDrcMangleName: ClassVar[Self]
kDrcUnmangleName: ClassVar[Self]
class DwgDataType Class
kDwgNull: ClassVar[Self]
kDwgReal: ClassVar[Self]
kDwgInt32: ClassVar[Self]
kDwgInt16: ClassVar[Self]
kDwgInt8: ClassVar[Self]
kDwgText: ClassVar[Self]
kDwgBChunk: ClassVar[Self]
kDwgHandle: ClassVar[Self]
kDwgHardOwnershipId: ClassVar[Self]
kDwgSoftOwnershipId: ClassVar[Self]
kDwgHardPointerId: ClassVar[Self]
kDwgSoftPointerId: ClassVar[Self]
kDwg3Real: ClassVar[Self]
kDwgInt64: ClassVar[Self]
kDwgNotRecognized: ClassVar[Self]
class DwgVersion Class
kDHL_MC0_0: ClassVar[Self]
kDHL_AC1_2: ClassVar[Self]
kDHL_AC1_40: ClassVar[Self]
kDHL_AC1_50: ClassVar[Self]
kDHL_AC2_20: ClassVar[Self]
kDHL_AC2_10: ClassVar[Self]
kDHL_AC2_21: ClassVar[Self]
kDHL_AC2_22: ClassVar[Self]
kDHL_1001: ClassVar[Self]
kDHL_1002: ClassVar[Self]
kDHL_1003: ClassVar[Self]
kDHL_1004: ClassVar[Self]
kDHL_1005: ClassVar[Self]
kDHL_1006: ClassVar[Self]
kDHL_1007: ClassVar[Self]
kDHL_1008: ClassVar[Self]
kDHL_1009: ClassVar[Self]
kDHL_1010: ClassVar[Self]
kDHL_1011: ClassVar[Self]
kDHL_1012: ClassVar[Self]
kDHL_1013: ClassVar[Self]
kDHL_1014: ClassVar[Self]
kDHL_1500: ClassVar[Self]
kDHL_1015: ClassVar[Self]
kDHL_1800a: ClassVar[Self]
kDHL_1800: ClassVar[Self]
kDHL_2100a: ClassVar[Self]
kDHL_1021: ClassVar[Self]
kDHL_2400a: ClassVar[Self]
kDHL_1024: ClassVar[Self]
kDHL_2700a: ClassVar[Self]
kDHL_1027: ClassVar[Self]
kDHL_3200a: ClassVar[Self]
kDHL_1032: ClassVar[Self]
kDHL_Newest: ClassVar[Self]
kDHL_CURRENT: ClassVar[Self]
kDHL_Unknown: ClassVar[Self]
kDHL_Max: ClassVar[Self]
class DxfCode Class
kDxfInvalid: ClassVar[Self]
kDxfXDictionary: ClassVar[Self]
kDxfPReactors: ClassVar[Self]
kDxfOperator: ClassVar[Self]
kDxfXDataStart: ClassVar[Self]
kDxfHeaderId: ClassVar[Self]
kDxfFirstEntId: ClassVar[Self]
kDxfEnd: ClassVar[Self]
kDxfStart: ClassVar[Self]
kDxfText: ClassVar[Self]
kDxfXRefPath: ClassVar[Self]
kDxfShapeName: ClassVar[Self]
kDxfBlockName: ClassVar[Self]
kDxfAttributeTag: ClassVar[Self]
kDxfSymbolTableName: ClassVar[Self]
kDxfMstyleName: ClassVar[Self]
kDxfSymTableRecName: ClassVar[Self]
kDxfAttributePrompt: ClassVar[Self]
kDxfDimStyleName: ClassVar[Self]
kDxfLinetypeProse: ClassVar[Self]
kDxfTextFontFile: ClassVar[Self]
kDxfDescription: ClassVar[Self]
kDxfDimPostStr: ClassVar[Self]
kDxfTextBigFontFile: ClassVar[Self]
kDxfDimAPostStr: ClassVar[Self]
kDxfCLShapeName: ClassVar[Self]
kDxfSymTableRecComments: ClassVar[Self]
kDxfHandle: ClassVar[Self]
kDxfDimBlk: ClassVar[Self]
kDxfDimBlk1: ClassVar[Self]
kDxfLinetypeName: ClassVar[Self]
kDxfDimBlk2: ClassVar[Self]
kDxfTextStyleName: ClassVar[Self]
kDxfLayerName: ClassVar[Self]
kDxfCLShapeText: ClassVar[Self]
kDxfXCoord: ClassVar[Self]
kDxfYCoord: ClassVar[Self]
kDxfZCoord: ClassVar[Self]
kDxfElevation: ClassVar[Self]
kDxfThickness: ClassVar[Self]
kDxfReal: ClassVar[Self]
kDxfViewportHeight: ClassVar[Self]
kDxfTxtSize: ClassVar[Self]
kDxfTxtStyleXScale: ClassVar[Self]
kDxfViewWidth: ClassVar[Self]
kDxfViewportAspect: ClassVar[Self]
kDxfTxtStylePSize: ClassVar[Self]
kDxfViewLensLength: ClassVar[Self]
kDxfViewFrontClip: ClassVar[Self]
kDxfViewBackClip: ClassVar[Self]
kDxfShapeXOffset: ClassVar[Self]
kDxfShapeYOffset: ClassVar[Self]
kDxfViewHeight: ClassVar[Self]
kDxfShapeScale: ClassVar[Self]
kDxfPixelScale: ClassVar[Self]
kDxfLinetypeScale: ClassVar[Self]
kDxfDashLength: ClassVar[Self]
kDxfMlineOffset: ClassVar[Self]
kDxfLinetypeElement: ClassVar[Self]
kDxfAngle: ClassVar[Self]
kDxfViewportSnapAngle: ClassVar[Self]
kDxfViewportTwist: ClassVar[Self]
kDxfVisibility: ClassVar[Self]
kDxfViewportGridDisplay: ClassVar[Self]
kDxfLayerLinetype: ClassVar[Self]
kDxfViewportGridMajor: ClassVar[Self]
kDxfColor: ClassVar[Self]
kDxfHasSubentities: ClassVar[Self]
kDxfViewportVisibility: ClassVar[Self]
kDxfViewportActive: ClassVar[Self]
kDxfViewportNumber: ClassVar[Self]
kDxfInt16: ClassVar[Self]
kDxfViewMode: ClassVar[Self]
kDxfCircleSides: ClassVar[Self]
kDxfViewportZoom: ClassVar[Self]
kDxfViewportIcon: ClassVar[Self]
kDxfViewportSnap: ClassVar[Self]
kDxfViewportGrid: ClassVar[Self]
kDxfViewportSnapStyle: ClassVar[Self]
kDxfViewportSnapPair: ClassVar[Self]
kDxfRegAppFlags: ClassVar[Self]
kDxfTxtStyleFlags: ClassVar[Self]
kDxfLinetypeAlign: ClassVar[Self]
kDxfLinetypePDC: ClassVar[Self]
kDxfInt32: ClassVar[Self]
kDxfVertexIdentifier: ClassVar[Self]
kDxfSubclass: ClassVar[Self]
kDxfEmbeddedObjectStart: ClassVar[Self]
kDxfControlString: ClassVar[Self]
kDxfDimVarHandle: ClassVar[Self]
kDxfUCSOrg: ClassVar[Self]
kDxfUCSOriX: ClassVar[Self]
kDxfUCSOriY: ClassVar[Self]
kDxfXReal: ClassVar[Self]
kDxfViewBrightness: ClassVar[Self]
kDxfViewContrast: ClassVar[Self]
kDxfInt64: ClassVar[Self]
kDxfXInt16: ClassVar[Self]
kDxfNormalX: ClassVar[Self]
kDxfNormalY: ClassVar[Self]
kDxfNormalZ: ClassVar[Self]
kDxfXXInt16: ClassVar[Self]
kDxfInt8: ClassVar[Self]
kDxfRenderMode: ClassVar[Self]
kDxfDefaultLightingType: ClassVar[Self]
kDxfShadowFlags: ClassVar[Self]
kDxfBool: ClassVar[Self]
kDxfDefaultLightingOn: ClassVar[Self]
kDxfXTextString: ClassVar[Self]
kDxfBinaryChunk: ClassVar[Self]
kDxfArbHandle: ClassVar[Self]
kDxfSoftPointerId: ClassVar[Self]
kDxfViewBackgroundId: ClassVar[Self]
kDxfShadePlotId: ClassVar[Self]
kDxfLiveSectionId: ClassVar[Self]
kDxfLiveSectionName: ClassVar[Self]
kDxfHardPointerId: ClassVar[Self]
kDxfObjVisualStyleId: ClassVar[Self]
kDxfVpVisualStyleId: ClassVar[Self]
kDxfMaterialId: ClassVar[Self]
kDxfVisualStyleId: ClassVar[Self]
kDxfDragVisualStyleId: ClassVar[Self]
kDxfSoftOwnershipId: ClassVar[Self]
kDxfHardOwnershipId: ClassVar[Self]
kDxfSunId: ClassVar[Self]
kDxfLineWeight: ClassVar[Self]
kDxfPlotStyleNameType: ClassVar[Self]
kDxfPlotStyleNameId: ClassVar[Self]
kDxfXXXInt16: ClassVar[Self]
kDxfLayoutName: ClassVar[Self]
kDxfColorRGB: ClassVar[Self]
kDxfColorName: ClassVar[Self]
kDxfAlpha: ClassVar[Self]
kDxfGradientObjType: ClassVar[Self]
kDxfGradientPatType: ClassVar[Self]
kDxfGradientTintType: ClassVar[Self]
kDxfGradientColCount: ClassVar[Self]
kDxfGradientAngle: ClassVar[Self]
kDxfGradientShift: ClassVar[Self]
kDxfGradientTintVal: ClassVar[Self]
kDxfGradientColVal: ClassVar[Self]
kDxfGradientName: ClassVar[Self]
kDxfFaceStyleId: ClassVar[Self]
kDxfEdgeStyleId: ClassVar[Self]
kDxfComment: ClassVar[Self]
kDxfXdAsciiString: ClassVar[Self]
kDxfRegAppName: ClassVar[Self]
kDxfXdControlString: ClassVar[Self]
kDxfXdLayerName: ClassVar[Self]
kDxfXdBinaryChunk: ClassVar[Self]
kDxfXdHandle: ClassVar[Self]
kDxfXdXCoord: ClassVar[Self]
kDxfXdYCoord: ClassVar[Self]
kDxfXdZCoord: ClassVar[Self]
kDxfXdWorldXCoord: ClassVar[Self]
kDxfXdWorldYCoord: ClassVar[Self]
kDxfXdWorldZCoord: ClassVar[Self]
kDxfXdWorldXDisp: ClassVar[Self]
kDxfXdWorldYDisp: ClassVar[Self]
kDxfXdWorldZDisp: ClassVar[Self]
kDxfXdWorldXDir: ClassVar[Self]
kDxfXdWorldYDir: ClassVar[Self]
kDxfXdWorldZDir: ClassVar[Self]
kDxfXdReal: ClassVar[Self]
kDxfXdDist: ClassVar[Self]
kDxfXdScale: ClassVar[Self]
kDxfXdInteger16: ClassVar[Self]
kDxfXdInteger32: ClassVar[Self]
kDxfXdMax: ClassVar[Self]
class DynBlockReference Class
def __init__(self, val: PyDb.ObjectId) -> None:
A utility class for accessing information about block references to dynamic blocks.
def __reduce__(self) -> Any:
def anonymousBlockTableRecord(self) -> ObjectId:
Gets the anonymous block definition used to draw the dynamic block. Dynamic blocks whose
properties differ from that of the dynamic block definition may use an anonymous block to
draw themselves. This anonymous block may be shared between multiple block references and
should not be modified by client applications directly. Returns the AcDbObjectId of the
anonymous block definition (an AcDbBlockTableRecord) used to draw the block reference.
Returns AcDbObjectId::kNull if the block reference is not a dynamic block or is not
currently using an anonymous block to draw itself.
def blockId(self) -> ObjectId:
Returns the AcDbObjectId of the block reference.
def className() -> str:
def convertToStaticBlock(self, val: str) -> None:
Converts the dynamic block instance to a legacy (nondynamic) block. When successful, the
dynamic block properties are frozen at their current values and the reference ceases to be
a dynamic block. A new block is defined with the name newBlockName, which must not already
exist in the drawing and must satisfy all of the naming restrictions of normal block
references. Returns Acad::eOk if successful.
def dynamicBlockTableRecord(self) -> ObjectId:
Returns the AcDbObjectId of the dynamic block definition (an AcDbBlockTableRecord) if the
block reference is a dynamic block. Otherwise, it returns AcDbObjectId::kNull.
def getBlockProperties(self) -> list[PyDb.DynBlockReferenceProperty]:
Returns a collection of AcDbDynBlockReferenceProperty instances referencing dynamic block
properties on the AcDbBlockReference. If the AcDbBlockReference contains no dynamic
property information, the returned array is empty.
def getIsDynamicBlock(otherObject: PyDb.ObjectId) -> bool:
def isDynamicBlock(self) -> bool:
Determines whether the AcDbBlockReference passed to the class constructor contains dynamic
block information. Returns true if the AcDbBlockReference passed to the class constructor
contains dynamic block information.
def resetBlock(self) -> None:
Resets the AcDbBlockReference to the default state of the dynamic block. All properties on
the AcDbBlockReference are set to match the values in the block definition. Returns
Acad::eOk if successful.
class DynBlockReferenceProperty Class
def __init__(self) -> None:
A utility class describing a property on a dynamic block, including getting and setting the
current value on the dynamic block. The AcDbDynBlockReferenceProperty class is a reference
to a property defined on a dynamic block instance, and can be used to get and set the
current value on that instance.
def __reduce__(self) -> Any:
def blockId(self) -> ObjectId:
Returns the AcDbObjectId of the dynamic block reference containing the property represented
by the AcDbDynBlockReferenceProperty.
def className() -> str:
def description(self) -> str:
Returns the property description as an AcString object.
def getAllowedValues(self) -> list[PyDb.EvalVariant]:
Returns the allowed values for the property. Not all dynamic block properties have a
restricted set of property values. Some properties are unrestricted, some specify a minimum
or maximum value (or both), and some have a list of allowed values. This function returns a
nonempty values array only when the allowed property values are defined by a list. Minimum,
maximum, and unrestricted property types are not supported by this method. Returns
Acad::eOk if successful.
def propertyName(self) -> str:
Returns the name of the property as an AcString. Property names are guaranteed to be unique
among all properties on a given block reference.
def propertyType(self) -> DwgDataType:
Returns the property type.
def readOnly(self) -> bool:
Determines whether the property is read only. Returns true if the property value can be
changed by calls to setValue().
def setValue(self, val: PyDb.EvalVariant) -> None:
Sets the current value of the property on the block.
def show(self) -> bool:
Returns true if the property is displayed in the Properties palette when the block
reference containing the property is selected.
def unitsType(self) -> DynUnitsType:
Returns the format type of the property.
def value(self) -> EvalVariant:
Returns the current value of the property on the block as an AcDbEvalVariant.
def visibleInCurrentVisibilityState(self) -> bool:
Indicates whether the property is visible in the current visibility state.
class DynBlockTableRecord Class
def __init__(self, val: PyDb.ObjectId) -> None:
A utility class for accessing information about dynamic block definitions and managing the
associated anonymous blocks.
def __reduce__(self) -> Any:
def blockTableRecordId(self) -> ObjectId:
Returns the AcDbObjectId of the block table record.
def className() -> str:
def getAnonymousBlockIds(self) -> list[PyDb.ObjectId]:
AutoCAD creates and manages anonymous blocks by deep cloning the contents of a dynamic
block definition when a reference to the definition needs a modified copy of the block
geometry. This function returns those IDs. Returns Acad::eOk if successful.
def getIsDynamicBlock(otherObject: PyDb.ObjectId | PyDb.BlockTableRecord) -> bool:
def isDynamicBlock(self) -> bool:
Determines whether the AcDbBlockTableRecord passed to the class constructor contains
dynamic block information. Returns true if the AcDbBlockTableRecord passed to the class
constructor contains dynamic block information.
def updateAnonymousBlocks(self) -> None:
Updates the anonymous blocks created from this dynamic block definition to reflect any
changes made to the dynamic block definition. Calling this method after updating a dynamic
block definition causes AutoCAD to replace all anonymous block definitions created from
this definition with new anonymous block definitions, thereby causing all references to
reflect changes made to the dynamic block. The update preserves the values of dynamic block
properties on the references where possible, adding newly created properties and deleting
properties that no longer exist. When complete, all references to the dynamic block reflect
the new state of the block definition.
class DynUnitsType Class
kNoUnits: ClassVar[Self]
kAngular: ClassVar[Self]
kDistance: ClassVar[Self]
kArea: ClassVar[Self]
class Ellipse Class
def __init__(self) -> None:
This class represents the ELLIPSE entity in AutoCAD. It contains the methods to create,
modify, and obtain properties of the ellipse.
def __init__(self, center: PyGe.Point3d, unitNormal: PyGe.Vector3d, majorAxis: PyGe.Vector3d, radiusRatio: float) -> None:
This class represents the ELLIPSE entity in AutoCAD. It contains the methods to create,
modify, and obtain properties of the ellipse.
def __init__(self, center: PyGe.Point3d, unitNormal: PyGe.Vector3d, majorAxis: PyGe.Vector3d, radiusRatio: float, startAngle: float, endAngle: float) -> None:
This class represents the ELLIPSE entity in AutoCAD. It contains the methods to create,
modify, and obtain properties of the ellipse.
def __init__(self, id: PyDb.ObjectId) -> None:
This class represents the ELLIPSE entity in AutoCAD. It contains the methods to create,
modify, and obtain properties of the ellipse.
def __init__(self, id: PyDb.ObjectId, mode: PyDb.OpenMode) -> None:
This class represents the ELLIPSE entity in AutoCAD. It contains the methods to create,
modify, and obtain properties of the ellipse.
def __init__(self, id: PyDb.ObjectId, mode: PyDb.OpenMode, erased: bool) -> None:
This class represents the ELLIPSE entity in AutoCAD. It contains the methods to create,
modify, and obtain properties of the ellipse.
def __init__(*args) -> None:
This class represents the ELLIPSE entity in AutoCAD. It contains the methods to create,
modify, and obtain properties of the ellipse.
def __reduce__(self) -> Any:
def angleAtParam(self, val: float) -> float:
This function returns the first period equivalent of the angle at the param location on the
ellipse. The returned angle will be in the range -pi to pi. The Ellipse's majorAxis vector
is the zero angle. Positive angles are counter-clockwise when looking down the Ellipse's
normal vector (that is, right-hand rule).
def cast(otherObject: PyRx.RxObject) -> Ellipse:
def center(self) -> PyGe.Point3d:
Returns the center point (in WCS Coordinates) of the Ellipse.
def className() -> str:
def cloneFrom(otherObject: PyRx.RxObject) -> Ellipse:
def desc() -> PyRx.RxClass:
Returns a pointer to the AcRxClass object representing the specific class, or most recent
parent class explicitly registered with ObjectARX of either the pointer type used to invoke
it or the class qualifier used with it. (Remember that when a static member function is
invoked via a pointer, the pointer type, not the object type, determines which
implementation of the function is invoked.) When working with a pointer to an object and
the proper AcRxClass object for the class of the object pointed to is desired, the
AcRxObject::isA() function should be used, since it is a virtual non-static method and is
therefore not pointer type dependent. Caching the value of the pointer returned by this
method is acceptable, provided the application knows that the AcRxClass object pointed to
by the returned pointer was created by an ObjectARX application that will not be unloaded.
def endAngle(self) -> float:
Returns the first period equivalent of the end angle (in radians) of the ellipse. The
returned angle will be in the range -pi to pi. The Ellipse's majorAxis vector is the zero
angle. Positive angles are counter-clockwise when looking down the Ellipse's normal vector
(that is, right-hand rule).
def get(self) -> tuple:
This function returns with the properties of the ellipse in the specified arguments.
Center, unitNormal, and majorAxis are in WCS coordinates. startAngle and endAngle are in
radians, in the range -pi to pi. The majorAxis is the vector from center to the ellipse's
start point, and it is the zero angle for startAngle and endAngle. Positive angles are
counter-clockwise when looking down the normal vector (that is, right-hand rule). A closed
Ellipse will have a startAngle of 0 and an endAngle of 2pi. Returns Acad::eOk if
successful. If the Ellipse has no gelib object (that is, AcDbEllipse::isNull returns
Adesk::kTrue), then Acad::eDegenerateGeometry is returned.
def isNull(self) -> bool:
Returns Adesk::kTrue if this Ellipse has no gelib object within itself.
def majorAxis(self) -> PyGe.Vector3d:
Returns the major axis vector (in WCS coordinates) of the ellipse. The major axis vector is
the vector from the Ellipse's center point to its start point. The major axis vector's
magnitude represents 1/2 the length of the major axis.
def majorRadius(self) -> float:
This is majorRadius, a member of class AcDbEllipse.
def minorAxis(self) -> PyGe.Vector3d:
Returns the minor axis vector (in WCS coordinates) of the ellipse. The minor axis vector is
perpendicular to the major axis vector. Its magnitude represents half the length of the
minor axis.
def minorRadius(self) -> float:
This is minorRadius, a member of class AcDbEllipse.
def normal(self) -> PyGe.Vector3d:
Returns the unit normal vector (in WCS coordinates) of the ellipse. The normal vector
specifies the plane that contains the ellipse.
def paramAtAngle(self, val: float) -> float:
Returns the first period parameter value at angle (in radians). The parameter value is in
the range 0 to 2pi. The ellipse's majorAxis vector is the zero angle for angle. Positive
angles are counter-clockwise when looking down the ellipse's normal vector (that is,
right-hand rule).
def radiusRatio(self) -> float:
Returns the ratio of the ellipse's major radius to its minor radius. The returned value
will be in the range 1e-6 to 1.0.
def set(self, center: PyGe.Point3d, unitNormal: PyGe.Vector3d, majorAxis: PyGe.Vector3d, radiusRatio: float) -> None:
This function sets the properties of the ellipse to the values specified in the arguments.
center, unitNormal, and majorAxis are in WCS coordinates. startAngle and endAngle are in
radians, in the range -pi to pi. Positive angles are counter-clockwise when looking down
the normal vector (that is, right-hand rule). A closed Ellipse will have a startAngle of 0
and an endAngle of 2pi. radiusRatio must be in the range 1E-6 to 1.0. The dot product of
normal with itself and majorAxis with itself must be greater than 1E-12. majorAxis must
perpendicular to normal within 1E-6. The difference between startAngle and endAngle must be
greater than 1E-6. Returns Acad::eOk if successful. If any of the parameters are not
acceptable, then this method fails and Acad::eGeneralModelingFailure is returned.
def set(self, center: PyGe.Point3d, unitNormal: PyGe.Vector3d, majorAxis: PyGe.Vector3d, radiusRatio: float, startAngle: float, endAngle: float) -> None:
This function sets the properties of the ellipse to the values specified in the arguments.
center, unitNormal, and majorAxis are in WCS coordinates. startAngle and endAngle are in
radians, in the range -pi to pi. Positive angles are counter-clockwise when looking down
the normal vector (that is, right-hand rule). A closed Ellipse will have a startAngle of 0
and an endAngle of 2pi. radiusRatio must be in the range 1E-6 to 1.0. The dot product of
normal with itself and majorAxis with itself must be greater than 1E-12. majorAxis must
perpendicular to normal within 1E-6. The difference between startAngle and endAngle must be
greater than 1E-6. Returns Acad::eOk if successful. If any of the parameters are not
acceptable, then this method fails and Acad::eGeneralModelingFailure is returned.
def set(*args) -> None:
This function sets the properties of the ellipse to the values specified in the arguments.
center, unitNormal, and majorAxis are in WCS coordinates. startAngle and endAngle are in
radians, in the range -pi to pi. Positive angles are counter-clockwise when looking down
the normal vector (that is, right-hand rule). A closed Ellipse will have a startAngle of 0
and an endAngle of 2pi. radiusRatio must be in the range 1E-6 to 1.0. The dot product of
normal with itself and majorAxis with itself must be greater than 1E-12. majorAxis must
perpendicular to normal within 1E-6. The difference between startAngle and endAngle must be
greater than 1E-6. Returns Acad::eOk if successful. If any of the parameters are not
acceptable, then this method fails and Acad::eGeneralModelingFailure is returned.
def setCenter(self, val: PyGe.Point3d) -> None:
Sets center (in WCS coordinates) to be the center point of the ellipse. Returns Acad::eOk
if successful, otherwise Acad::eGeneralModelingFailure is returned.
def setEndAngle(self, val: float) -> None:
Sets endAngle to be the end angle of the ellipse. Returns Acad::eOk if successful. If the
Ellipse has no gelib object (that is, AcDbEllipse::isNull() returns Adesk::kTrue), then
Acad::eDegenerateGeometry is returned.
def setEndParam(self, val: float) -> None:
Sets endParam to be the new end parameter of the ellipse. If endParam is less than the
current start parameter, then it is incremented in steps of 2pi until it is larger than the
current start parameter. Returns Acad::eOk if successful. If the Ellipse has no gelib
object (that is, AcDbEllipse::isNull() returns Adesk::kTrue), then
Acad::eDegenerateGeometry is returned.
def setMajorRadius(self, val: float) -> None:
This is setMajorRadius, a member of class AcDbEllipse.
def setMinorRadius(self, val: float) -> None:
This is setMinorRadius, a member of class AcDbEllipse.
def setRadiusRatio(self, val: float) -> None:
Sets ratio to be the new radius ratio for the ellipse. ratio must be a value between 1e-6
and 1.0. Returns Acad::eOk if successful. If the Ellipse has no gelib object (that is,
AcDbEllipse::isNull() returns Adesk::kTrue), then Acad::eDegenerateGeometry is returned.
def setStartAngle(self, val: float) -> None:
Sets startAngle to be the new start angle for the ellipse. Returns Acad::eOk if successful.
If the Ellipse has no gelib object (that is, AcDbEllipse::isNull() returns Adesk::kTrue),
then Acad::eDegenerateGeometry is returned.
def setStartParam(self, val: float) -> None:
Sets startParam to be the new start parameter of the ellipse. If startParam is larger than
the current end parameter, then it is decremented in steps of 2pi until it is less than the
current end parameter. Returns Acad::eOk if successful, otherwise
Acad::eGeneralModelingFailure is returned.
def startAngle(self) -> float:
Returns the first period equivalent of the start angle (in radians) of the ellipse. The
returned angle will be in the range -pi to pi. The ellipse's majorAxis vector is the zero
angle for startAngle and endAngle. Positive angles are counter-clockwise when looking down
the normal vector (that is, right-hand rule).
class EndCaps Class
kEndCapNone: ClassVar[Self]
kEndCapRound: ClassVar[Self]
kEndCapAngle: ClassVar[Self]
kEndCapSquare: ClassVar[Self]
class Entity Class
def __init__(self, id: PyDb.ObjectId, mode: PyDb.OpenMode, erased: bool) -> None:
Base class for all database objects having a graphical representation.
def __reduce__(self) -> Any:
def addReactor(self, reactor: PyDb.EntityReactor) -> None:
def addSubentPaths(self, paths: list[PyDb.FullSubentPath]) -> None:
Adds one or more subentities to an entity. The prototype of this method is provided for
completeness of the subentity manipulation APIs. AutoCAD will never call this method on a
custom object. Returns Acad::eOk if successful. The default implementation returns
Acad::eNotAvailable.
def blockId(self) -> ObjectId:
This function returns the AcDbObjectId of the entity's owner, which must be an
AcDbBlockTableRecord. If the entity does not have an owner yet, then AcDbObjectId::kNull
will be returned.
def cast(otherObject: PyRx.RxObject) -> Entity:
def castShadows(self) -> bool:
Returns a boolean value that indicates whether the entity can cast shadows.
def className() -> str:
def cloneFrom(otherObject: PyRx.RxObject) -> Entity:
def collisionType(self) -> CollisionType:
This function returns the collision detection treatment for this entity. Subclasses may
override this method to customize how the class interacts in collision-aware features.
def color(self) -> Color:
This function returns the full true color information for the entity within an instance of
AcCmColor. The index value will be in the range 0 to 256. 0 and 256 are special values. 0
indicates the entity uses the color of the BlockReference that's displaying it. If the
entity is not displayed through a BlockReference (for example, it's directly owned by the
model space BlockTableRecord) and its color is 0, then it will display as though its color
were 7. 256 indicates the entity uses the color specified in the LayerTableRecord it
references.
def colorIndex(self) -> int:
def desc() -> PyRx.RxClass:
Returns a pointer to the AcRxClass object representing the specific class, or most recent
parent class explicitly registered with ObjectARX of either the pointer type used to invoke
it or the class qualifier used with it. (Remember that when a static member function is
invoked via a pointer, the pointer type, not the object type, determines which
implementation of the function is invoked.) When working with a pointer to an object and
the proper AcRxClass object for the class of the object pointed to is desired, the
AcRxObject::isA() function should be used, since it is a virtual non-static method and is
therefore not pointer type dependent. Caching the value of the pointer returned by this
method is acceptable, provided the application knows that the AcRxClass object pointed to
by the returned pointer was created by an ObjectARX application that will not be unloaded.
def draw(self) -> None:
This function queues up the entity's graphics and flushes the graphics queue, forcing the
entity and anything else in the queue to be drawn or re-drawn on-screen. Returns Acad::eOk
if successful. If the entity is not in a database, then Acad::eNotInDatabase will be
returned. If the entity is in a database other than the one currently loaded into the
AutoCAD editor, then Acad::eNotCurrentDatabase will be returned.
def entityColor(self) -> EntityColor:
This function returns the color settings of the entity in an AcCmEntityColor form. Most
clients should use the color() function, which returns the heavyweight AcCmColor object.
However, if color name information is not required, this function provides faster access to
the lightweight AcCmEntityColor data.
def explode(self) -> list[PyDb.Entity]:
Function UsageThis function is primarily intended for AutoCAD to call as part of an explode
operation that includes this entity. However, this function can be used by ObjectARX
applications to obtain an array of pointers to non-database-resident entity objects that
are what the entity considers to be its exploded parts. When calling this function, the
entitySet array does not need to be empty. This function will append to it, and pointers to
entities that it creates to be used in its place as the 'exploded' result. If this function
is successful, it will return Acad::eOk. Other return values may vary depending on how it
has been implemented.Function Implementation in Derived ClassesThis function should
dynamically create (using the new operator) whatever entity objects are appropriate to be
used to replace the entity after an explode operation has taken place. Pointers to these
entities are then appended to the entitySet array. Once the pointers have been appended,
the function should return with a status of Acad::eOk.
def getCompoundObjectTransform(self) -> PyGe.Matrix3d:
This function is intended to be overridden by derived classes that are compound objects (in
other words, objects that behave like blocks in the display list). A compound object has
little or no geometry of its own; instead it relies on nested entities, perhaps the
contents of a BlockTableRecord, to represent itself. A compound object must use the same
transformation matrix for all of its contained entities. Otherwise selection and osnap will
not function correctly. This is the method that the system uses to obtain that matrix from
the compound object. This method should only be overridden if you return the
kDrawableIsCompoundObject flag from setAttributes. The matrix you should return here is the
one that you pass to pushModelTransform before you render your nested objects. You must
override this method if you return the compound object flag in setAttributes, even if you
don't push a transform for your nested objects. In that case you would return Acad::eOk and
the identity transform in xMat. Default implementation: Returns Acad::eNotApplicable and
the identity matrix in xMat.
def getEcs(self) -> PyGe.Matrix3d:
This function is intended to be overridden by derived classes that need to be able to
provide access to an object coordinate system for objects of the class. The intent is that
this function provide a transformation matrix that can be used to transform vectors or
points from the object's object coordinate system (OCS) to the World Coordinate System
(WCS). Default implementation: Return the identity matrix (ones along the diagonal, zeros
elsewhere) in retVal. We recommend that all data stored in custom classes be stored in WCS
coordinates. If this is done, then the object's OCS will be the WCS and the transformation
matrix will be the identity matrix. Then this function will not need to be overridden since
the identity matrix is this function's default return.
def getGeomExtents(self) -> Extents:
Unimplemented at the AcDbEntity level, this method is intended to be overridden in derived
classes. Derived classes should calculate and return the corner points (in WCS coordinates)
of a box (with edges parallel to the WCS X, Y, and Z axes) that encloses the 3D extents of
the entity, and return those points as an instance of class AcDbExtents in the 'extents'
parameter. Default implementation: Immediately returns Acad::eInvalidExtents.
def getGeomExtents2d(self) -> Extents2d:
def getGripPoints(self) -> tuple[list[PyGe.Point3d], list[int], list[int]]:
Function usageThis function supports 'old style' grips, in applications that existed before
the enhancement of grip functionality by the addition of the AcDbGripData class. This
function is not intended to be called by ObjectARX applications. However, it is possible to
do so (for example, as a pass-through from the getStretchPoints() method).Function
implementation in derived classesThis function should append to the gripPoints array any
points that are to treated as grip points for the entity. The gripPoints array is passed to
all entities involved in the grip operation, so the array may already contain grip points
for other entities. Therefore, it is very important to append the new points rather than
assigning them to any existing elements in the array. When finished appending all desired
grip points, return Acad::eOk. If anything other than Acad::eOk is returned, then grips are
not activated for this entity. The osnapModes and geomIds arguments are not currently
used.Default implementationImmediately returns Adesk::eNotImplemented.
def getGripPoints(self, curViewUnitSize: float, gripSize: int, curViewDir: PyGe.Vector3d, bitflags: int) -> tuple[list[PyGe.Point3d], list[int], list[int]]:
Function usageThis function supports 'old style' grips, in applications that existed before
the enhancement of grip functionality by the addition of the AcDbGripData class. This
function is not intended to be called by ObjectARX applications. However, it is possible to
do so (for example, as a pass-through from the getStretchPoints() method).Function
implementation in derived classesThis function should append to the gripPoints array any
points that are to treated as grip points for the entity. The gripPoints array is passed to
all entities involved in the grip operation, so the array may already contain grip points
for other entities. Therefore, it is very important to append the new points rather than
assigning them to any existing elements in the array. When finished appending all desired
grip points, return Acad::eOk. If anything other than Acad::eOk is returned, then grips are
not activated for this entity. The osnapModes and geomIds arguments are not currently
used.Default implementationImmediately returns Adesk::eNotImplemented.
def getGripPoints(*args) -> tuple[list[PyGe.Point3d], list[int], list[int]]:
Function usageThis function supports 'old style' grips, in applications that existed before
the enhancement of grip functionality by the addition of the AcDbGripData class. This
function is not intended to be called by ObjectARX applications. However, it is possible to
do so (for example, as a pass-through from the getStretchPoints() method).Function
implementation in derived classesThis function should append to the gripPoints array any
points that are to treated as grip points for the entity. The gripPoints array is passed to
all entities involved in the grip operation, so the array may already contain grip points
for other entities. Therefore, it is very important to append the new points rather than
assigning them to any existing elements in the array. When finished appending all desired
grip points, return Acad::eOk. If anything other than Acad::eOk is returned, then grips are
not activated for this entity. The osnapModes and geomIds arguments are not currently
used.Default implementationImmediately returns Adesk::eNotImplemented.
def getPlane(self) -> PyGe.Plane:
If the entity is planar, then the plane containing the entity is returned in plane and flag
is set to AcDb::kPlanar. If the entity is nonplanar, but is linear, then plane is set to an
arbitrary plane that contains the entity and flag is set to AcDb::kLinear. If the entity is
nonplanar and nonlinear, then plane is left unset and flag is set to AcDb::kNonPlanar.
Returns Acad::eOk if successful. Other ErrorStatus return values are
implementation-dependent. The default implementation is to return Acad::eNotApplicable.
def getPlotStyleNameId(self) -> ObjectId:
Returns with id set to the object ID of the AcDbPlaceHolder object referenced by the
entity. The AcDbPlaceHolder object resides in the plot style name dictionary, and its key
in the dictionary is the plot style name. Use the AcDbDictionary::nameAt() function on the
plot style name dictionary to get the plot style name string that corresponds to the ID
obtained by this function.
def getStretchPoints(self) -> list[PyGe.Point3d]:
Function usageThis function is not intended to be called by ObjectARX applications.
However, it is possible to do so (for example, as a pass-through from the getGripPoints()
method).Function implementation in derived classesThis function should append to the
stretchPoints array any points that are to treated as stretch points for the entity.
Stretch points are used by the stretch command within AutoCAD. Any stretch points that are
within the crossing selection window during the stretch command, will be moved by whatever
amount the user decides to 'stretch' the selected entities. Any stretch points not in the
crossing selection window will be left alone. This combination of some stretch points
moving while others do not is what 'stretches' the entity. If all stretch points are in the
crossing window, then the entity is moved instead of stretched. The stretchPoints array is
passed to all entities involved in the stretch operation, so the array may already contain
stretch points for other entities. Therefore it is very important to append the new points
rather than assigning them to any existing elements in the array. When finished appending
all desired stretch points, return Acad::eOk. If anything other than Acad::eOk is returned,
then this entity's stretch points will be ignored by the stretch operation.Default
implementationCalls the AcDbEntity::getGripPoints() method. So, unless the entity needs to
have stretch points that are different from the grip points, there is no need to override
this method.
def getSubentPathsAtGsMarker(self, type: PyDb.SubentType, gsMark: int, pickPoint: PyGe.Point3d, viewXform: PyGe.Matrix3d) -> list[PyDb.FullSubentPath]:
Entities use various graphic primitives defined in AcGi to draw themselves. Part of this
mechanism is the ability to associate an integer identifier called a graphics system marker
(or, GS marker) with each primitive or with groups of primitives. Through the use of
certain selection mechanisms, the GS marker for the actual subentity selected on screen can
be obtained and, along with some other information passed into this function, can be used
to create one or more AcDbFullSubentPath objects, each one representing a subentity and
providing a more complete description of the subentity and its environment. These
AcDbFullSubentPath objects can be used by several other functions for various purposes such
as highlighting or unhighlighting the subentities on screen.Function usageIf the entity (of
which the subentity is a part) is directly owned by the model or paper space
BlockTableRecords, then leave out numInserts and entAndInsertStack so that their default
value will be used. Typically the GS marker is obtained via the use of ads_ssget() followed
by ads_ssnamex() (see the ObjectARX Developer's Guide for more information on this). The
pickPoint can be obtained from ads_ssnamex() as well (it's the first group 5009 in the
returned list). The viewXform can be calculated using the ads_trans() function on the
vectors (1,0,0), (0,1,0), and (0,0,1) to translate them from DCS to WCS. The translations
of these three vectors (with an extra 0 appended on to the end of each) would be used as
the first three rows of the matrix. The last row is not used so it can be left as is. This
argument is not used by any of the AutoCAD built-in entities. If the entity is nested
inside one or more block definitions, then the numInserts and entAndInsertStack arguments
must also be filled in with non-zero or non-null values. If they are not filled in, then
this function will fail and return an error status. One way to get the necessary object IDs
is to use ads_nentselp() to obtain the list of ads_names of the container objects. This
list must then be converted to object IDs and reversed. Upon return, the subentPaths
argument will point to a dynamically allocated array of one or more AcDbFullSubentPath
objects. The numPaths argument will contain the number of AcDbFullSubentPath objects being
returned. The calling application is responsible for deallocating the memory used by the
subentPaths array. The C++ delete [ ] should be used. Return values for this function may
vary depending on how the function has been implemented (see below).Function implementation
in derived classesEntity classes which do not set GS markers probably should not implement
this function since the GS marker is the primary (and often the only) means of subentity
distinction. When implemented, this function must use the material provided in type,
gsMark, pickPoint, viewXform, numInserts, and entAndInsertStack to determine which
subentity or subentities meet the criteria in these arguments. Next it must create a
dynamically allocated array of AcDbFullSubentPaths (using the C++ new operator) with one
element for each subentity determined in the first step. Finally it must fill in each
AcDbFullSubentPath object in the array with the information appropriate to the subentity it
will represent. If numInserts == 0 and entAndInsertStack == NULL, it's important to check
to be sure that the entity's owner is indeed the model or paper space BlockTableRecord.
This can be done by using the entity's ownerId() method to obtain the objectId of its
owner, and then opening up that object and using its name() method to obtain its name
string. If the owner is not the model or paper space BlockTableRecord, and numInserts == 0
or entAndInsertStack == NULL, or both, then the input data is invalid and this function
should set numPaths to 0, set subentPaths to NULL and then return the error status
Acad::eInvalidInput. Each AcDbFullSubentPath object has two parts, an array of objectIds
containing all the container objects, and an embedded AcDbSubentId object which in turn has
two elements: an index value and a SubentityType. If the 'main' entity (the entity on which
this function is being called) is not nested within BlockReferences (that is, numInserts ==
0 and entAndInsertStack == NULL), then the objectId array should contain only the objectId
of the 'main' entity. If the 'main' entity is nested in one or more BlockReferences, then
the AcDbObjectIdArray is the same as entAndInsertStack, so copying the entAndInsertStack
elements into the AcDbObjectIdArray is all that's required. The SubentType data item within
the embedded AcDbSubentId should be set the same as type. The index data item within the
embedded AcDbSubentId can be any value you wish (it is often simply the GS marker), but if
implemented, the following functions must be able to interpret them to determine the
corresponding GS marker(s) or subentity (or subentities):
getGsMarkersAtSubentPath()subentPtr()The pickPoint and viewXform arguments are provided as
extra aids (if necessary) in determining which subentity is involved. For example, some
entity types might display differently depending on the display viewpoint. The viewXform
transformation matrix can be used in such cases. The viewXform argument provides a
transformation matrix to transform from WCS (World Coordinate System) to DCS (display
coordinate system). The display coordinate system is oriented such that the positive Z axis
is coming out of the display screen towards the user, the positive X axis is horizontally
from left to right on screen, and the positive Y axis is vertically upwards on screen. So,
if the current viewpoint is at (1,0,0) (the viewer is always looking towards (0,0,0)) then
the viewXform matrix would be: 0 1 0 00 0 1 01 0 0 00 0 0 1In this matrix the last row and
the last column are not used. Notice also that the third row is the DCS Z axis in WCS
coordinates (which is the WCS version of the AutoCAD VIEWPOINT system variable). When this
function returns, the return code to use is completely up to the implementer, but to be
consistent with other existing entity class implementations of this function the following
should be used: If the function succeeds, it should return Acad::eOk.If an invalid or
unsupported SubentType is passed in, then numPaths should be set to 0, subentPaths should
be set to NULL, and Acad::eWrongSubentityType should be returned.If an invalid GS marker
(or any other data item that turns out to be needed) is passed in, then numPaths should be
set to 0, subentPaths should be set to NULL, and Acad::eInvalidInput should be returned.
Default implementation Immediately returns Adesk::eNotApplicable.
def getTransformedCopy(self, matrix3d: PyGe.Matrix3d) -> Entity:
Function usageThis function creates a clone of the entity, applies the xform transformation
matrix to the clone, and then returns with pEnt pointing to the transformed clone. Returns
Acad::eOk if successful. If xform is a non-uniform scaling matrix or non-orthogonal then
Acad::eCannotScaleNonUniformly or Acad::eNotImplemented is returned. WarningFor AutoCAD
built-in complex entities such as polylines, this function produces a shallow clone of the
header entity only, which also owns the original set of 'owned' entities (such as vertices
for a polyline) which are then transformed by the xform matrix. This results in a corrupt
drawing (two header entities owning the same set of 'owned' entities) as well as
transforming the original set of 'owned' entities instead of a copied set. Function
implementation in derived classes The default AcDbEntity implementation of this function
should be adequate for most derived entity types. However, derived entity classes that wish
to support non-uniform scaling or non-orthogonal transformations will need to override this
method with their own implementation. This function must create a copy of the entity (using
memory that has been dynamically allocated via the C++ new operator), apply the
transformation matrix xform to the copy and then return with pEnt pointing to the
transformed copy. Determining what constitutes a valid transformation matrix and whether to
do a shallow clone (that is, the entity's clone() method), a deepclone (if the entity owns
other objects), or no clone at all (that is, make this function a no-op), is up to the
implementer. Return values for this function are also up to the implementer, but to be
consistent with other existing classes the following is recommended: If the function
succeeds, it should return Acad::eOk.If the function is to be a no-op, it should return
Acad::eNotImplementedIf non-uniform scaling is not to be supported and a non-uniform
scaling matrix is passed in, then either Acad::eCannotScaleNonUniformly or
Acad::eNotImplemented should be returned. Default implementation If the entity is uniformly
scaled and orthogonal, AcDbEntity::getTransformedCopy will call the entity's clone() method
to create a clone of the entity, then call AcDbEntity::transformBy() on the clone, and then
return with pEnt set to point to the transformed clone. If xform is a non-uniformly scaled
or a non-orthogonal matrix, then this function will return Acad::eNotImplemented.
def highlight(self, path: PyDb.FullSubentPath, highlightAll: bool) -> None:
Function usageThis function uses the AcDbFullSubentPathid to determine which subentity in
the entity is desired. It then highlights that subentity on screen. If no
AcDbFullSubentPath argument is provided, then the entire entity will be highlighted.
Typically, the AcDbFullSubentPath object passed in via subId is obtained from the entity's
AcDbEntity::getSubentPathsAtGsMarker() method. This guarantees that it is fully and
properly filled in. This function uses the entity's getGsMarkersAtSubentPath() method to
get the GS markers associated with subId. If that function does not return Acad::eOk, then
this function will fail and return whatever ErrorStatus was returned by
getGsMarkersAtSubentPath(). If this function succeeds, then it returns Acad::eOk. It is not
necessary to balance each highlight() function call with a corresponding call to
unhighlight(). Calling the unhighlight() function will unhighlight the entity designated by
subId regardless of how many times the highlight function has been called on it. WarningIf
the entity on which this method is called has its graphics queued for regeneration (that
is, changes have been made to the entity but have not yet been reflected on screen), then
this method will not cause a highlight to occur. Also, calling this method on an entity
that's open for write and whose graphics are queued for regeneration may terminate AutoCAD.
To avoid this limitation, before calling highlight(), you should flush the entity's
graphics by either calling the entity's draw() method, or calling the
AcTransactionManager::flushGraphics() function. Function implementation in derived
classesThe AcDbEntity::highlight() implementation does all the work necessary to highlight
any subentities that correspond to the subIdFullSubentPath. So, there is no need to
override this method unless you wish to do some pre-or post-processing, or you wish to
disable the ability to highlight subentities. If this method is overridden and it is
supposed to highlight subentities, then the AcDbEntity::highlight() method will need to be
invoked at some point within this function in order to do the actual highlighting. Within
the AcDbEntity::highlight() method, the getGsMarkersAtSubentPath() method of this entity is
called to translate the FullSubentPath into the corresponding GS markers. So, if this
function is to succeed, the getGsMarkersAtSubentPath() method needs to be implemented as
well. For more information on the subIdAcDbFullSubentPath argument, see the documentation
on the getGsMarkersAtSubentPath() or getSubentPathsAtGsMarker() methods.
def intersectWith(self, entity: PyDb.Entity, intType: PyDb.Intersect) -> list[PyGe.Point3d]:
Function usageIt finds the intersections of the entity pointed to by pEnt and all the edges
of the bounding box of this entity. The intType is used to determine how to deal with
extending the two entities in order to calculate intersections. The possible
AcDb::Intersect values are: AcDb::kOnBothOperands Do not extend either entity. This results
in only calculating intersections where the two entitys' geometry actually intersect
AcDb::kExtendThis Extend this entity (if necessary) when calculating intersections, but do
not extend the pEnt entity. AcDb::kExtendArg Extend the pEnt entity (if necessary) when
calculating intersections, but do not extend this entity. AcDb::kExtendBoth Extend both the
pEnt entity and this entity (if necessary) when calculating intersections Any intersection
points found are appended to the points array. All points are in WCS coordinates. The
thisGsMarker and otherGsMarker arguments are intended to provide this function with
information to allow it to localize the search for intersections to be between specific
subentities. However, this function is not required to make use of either of these
arguments (most, if not all, of the AutoCAD built-in entity classes do not). When calling
this function, either or both of these arguments may be 0 in order to indicate that they
should be ignored. If this function is successful it returns Acad::eOk. Return values for
error conditions are dependent on the implementation of this function in the classes
involved. Function implementation in derived classesThis function should do all it can to
find all intersection points between the entity it's being called on and the entity pointed
to by pEnt. All intersection points found should be appended to the points array. All such
points must be in WCS coordinates. When implementing the intersection calculation portion
of this function you should take a good look at the AcGe classes to see if they can provide
any useful functionality to help in finding intersections with the geometric primitives
that make up the entity this function is being called on and the pEnt entity. For example,
the AcGeCurve3d class has an isOn() method that will indicate if a supplied point is on the
curve and the AcGeCircArc3d class has several intersectWith() methods to find intersections
with other AcGe types. If the pEnt entity is a type not recognized by this function, it is
quite reasonable to call the pEnt entity's intersectWith() method passing in a pointer to
this entity as the 'pEnt', and all the other arguments passed into this function
(remembering to convert the intType argument If necessary) to see if that entity can
determine any intersection points. This is what the AutoCAD built-in classes do. Also,
don't forget to take into account the intType value. The intType tells you which, if any,
of the two entities should be extended to find 'apparent' intersections. It is not required
that apparent intersection be supported, but if it is not, then an appropriate ErrorStatus
value should be returned to indicate that the call failed. The thisGsMarker and
otherGsMarker arguments are provided to allow this function to determine exactly which
subentities are involved in the intersection operation (for example, if this function is
being called by AutoCAD as part of an intersection Osnap operation these arguments would
indicate which subentities are within the osnap pickbox). For these arguments, a value less
than or equal to zero indicates that that argument should not be used. If this function
completes successfully (even if no intersection points are found), it should return
Acad::eOk. Determining what is considered an error and what ErrorStatus return code to use
for any such errors are up to the implementer -- there are no conventions in this regard.
Default implementationImmediately returns Acad::eNotImplemented.
def intersectWith(self, entity: PyDb.Entity, intType: PyDb.Intersect, thisGsMarker: int, otherGsMarker: int) -> list[PyGe.Point3d]:
Function usageIt finds the intersections of the entity pointed to by pEnt and all the edges
of the bounding box of this entity. The intType is used to determine how to deal with
extending the two entities in order to calculate intersections. The possible
AcDb::Intersect values are: AcDb::kOnBothOperands Do not extend either entity. This results
in only calculating intersections where the two entitys' geometry actually intersect
AcDb::kExtendThis Extend this entity (if necessary) when calculating intersections, but do
not extend the pEnt entity. AcDb::kExtendArg Extend the pEnt entity (if necessary) when
calculating intersections, but do not extend this entity. AcDb::kExtendBoth Extend both the
pEnt entity and this entity (if necessary) when calculating intersections Any intersection
points found are appended to the points array. All points are in WCS coordinates. The
thisGsMarker and otherGsMarker arguments are intended to provide this function with
information to allow it to localize the search for intersections to be between specific
subentities. However, this function is not required to make use of either of these
arguments (most, if not all, of the AutoCAD built-in entity classes do not). When calling
this function, either or both of these arguments may be 0 in order to indicate that they
should be ignored. If this function is successful it returns Acad::eOk. Return values for
error conditions are dependent on the implementation of this function in the classes
involved. Function implementation in derived classesThis function should do all it can to
find all intersection points between the entity it's being called on and the entity pointed
to by pEnt. All intersection points found should be appended to the points array. All such
points must be in WCS coordinates. When implementing the intersection calculation portion
of this function you should take a good look at the AcGe classes to see if they can provide
any useful functionality to help in finding intersections with the geometric primitives
that make up the entity this function is being called on and the pEnt entity. For example,
the AcGeCurve3d class has an isOn() method that will indicate if a supplied point is on the
curve and the AcGeCircArc3d class has several intersectWith() methods to find intersections
with other AcGe types. If the pEnt entity is a type not recognized by this function, it is
quite reasonable to call the pEnt entity's intersectWith() method passing in a pointer to
this entity as the 'pEnt', and all the other arguments passed into this function
(remembering to convert the intType argument If necessary) to see if that entity can
determine any intersection points. This is what the AutoCAD built-in classes do. Also,
don't forget to take into account the intType value. The intType tells you which, if any,
of the two entities should be extended to find 'apparent' intersections. It is not required
that apparent intersection be supported, but if it is not, then an appropriate ErrorStatus
value should be returned to indicate that the call failed. The thisGsMarker and
otherGsMarker arguments are provided to allow this function to determine exactly which
subentities are involved in the intersection operation (for example, if this function is
being called by AutoCAD as part of an intersection Osnap operation these arguments would
indicate which subentities are within the osnap pickbox). For these arguments, a value less
than or equal to zero indicates that that argument should not be used. If this function
completes successfully (even if no intersection points are found), it should return
Acad::eOk. Determining what is considered an error and what ErrorStatus return code to use
for any such errors are up to the implementer -- there are no conventions in this regard.
Default implementationImmediately returns Acad::eNotImplemented.
def intersectWith(self, entity: PyDb.Entity, intType: PyDb.Intersect, plane: PyGe.Plane) -> list[PyGe.Point3d]:
Function usageIt finds the intersections of the entity pointed to by pEnt and all the edges
of the bounding box of this entity. The intType is used to determine how to deal with
extending the two entities in order to calculate intersections. The possible
AcDb::Intersect values are: AcDb::kOnBothOperands Do not extend either entity. This results
in only calculating intersections where the two entitys' geometry actually intersect
AcDb::kExtendThis Extend this entity (if necessary) when calculating intersections, but do
not extend the pEnt entity. AcDb::kExtendArg Extend the pEnt entity (if necessary) when
calculating intersections, but do not extend this entity. AcDb::kExtendBoth Extend both the
pEnt entity and this entity (if necessary) when calculating intersections Any intersection
points found are appended to the points array. All points are in WCS coordinates. The
thisGsMarker and otherGsMarker arguments are intended to provide this function with
information to allow it to localize the search for intersections to be between specific
subentities. However, this function is not required to make use of either of these
arguments (most, if not all, of the AutoCAD built-in entity classes do not). When calling
this function, either or both of these arguments may be 0 in order to indicate that they
should be ignored. If this function is successful it returns Acad::eOk. Return values for
error conditions are dependent on the implementation of this function in the classes
involved. Function implementation in derived classesThis function should do all it can to
find all intersection points between the entity it's being called on and the entity pointed
to by pEnt. All intersection points found should be appended to the points array. All such
points must be in WCS coordinates. When implementing the intersection calculation portion
of this function you should take a good look at the AcGe classes to see if they can provide
any useful functionality to help in finding intersections with the geometric primitives
that make up the entity this function is being called on and the pEnt entity. For example,
the AcGeCurve3d class has an isOn() method that will indicate if a supplied point is on the
curve and the AcGeCircArc3d class has several intersectWith() methods to find intersections
with other AcGe types. If the pEnt entity is a type not recognized by this function, it is
quite reasonable to call the pEnt entity's intersectWith() method passing in a pointer to
this entity as the 'pEnt', and all the other arguments passed into this function
(remembering to convert the intType argument If necessary) to see if that entity can
determine any intersection points. This is what the AutoCAD built-in classes do. Also,
don't forget to take into account the intType value. The intType tells you which, if any,
of the two entities should be extended to find 'apparent' intersections. It is not required
that apparent intersection be supported, but if it is not, then an appropriate ErrorStatus
value should be returned to indicate that the call failed. The thisGsMarker and
otherGsMarker arguments are provided to allow this function to determine exactly which
subentities are involved in the intersection operation (for example, if this function is
being called by AutoCAD as part of an intersection Osnap operation these arguments would
indicate which subentities are within the osnap pickbox). For these arguments, a value less
than or equal to zero indicates that that argument should not be used. If this function
completes successfully (even if no intersection points are found), it should return
Acad::eOk. Determining what is considered an error and what ErrorStatus return code to use
for any such errors are up to the implementer -- there are no conventions in this regard.
Default implementationImmediately returns Acad::eNotImplemented.
def intersectWith(self, entity: PyDb.Entity, intType: PyDb.Intersect, plane: PyGe.Plane, thisGsMarker: int, otherGsMarker: int) -> list[PyGe.Point3d]:
Function usageIt finds the intersections of the entity pointed to by pEnt and all the edges
of the bounding box of this entity. The intType is used to determine how to deal with
extending the two entities in order to calculate intersections. The possible
AcDb::Intersect values are: AcDb::kOnBothOperands Do not extend either entity. This results
in only calculating intersections where the two entitys' geometry actually intersect
AcDb::kExtendThis Extend this entity (if necessary) when calculating intersections, but do
not extend the pEnt entity. AcDb::kExtendArg Extend the pEnt entity (if necessary) when
calculating intersections, but do not extend this entity. AcDb::kExtendBoth Extend both the
pEnt entity and this entity (if necessary) when calculating intersections Any intersection
points found are appended to the points array. All points are in WCS coordinates. The
thisGsMarker and otherGsMarker arguments are intended to provide this function with
information to allow it to localize the search for intersections to be between specific
subentities. However, this function is not required to make use of either of these
arguments (most, if not all, of the AutoCAD built-in entity classes do not). When calling
this function, either or both of these arguments may be 0 in order to indicate that they
should be ignored. If this function is successful it returns Acad::eOk. Return values for
error conditions are dependent on the implementation of this function in the classes
involved. Function implementation in derived classesThis function should do all it can to
find all intersection points between the entity it's being called on and the entity pointed
to by pEnt. All intersection points found should be appended to the points array. All such
points must be in WCS coordinates. When implementing the intersection calculation portion
of this function you should take a good look at the AcGe classes to see if they can provide
any useful functionality to help in finding intersections with the geometric primitives
that make up the entity this function is being called on and the pEnt entity. For example,
the AcGeCurve3d class has an isOn() method that will indicate if a supplied point is on the
curve and the AcGeCircArc3d class has several intersectWith() methods to find intersections
with other AcGe types. If the pEnt entity is a type not recognized by this function, it is
quite reasonable to call the pEnt entity's intersectWith() method passing in a pointer to
this entity as the 'pEnt', and all the other arguments passed into this function
(remembering to convert the intType argument If necessary) to see if that entity can
determine any intersection points. This is what the AutoCAD built-in classes do. Also,
don't forget to take into account the intType value. The intType tells you which, if any,
of the two entities should be extended to find 'apparent' intersections. It is not required
that apparent intersection be supported, but if it is not, then an appropriate ErrorStatus
value should be returned to indicate that the call failed. The thisGsMarker and
otherGsMarker arguments are provided to allow this function to determine exactly which
subentities are involved in the intersection operation (for example, if this function is
being called by AutoCAD as part of an intersection Osnap operation these arguments would
indicate which subentities are within the osnap pickbox). For these arguments, a value less
than or equal to zero indicates that that argument should not be used. If this function
completes successfully (even if no intersection points are found), it should return
Acad::eOk. Determining what is considered an error and what ErrorStatus return code to use
for any such errors are up to the implementer -- there are no conventions in this regard.
Default implementationImmediately returns Acad::eNotImplemented.
def intersectWith(*args) -> list[PyGe.Point3d]:
Function usageIt finds the intersections of the entity pointed to by pEnt and all the edges
of the bounding box of this entity. The intType is used to determine how to deal with
extending the two entities in order to calculate intersections. The possible
AcDb::Intersect values are: AcDb::kOnBothOperands Do not extend either entity. This results
in only calculating intersections where the two entitys' geometry actually intersect
AcDb::kExtendThis Extend this entity (if necessary) when calculating intersections, but do
not extend the pEnt entity. AcDb::kExtendArg Extend the pEnt entity (if necessary) when
calculating intersections, but do not extend this entity. AcDb::kExtendBoth Extend both the
pEnt entity and this entity (if necessary) when calculating intersections Any intersection
points found are appended to the points array. All points are in WCS coordinates. The
thisGsMarker and otherGsMarker arguments are intended to provide this function with
information to allow it to localize the search for intersections to be between specific
subentities. However, this function is not required to make use of either of these
arguments (most, if not all, of the AutoCAD built-in entity classes do not). When calling
this function, either or both of these arguments may be 0 in order to indicate that they
should be ignored. If this function is successful it returns Acad::eOk. Return values for
error conditions are dependent on the implementation of this function in the classes
involved. Function implementation in derived classesThis function should do all it can to
find all intersection points between the entity it's being called on and the entity pointed
to by pEnt. All intersection points found should be appended to the points array. All such
points must be in WCS coordinates. When implementing the intersection calculation portion
of this function you should take a good look at the AcGe classes to see if they can provide
any useful functionality to help in finding intersections with the geometric primitives
that make up the entity this function is being called on and the pEnt entity. For example,
the AcGeCurve3d class has an isOn() method that will indicate if a supplied point is on the
curve and the AcGeCircArc3d class has several intersectWith() methods to find intersections
with other AcGe types. If the pEnt entity is a type not recognized by this function, it is
quite reasonable to call the pEnt entity's intersectWith() method passing in a pointer to
this entity as the 'pEnt', and all the other arguments passed into this function
(remembering to convert the intType argument If necessary) to see if that entity can
determine any intersection points. This is what the AutoCAD built-in classes do. Also,
don't forget to take into account the intType value. The intType tells you which, if any,
of the two entities should be extended to find 'apparent' intersections. It is not required
that apparent intersection be supported, but if it is not, then an appropriate ErrorStatus
value should be returned to indicate that the call failed. The thisGsMarker and
otherGsMarker arguments are provided to allow this function to determine exactly which
subentities are involved in the intersection operation (for example, if this function is
being called by AutoCAD as part of an intersection Osnap operation these arguments would
indicate which subentities are within the osnap pickbox). For these arguments, a value less
than or equal to zero indicates that that argument should not be used. If this function
completes successfully (even if no intersection points are found), it should return
Acad::eOk. Determining what is considered an error and what ErrorStatus return code to use
for any such errors are up to the implementer -- there are no conventions in this regard.
Default implementationImmediately returns Acad::eNotImplemented.
def isPlanar(self) -> tuple[bool, PyGe.Plane]:
This function returns Adesk::kTrue if and only if there is a plane that contains the
entity. Otherwise Adesk::kFalse is returned.
def layer(self) -> str:
This function returns a copy of the name string in the AcDbLayerTableRecord object
referenced by the entity. The calling application is responsible for deallocating the
memory used by the returned string. The acutDelString() function is
recommended.WarningCalling this function before the entity has had its referenced layer
object ID set (that is, it's still set to AcDbObjectId::kNull) will terminate AutoCAD. If
the referenced layer objectId is AcDbObjectId::kNull when the entity is added to a
database, it will be set to the object ID of the database's current default layer.
def layerId(self) -> ObjectId:
This function returns the AcDbObjectId of the AcDbLayerTableRecord referenced by the
entity. If the layerId has not been set yet, then AcDbObjectId::kNull is returned.
def lineWeight(self) -> LineWeight:
This function returns the AcDb::LineWeight of the entity.
def linetype(self) -> str:
This function returns a copy of the name string in the AcDbLinetypeTableRecord object
referenced by the entity. The calling application is responsible for deallocating the
memory used by the returned string. Either the C++ delete [ ] or the C free() function may
be used. Warning Calling this function before the entity has had its referenced linetype
object ID set (that is, it's still set to AcDbObjectId::kNull) will terminate AutoCAD. If
the referenced linetype objectId is AcDbObjectId::kNull when the entity is added to a
database it will be set to the object ID of the database's current default linetype.
def linetypeId(self) -> ObjectId:
This function returns the AcDbObjectId of the AcDbLinetypeTableRecord referenced by the
entity. If the linetypeId has not been set yet, then AcDbObjectId::kNull will be returned.
def linetypeScale(self) -> float:
This function returns the linetype scale factor for the entity.
def list(self) -> None:
Function usageThis function is intended to be called from AutoCAD whenever the entity is
selected during the LIST command. However, it can be called from ObjectARX applications if
desired. This function will print entity specific information to the AutoCAD command
line.Function implementation in derived classesWhen implementing this function in a derived
class, the first thing that should be done in the function is to make a call to
assertReadEnabled(). The next thing to do is to call the parent class's list() method to
allow the parent class to list it's information (the parent class should in turn call its
parent class first and so on up the inheritance chain until AcDbObject is reached. This way
all the entity's information will be properly printed out in order). Once the parent
class's list function has been called then a series of ads_printf() calls can be used to
list whatever information is desired.Default implementationLists out the entity's DXF name,
the layer, the space the entity resides in (model or paper), and the entity's handle.
def material(self) -> str:
Returns the material name.
def materialId(self) -> ObjectId:
Returns the ID of the associated AcDbMaterial object.
def plotStyleName(self) -> str:
This function returns a copy of the plotStyleName string of the entity. The caller is
responsible for deallocating the returned string. The plotStyleName value is used for DXF
group code 390.
def receiveShadows(self) -> bool:
Returns a boolean value indicating whether this entity can receive shadows.
def recordGraphicsModified(self) -> None:
This method sets the entity's state to indicate whether or not the entity should be updated
on screen when it is closed. If the entity is set not to update, then any changes made will
appear the next time the entity is regenerated. If setModified is false and the entity is
currently set to update its graphics on close (which is its default state), then this
function sets the entity so that it will not update on screen when it is closed and
objectModified notification is sent to all entity type reactors attached to the entity. If
setModified is false and the entity is already set not to update its graphics on close,
then this function simply returns. If setModified is true, then the entity is set to update
on screen when it is closed.
def removeReactor(self, reactor: PyDb.EntityReactor) -> None:
def setCastShadows(self, val: bool) -> None:
Sets the property to indicate whether the entity can cast shadows.
def setColor(self, clr: PyDb.AcCmColor, dosubents: bool, db: PyDb.Database) -> None:
Function usage This method sets the entity's color to the color specified by color. If the
entity owns subentities and doSubents == Adesk::kTrue, the color change is applied to the
subentities as well. Custom classes may override this method.
def setColorIndex(self, clr: int, dosubents: bool) -> None:
Function usage This method sets the entity's color to the AutoCAD color index color. If the
entity owns subentities and doSubents == Adesk::kTrue, then the color index change will be
applied to the subentities as well.
def setDatabaseDefaults(self, db: PyDb.Database) -> None:
This function sets the entity's: ColorLayerLinetypeLinetype scaleVisibilityPlot style
nameLine weightto the default values of the database indicated by pDb: If pDb == NULL, then
the current database in the AutoCAD editor is used.
def setLayer(self, val: str | PyDb.ObjectId, dosubents: bool, allowHiddenLayer: bool) -> None:
This method sets entity to reference the AcDbLayerTableRecord identified by the name
specified in newVal. If the entity owns subentities and doSubents == Adesk::kTrue, then the
layer change will be applied to the subentities as well. For an AcDbBlockReference entity,
this method will also update any associated AcDbSequenceEnd subentity regardless of the
doSubents setting.
def setLineWeight(self, val: PyDb.LineWeight, dosubents: bool) -> None:
This method sets the entity to use lineweight. If the entity owns subentities and doSubents
== Adesk::kTrue, then the line weight change will be applied to the subentities as well.
Returns Acad::eOk if successful. Function implementation in derived classes If this
function is overridden and wishes to set the line weight of the entity, then it must call
AcDbEntity::setLineWeight() passing on the lineweight and doSubents arguments. It is also
possible for this function's implementation to deal directly with any subentities and pass
a doSubents value of Adesk::kFalse to AcDbEntity:: setLineWeight(). If the line weight
setting operation is successful, then this function should return Acad::eOk. If lineweight
is not an acceptable value, then this function should return Acad::eInvalidInput. Any other
error return values are up to the implementer.
def setLinetype(self, val: str | PyDb.ObjectId, dosubents: bool) -> None:
Function usage This method sets the entity to reference the AcDbLinetypeTableRecord with
the name specified in newVal. If the entity owns subentities and doSubents == Adesk::kTrue,
then the linetype change will be applied to the subentities as well. For an
AcDbBlockReference entity, this method will also update any associated AcDbSequenceEnd
subentity regardless of the doSubents setting.
def setLinetypeScale(self, val: float, dosubents: bool) -> None:
This method sets the entity to use newval as its linetype scale factor. newVal must be
nonnegative. If the entity owns subentities and doSubents == Adesk::kTrue, then the
linetype scale change will be applied to the subentities as well.
def setMaterial(self, val: str | PyDb.ObjectId, dosubents: bool) -> None:
This method sets the material reference to the specified material. The specified name must
correspond to an existing AcDbMaterial object. Returns Acad::eOk when successful
def setPlotStyleName(self) -> None:
This function searches the PlotStyleName dictionary for an entry with the name that matches
newName and if found, sets the entity to use that plotStyleName entry. Because a lookup in
the PlotStyleName dictionary is required, the entity must be database-resident for this
method to succeed. The names ByLayer and ByBlock are allowed as well as user-defined names.
If the entity owns subentities and doSubents == Adesk::kTrue, then the change will be
applied to the subentities as well. For an AcDbBlockReference entity, this method will also
update any associated AcDbSequenceEnd subentity regardless of the doSubents setting.
Returns Acad::eOk if successful. If the entity is not database-resident, then
Acad::eNoDatabase will be returned. If there is no entry in the PlotStyleName dictionary
for newName, then Acad::eKeyNotFound will be returned. The plotStyleName value is used for
DXF group code 390.
def setPlotStyleName(self, nameType: PyDb.PlotStyleNameType, doSubents: bool) -> None:
This function searches the PlotStyleName dictionary for an entry with the name that matches
newName and if found, sets the entity to use that plotStyleName entry. Because a lookup in
the PlotStyleName dictionary is required, the entity must be database-resident for this
method to succeed. The names ByLayer and ByBlock are allowed as well as user-defined names.
If the entity owns subentities and doSubents == Adesk::kTrue, then the change will be
applied to the subentities as well. For an AcDbBlockReference entity, this method will also
update any associated AcDbSequenceEnd subentity regardless of the doSubents setting.
Returns Acad::eOk if successful. If the entity is not database-resident, then
Acad::eNoDatabase will be returned. If there is no entry in the PlotStyleName dictionary
for newName, then Acad::eKeyNotFound will be returned. The plotStyleName value is used for
DXF group code 390.
def setPlotStyleName(self, nameType: PyDb.PlotStyleNameType, newId: PyDb.ObjectId, doSubents: bool) -> None:
This function searches the PlotStyleName dictionary for an entry with the name that matches
newName and if found, sets the entity to use that plotStyleName entry. Because a lookup in
the PlotStyleName dictionary is required, the entity must be database-resident for this
method to succeed. The names ByLayer and ByBlock are allowed as well as user-defined names.
If the entity owns subentities and doSubents == Adesk::kTrue, then the change will be
applied to the subentities as well. For an AcDbBlockReference entity, this method will also
update any associated AcDbSequenceEnd subentity regardless of the doSubents setting.
Returns Acad::eOk if successful. If the entity is not database-resident, then
Acad::eNoDatabase will be returned. If there is no entry in the PlotStyleName dictionary
for newName, then Acad::eKeyNotFound will be returned. The plotStyleName value is used for
DXF group code 390.
def setPlotStyleName(*args) -> None:
This function searches the PlotStyleName dictionary for an entry with the name that matches
newName and if found, sets the entity to use that plotStyleName entry. Because a lookup in
the PlotStyleName dictionary is required, the entity must be database-resident for this
method to succeed. The names ByLayer and ByBlock are allowed as well as user-defined names.
If the entity owns subentities and doSubents == Adesk::kTrue, then the change will be
applied to the subentities as well. For an AcDbBlockReference entity, this method will also
update any associated AcDbSequenceEnd subentity regardless of the doSubents setting.
Returns Acad::eOk if successful. If the entity is not database-resident, then
Acad::eNoDatabase will be returned. If there is no entry in the PlotStyleName dictionary
for newName, then Acad::eKeyNotFound will be returned. The plotStyleName value is used for
DXF group code 390.
def setPropertiesFrom(self, entity: PyDb.Entity, dosubents: bool) -> None:
This method copies the ColorLayerLinetypeLinetype scaleVisibilityvalues from the entity
pointed to by pEntity into this entity. If the entity owns subentities and doSubents ==
Adesk::kTrue, then the property changes will be applied to the subentities as well. Returns
Acad::eOk if successful.
def setReceiveShadows(self, val: bool) -> None:
Sets the property indicating whether this entity can receive shadows.
def setTransparency(self, transparency: PyDb.Transparency, dosubents: bool) -> None:
This function sets the transparency value for the entity. If the entity owns subentities
and is Adesk::kTrue, the transparency change is applied to the subentities as well. The
only built-in entities for which kTrue has an effect are AcDb2dPolyline, AcDb3dPolyline,
AcDbPolyFaceMesh, and AcDbPolygonMesh. If this function is overridden and wishes to set the
color of the entity, the override must call AcDbEntity::setTransparency(), passing on the
trans and doSubents arguments. It is also possible for this function's implementation to
deal directly with any subentities and pass a doSubents value of Adesk::kFalse to
AcDbEntity::setTransparency(). If the transparency-setting operation is successful, the
function returns Acad::eOk. Return values for errors are up to the implementer.
def setVisibility(self, val: PyDb.Visibility, dosubents: bool) -> None:
This method sets the visibility of an entity to the value specified by newVal. If the
entity owns subentities and doSubents == Adesk::kTrue, then the visibility change will be
applied to the subentities as well.
def subent(self, path: PyDb.FullSubentPath) -> Entity:
def transformBy(self, matrix3d: PyGe.Matrix3d) -> None:
Function usageThis function provides a means by which AutoCAD and ObjectARX applications
can ask the entity to apply a transformation matrix (xform) to itself. Each entity class
must implement this function, so restrictions on what types of transformations are
supported are up to the implementer of the entity class. The AutoCAD built-in entity
classes for entity types that existed before R13 (that is, all the classes listed in the
header file dbents.h such as AcDbCircle, AcDbLine, AcDbArc, AcDb2dPolyline, etc.) require
that the transformation matrix represent a uniformly scaling orthogonal transformation (if
it is not, then Acad::eCannotScaleNonUniformly will be returned). Other AutoCAD built-in
classes have no restrictions. Returns Acad::eOk if successful. Return values for errors are
implementation-dependent.Function implementation in derived classesThis function must apply
the transformation matrix xform to the entity and change the entity's state to reflect the
transformation. It is completely up to the implementer as to how to apply the
transformation. It is also up to the implementer to decide what, if any, restrictions will
be placed on the type of transformations supported. If any restrictions are desired, then
it's up to the implementation of this function to enforce them. If your derived class
implements transformBy() without calling the base class, you must call AcDbObject::
xDataTransformBy() or your Xdata will not be transformed. If this function successfully
transforms the entity, then it should return Acad::eOk. Return values for error conditions
are completely up to the implementer of this function. However, if the error is caused by a
non-uniformly scaling or non-orthogonal matrix, then to be consistent with other entities
that have this restriction, it is recommended that Acad::eCannotScaleNonUniformly be
returned.
def transparency(self) -> Transparency:
def visibility(self) -> Visibility:
This method returns the entity's current visibility state, either AcDb::kVisible or
AcDb::kInvisible.
class EntityColor Class
def ByBlock() -> EntityColor:
def ByLayer() -> EntityColor:
def ByNone(self) -> EntityColor:
def Foreground() -> EntityColor:
def NoneClr() -> EntityColor:
def __init__(self, r: int, g: int, b: int) -> None:
def __ne__(self) -> bool:
def __reduce__(self) -> Any:
def black() -> EntityColor:
def blue(self) -> int:
def canResolveRGB(self) -> bool:
def colorIndex(self) -> int:
def colorMethod(self) -> ColorMethod:
def getCOLORREF(self) -> int:
def getRGB(self) -> int:
def getRGBM(self) -> int:
def green(self) -> int:
def isByACI(self) -> bool:
def isByBlock(self) -> bool:
def isByColor(self) -> bool:
def isByLayer(self) -> bool:
def isByPen(self) -> bool:
def isForeground(self) -> bool:
def isLayerFrozen(self) -> bool:
def isLayerFrozenOrOff(self) -> bool:
def isLayerOff(self) -> bool:
def isNone(self) -> bool:
def layerIndex(self) -> int:
def makeTrueColor(self) -> EntityColor:
def penIndex(self) -> int:
def red(self) -> int:
def setByBlock(self) -> None:
def setByLayer(self) -> None:
def setCOLORREF(self, val: int) -> ErrorStatus:
def setColorIndex(self, val: int) -> ErrorStatus:
def setForeground(self) -> None:
def setLayerIndex(self, val: int) -> ErrorStatus:
def setLayerOff(self) -> None:
def setNone(self) -> None:
def setPenIndex(self, val: int) -> ErrorStatus:
def setRGB(self, rgbquad: int) -> ErrorStatus:
def setRGB(self, r: int, g: int, b: int) -> ErrorStatus:
def setRGB(*args) -> ErrorStatus:
def setRGBM(self, val: int) -> ErrorStatus:
def white() -> EntityColor:
class EntityHyperlinkPE Class
def __init__(self, obj: PyRx.RxObject) -> None:
def __reduce__(self) -> Any:
def className() -> str:
def desc() -> PyRx.RxClass:
Returns a pointer to the AcRxClass object representing the specific class, or most recent
parent class explicitly registered with ObjectARX of either the pointer type used to invoke
it or the class qualifier used with it. (Remember that when a static member function is
invoked via a pointer, the pointer type, not the object type, determines which
implementation of the function is invoked.) When working with a pointer to an object and
the proper AcRxClass object for the class of the object pointed to is desired, the
AcRxObject::isA() function should be used, since it is a virtual non-static method and is
therefore not pointer type dependent. Caching the value of the pointer returned by this
method is acceptable, provided the application knows that the AcRxClass object pointed to
by the returned pointer was created by an ObjectARX application that will not be unloaded.
def getHyperlinkCollection(self, obj: PyDb.DbObject, bOneOnly: bool, bIgnoreBlockDefinition: bool) -> HyperlinkCollection:
def getHyperlinkCollection(self, ids: list[PyDb.ObjectId], bOneOnly: bool, bIgnoreBlockDefinition: bool) -> HyperlinkCollection:
def getHyperlinkCollection(*args) -> HyperlinkCollection:
def getHyperlinkCount(self, obj: PyDb.DbObject, bIgnoreBlockDefinition: bool) -> int:
def getHyperlinkCount(self, ids: list[PyDb.ObjectId], bIgnoreBlockDefinition: bool) -> int:
def getHyperlinkCount(*args) -> int:
def hasHyperlink(self, obj: PyDb.DbObject, bIgnoreBlockDefinition: bool) -> bool:
def hasHyperlink(self, ids: list[PyDb.ObjectId], bIgnoreBlockDefinition: bool) -> bool:
def hasHyperlink(*args) -> bool:
def setHyperlinkCollection(self, db: PyDb.DbObject, pcHCL: PyDb.HyperlinkCollection) -> None:
class EntityReactor Class
def __init__(self) -> None:
def __reduce__(self) -> Any:
def cancelled(self, obj: PyDb.DbObject) -> None:
def className() -> str:
def copied(self, obj: PyDb.DbObject, newObj: PyDb.DbObject) -> None:
def desc() -> PyRx.RxClass:
Returns a pointer to the AcRxClass object representing the specific class, or most recent
parent class explicitly registered with ObjectARX of either the pointer type used to invoke
it or the class qualifier used with it. (Remember that when a static member function is
invoked via a pointer, the pointer type, not the object type, determines which
implementation of the function is invoked.) When working with a pointer to an object and
the proper AcRxClass object for the class of the object pointed to is desired, the
AcRxObject::isA() function should be used, since it is a virtual non-static method and is
therefore not pointer type dependent. Caching the value of the pointer returned by this
method is acceptable, provided the application knows that the AcRxClass object pointed to
by the returned pointer was created by an ObjectARX application that will not be unloaded.
def dragCloneToBeDeleted(self, obj: PyDb.Entity, clone: PyDb.Entity) -> None:
def erased(self, obj: PyDb.DbObject, flag: bool) -> None:
def goodbye(self, obj: PyDb.DbObject) -> None:
def modified(self, obj: PyDb.DbObject) -> None:
def modifiedGraphics(self, obj: PyDb.Entity) -> None:
def modifiedXData(self, obj: PyDb.DbObject) -> None:
def modifyUndone(self, obj: PyDb.DbObject) -> None:
def objectClosed(self, obj: PyDb.ObjectId) -> None:
def openedForModify(self, obj: PyDb.DbObject) -> None:
def reappended(self, obj: PyDb.DbObject) -> None:
def subObjModified(self, obj: PyDb.DbObject, subObj: PyDb.DbObject) -> None:
def unappended(self, obj: PyDb.DbObject) -> None:
class ErrorStatus Class
Ok: ClassVar[Self]
eOk: ClassVar[Self]
eNotImplementedYet: ClassVar[Self]
eNotApplicable: ClassVar[Self]
eInvalidInput: ClassVar[Self]
eAmbiguousInput: ClassVar[Self]
eAmbiguousOutput: ClassVar[Self]
eOutOfMemory: ClassVar[Self]
eBufferTooSmall: ClassVar[Self]
eInvalidOpenState: ClassVar[Self]
eEntityInInactiveLayout: ClassVar[Self]
eHandleExists: ClassVar[Self]
eNullHandle: ClassVar[Self]
eBrokenHandle: ClassVar[Self]
eUnknownHandle: ClassVar[Self]
eHandleInUse: ClassVar[Self]
eNullObjectPointer: ClassVar[Self]
eNullObjectId: ClassVar[Self]
eNullBlockName: ClassVar[Self]
eContainerNotEmpty: ClassVar[Self]
eNullEntityPointer: ClassVar[Self]
eIllegalEntityType: ClassVar[Self]
eKeyNotFound: ClassVar[Self]
eDuplicateKey: ClassVar[Self]
eInvalidIndex: ClassVar[Self]
eDuplicateIndex: ClassVar[Self]
eAlreadyInDb: ClassVar[Self]
eOutOfDisk: ClassVar[Self]
eDeletedEntry: ClassVar[Self]
eNegativeValueNotAllowed: ClassVar[Self]
eInvalidExtents: ClassVar[Self]
eInvalidAdsName: ClassVar[Self]
eInvalidSymbolTableName: ClassVar[Self]
eInvalidKey: ClassVar[Self]
eWrongObjectType: ClassVar[Self]
eWrongDatabase: ClassVar[Self]
eObjectToBeDeleted: ClassVar[Self]
eInvalidDwgVersion: ClassVar[Self]
eAnonymousEntry: ClassVar[Self]
eIllegalReplacement: ClassVar[Self]
eEndOfObject: ClassVar[Self]
eEndOfFile: ClassVar[Self]
eIsReading: ClassVar[Self]
eIsWriting: ClassVar[Self]
eNotOpenForRead: ClassVar[Self]
eNotOpenForWrite: ClassVar[Self]
eNotThatKindOfClass: ClassVar[Self]
eInvalidBlockName: ClassVar[Self]
eMissingDxfField: ClassVar[Self]
eDuplicateDxfField: ClassVar[Self]
eInvalidDxfCode: ClassVar[Self]
eInvalidResBuf: ClassVar[Self]
eBadDxfSequence: ClassVar[Self]
eFilerError: ClassVar[Self]
eVertexAfterFace: ClassVar[Self]
eInvalidFaceVertexIndex: ClassVar[Self]
eInvalidMeshVertexIndex: ClassVar[Self]
eOtherObjectsBusy: ClassVar[Self]
eMustFirstAddBlockToDb: ClassVar[Self]
eCannotNestBlockDefs: ClassVar[Self]
eDwgRecoveredOK: ClassVar[Self]
eDwgNotRecoverable: ClassVar[Self]
eDxfPartiallyRead: ClassVar[Self]
eDxfReadAborted: ClassVar[Self]
eDxbPartiallyRead: ClassVar[Self]
eDwgCRCDoesNotMatch: ClassVar[Self]
eDwgSentinelDoesNotMatch: ClassVar[Self]
eDwgObjectImproperlyRead: ClassVar[Self]
eNoInputFiler: ClassVar[Self]
eDwgNeedsAFullSave: ClassVar[Self]
eDxbReadAborted: ClassVar[Self]
eFileLockedByACAD: ClassVar[Self]
eFileAccessErr: ClassVar[Self]
eFileSystemErr: ClassVar[Self]
eFileInternalErr: ClassVar[Self]
eFileTooManyOpen: ClassVar[Self]
eFileNotFound: ClassVar[Self]
eDwkLockFileFound: ClassVar[Self]
eWasErased: ClassVar[Self]
ePermanentlyErased: ClassVar[Self]
eWasOpenForRead: ClassVar[Self]
eWasOpenForWrite: ClassVar[Self]
eWasOpenForUndo: ClassVar[Self]
eWasNotifying: ClassVar[Self]
eWasOpenForNotify: ClassVar[Self]
eOnLockedLayer: ClassVar[Self]
eMustOpenThruOwner: ClassVar[Self]
eSubentitiesStillOpen: ClassVar[Self]
eAtMaxReaders: ClassVar[Self]
eIsWriteProtected: ClassVar[Self]
eIsXRefObject: ClassVar[Self]
eNotAnEntity: ClassVar[Self]
eHadMultipleReaders: ClassVar[Self]
eDuplicateRecordName: ClassVar[Self]
eXRefDependent: ClassVar[Self]
eSelfReference: ClassVar[Self]
eMissingSymbolTable: ClassVar[Self]
eMissingSymbolTableRec: ClassVar[Self]
eWasNotOpenForWrite: ClassVar[Self]
eCloseWasNotifying: ClassVar[Self]
eCloseModifyAborted: ClassVar[Self]
eClosePartialFailure: ClassVar[Self]
eCloseFailObjectDamaged: ClassVar[Self]
eCannotBeErasedByCaller: ClassVar[Self]
eCannotBeResurrected: ClassVar[Self]
eWasNotErased: ClassVar[Self]
eInsertAfter: ClassVar[Self]
eFixedAllErrors: ClassVar[Self]
eLeftErrorsUnfixed: ClassVar[Self]
eUnrecoverableErrors: ClassVar[Self]
eNoDatabase: ClassVar[Self]
eXdataSizeExceeded: ClassVar[Self]
eRegappIdNotFound: ClassVar[Self]
eRepeatEntity: ClassVar[Self]
eRecordNotInTable: ClassVar[Self]
eIteratorDone: ClassVar[Self]
eNullIterator: ClassVar[Self]
eNotInBlock: ClassVar[Self]
eOwnerNotInDatabase: ClassVar[Self]
eOwnerNotOpenForRead: ClassVar[Self]
eOwnerNotOpenForWrite: ClassVar[Self]
eExplodeBeforeTransform: ClassVar[Self]
eCannotScaleNonUniformly: ClassVar[Self]
eNotInDatabase: ClassVar[Self]
eNotCurrentDatabase: ClassVar[Self]
eIsAnEntity: ClassVar[Self]
eCannotChangeActiveViewport: ClassVar[Self]
eNotInPaperspace: ClassVar[Self]
eCommandWasInProgress: ClassVar[Self]
eGeneralModelingFailure: ClassVar[Self]
eOutOfRange: ClassVar[Self]
eNonCoplanarGeometry: ClassVar[Self]
eDegenerateGeometry: ClassVar[Self]
eInvalidAxis: ClassVar[Self]
ePointNotOnEntity: ClassVar[Self]
eSingularPoint: ClassVar[Self]
eInvalidOffset: ClassVar[Self]
eNonPlanarEntity: ClassVar[Self]
eCannotExplodeEntity: ClassVar[Self]
eStringTooLong: ClassVar[Self]
eInvalidSymTableFlag: ClassVar[Self]
eUndefinedLineType: ClassVar[Self]
eInvalidTextStyle: ClassVar[Self]
eTooFewLineTypeElements: ClassVar[Self]
eTooManyLineTypeElements: ClassVar[Self]
eExcessiveItemCount: ClassVar[Self]
eIgnoredLinetypeRedef: ClassVar[Self]
eBadUCS: ClassVar[Self]
eBadPaperspaceView: ClassVar[Self]
eSomeInputDataLeftUnread: ClassVar[Self]
eNoInternalSpace: ClassVar[Self]
eInvalidDimStyle: ClassVar[Self]
eInvalidLayer: ClassVar[Self]
eUserBreak: ClassVar[Self]
eUserUnloaded: ClassVar[Self]
eDeleteEntity: ClassVar[Self]
eInvalidFix: ClassVar[Self]
eFSMError: ClassVar[Self]
eBadLayerName: ClassVar[Self]
eLayerGroupCodeMissing: ClassVar[Self]
eBadColorIndex: ClassVar[Self]
eBadLinetypeName: ClassVar[Self]
eBadLinetypeScale: ClassVar[Self]
eBadVisibilityValue: ClassVar[Self]
eProperClassSeparatorExpected: ClassVar[Self]
eBadLineWeightValue: ClassVar[Self]
eBadColor: ClassVar[Self]
eBadMaterialName: ClassVar[Self]
ePagerError: ClassVar[Self]
eOutOfPagerMemory: ClassVar[Self]
ePagerWriteError: ClassVar[Self]
eWasNotForwarding: ClassVar[Self]
eInvalidIdMap: ClassVar[Self]
eInvalidOwnerObject: ClassVar[Self]
eOwnerNotSet: ClassVar[Self]
eWrongSubentityType: ClassVar[Self]
eTooManyVertices: ClassVar[Self]
eTooFewVertices: ClassVar[Self]
eNoActiveTransactions: ClassVar[Self]
eNotTopTransaction: ClassVar[Self]
eTransactionOpenWhileCommandEnded: ClassVar[Self]
eInProcessOfCommitting: ClassVar[Self]
eNotNewlyCreated: ClassVar[Self]
eLongTransReferenceError: ClassVar[Self]
eNoWorkSet: ClassVar[Self]
eAlreadyInGroup: ClassVar[Self]
eNotInGroup: ClassVar[Self]
eAlreadyInferred: ClassVar[Self]
eInvalidREFIID: ClassVar[Self]
eInvalidNormal: ClassVar[Self]
eInvalidStyle: ClassVar[Self]
eCannotRestoreFromAcisFile: ClassVar[Self]
eMakeMeProxy: ClassVar[Self]
eNLSFileNotAvailable: ClassVar[Self]
eNotAllowedForThisProxy: ClassVar[Self]
eNotClonedPrimaryProxy: ClassVar[Self]
eNotSupportedInDwgApi: ClassVar[Self]
ePolyWidthLost: ClassVar[Self]
eNullExtents: ClassVar[Self]
eBadDwgHeader: ClassVar[Self]
eLockViolation: ClassVar[Self]
eLockConflict: ClassVar[Self]
eDatabaseObjectsOpen: ClassVar[Self]
eLockChangeInProgress: ClassVar[Self]
eVetoed: ClassVar[Self]
eNoDocument: ClassVar[Self]
eNotFromThisDocument: ClassVar[Self]
eLISPActive: ClassVar[Self]
eTargetDocNotQuiescent: ClassVar[Self]
eDocumentSwitchDisabled: ClassVar[Self]
eInvalidContext: ClassVar[Self]
eCreateFailed: ClassVar[Self]
eCreateInvalidName: ClassVar[Self]
eSetFailed: ClassVar[Self]
eDelDoesNotExist: ClassVar[Self]
eDelIsModelSpace: ClassVar[Self]
eDelLastLayout: ClassVar[Self]
eDelUnableToSetCurrent: ClassVar[Self]
eDelUnableToFind: ClassVar[Self]
eRenameDoesNotExist: ClassVar[Self]
eRenameIsModelSpace: ClassVar[Self]
eRenameInvalidLayoutName: ClassVar[Self]
eRenameLayoutAlreadyExists: ClassVar[Self]
eRenameInvalidName: ClassVar[Self]
eCopyDoesNotExist: ClassVar[Self]
eCopyIsModelSpace: ClassVar[Self]
eCopyFailed: ClassVar[Self]
eCopyInvalidName: ClassVar[Self]
eCopyNameExists: ClassVar[Self]
eProfileDoesNotExist: ClassVar[Self]
eInvalidFileExtension: ClassVar[Self]
eInvalidProfileName: ClassVar[Self]
eFileExists: ClassVar[Self]
eProfileIsInUse: ClassVar[Self]
eCantOpenFile: ClassVar[Self]
eNoFileName: ClassVar[Self]
eRegistryAccessError: ClassVar[Self]
eRegistryCreateError: ClassVar[Self]
eBadDxfFile: ClassVar[Self]
eUnknownDxfFileFormat: ClassVar[Self]
eMissingDxfSection: ClassVar[Self]
eInvalidDxfSectionName: ClassVar[Self]
eNotDxfHeaderGroupCode: ClassVar[Self]
eUndefinedDxfGroupCode: ClassVar[Self]
eNotInitializedYet: ClassVar[Self]
eInvalidDxf2dPoint: ClassVar[Self]
eInvalidDxf3dPoint: ClassVar[Self]
eBadlyNestedAppData: ClassVar[Self]
eIncompleteBlockDefinition: ClassVar[Self]
eIncompleteComplexObject: ClassVar[Self]
eBlockDefInEntitySection: ClassVar[Self]
eNoBlockBegin: ClassVar[Self]
eDuplicateLayerName: ClassVar[Self]
eBadPlotStyleName: ClassVar[Self]
eDuplicateBlockName: ClassVar[Self]
eBadPlotStyleType: ClassVar[Self]
eBadPlotStyleNameHandle: ClassVar[Self]
eUndefineShapeName: ClassVar[Self]
eDuplicateBlockDefinition: ClassVar[Self]
eMissingBlockName: ClassVar[Self]
eBinaryDataSizeExceeded: ClassVar[Self]
eObjectIsReferenced: ClassVar[Self]
eNoThumbnailBitmap: ClassVar[Self]
eGuidNoAddress: ClassVar[Self]
eMustBe0to2: ClassVar[Self]
eMustBe0to3: ClassVar[Self]
eMustBe0to4: ClassVar[Self]
eMustBe0to5: ClassVar[Self]
eMustBe0to8: ClassVar[Self]
eMustBe1to8: ClassVar[Self]
eMustBe1to15: ClassVar[Self]
eMustBePositive: ClassVar[Self]
eMustBeNonNegative: ClassVar[Self]
eMustBeNonZero: ClassVar[Self]
eMustBe1to6: ClassVar[Self]
eNoPlotStyleTranslationTable: ClassVar[Self]
ePlotStyleInColorDependentMode: ClassVar[Self]
eMaxLayouts: ClassVar[Self]
eNoClassId: ClassVar[Self]
eUndoOperationNotAvailable: ClassVar[Self]
eUndoNoGroupBegin: ClassVar[Self]
eHatchTooDense: ClassVar[Self]
eOpenFileCancelled: ClassVar[Self]
eNotHandled: ClassVar[Self]
eMakeMeProxyAndResurrect: ClassVar[Self]
eFileSharingViolation: ClassVar[Self]
eUnsupportedFileFormat: ClassVar[Self]
eObsoleteFileFormat: ClassVar[Self]
eFileMissingSections: ClassVar[Self]
eRepeatedDwgRead: ClassVar[Self]
eSilentOpenFileCancelled: ClassVar[Self]
eWrongCellType: ClassVar[Self]
eCannotChangeColumnType: ClassVar[Self]
eRowsMustMatchColumns: ClassVar[Self]
eNullNodeId: ClassVar[Self]
eNoNodeActive: ClassVar[Self]
eGraphContainsProxies: ClassVar[Self]
eDwgShareDemandLoad: ClassVar[Self]
eDwgShareReadAccess: ClassVar[Self]
eDwgShareWriteAccess: ClassVar[Self]
eLoadFailed: ClassVar[Self]
eDeviceNotFound: ClassVar[Self]
eNoCurrentConfig: ClassVar[Self]
eNullPtr: ClassVar[Self]
eNoLayout: ClassVar[Self]
eIncompatiblePlotSettings: ClassVar[Self]
eNonePlotDevice: ClassVar[Self]
eNoMatchingMedia: ClassVar[Self]
eInvalidView: ClassVar[Self]
eInvalidWindowArea: ClassVar[Self]
eInvalidPlotArea: ClassVar[Self]
eCustomSizeNotPossible: ClassVar[Self]
ePageCancelled: ClassVar[Self]
ePlotCancelled: ClassVar[Self]
eInvalidEngineState: ClassVar[Self]
ePlotAlreadyStarted: ClassVar[Self]
eNoErrorHandler: ClassVar[Self]
eInvalidPlotInfo: ClassVar[Self]
eNumberOfCopiesNotSupported: ClassVar[Self]
eLayoutNotCurrent: ClassVar[Self]
eGraphicsNotGenerated: ClassVar[Self]
eCannotPlotToFile: ClassVar[Self]
eMustPlotToFile: ClassVar[Self]
eNotMultiPageCapable: ClassVar[Self]
eBackgroundPlotInProgress: ClassVar[Self]
eNotShownInPropertyPalette: ClassVar[Self]
eSubSelectionSetEmpty: ClassVar[Self]
eNoIntersections: ClassVar[Self]
eEmbeddedIntersections: ClassVar[Self]
eNoOverride: ClassVar[Self]
eNoStoredOverrides: ClassVar[Self]
eUnableToRetrieveOverrides: ClassVar[Self]
eUnableToStoreOverrides: ClassVar[Self]
eUnableToRemoveOverrides: ClassVar[Self]
eNoStoredReconcileStatus: ClassVar[Self]
eUnableToStoreReconcileStatus: ClassVar[Self]
eInvalidObjectId: ClassVar[Self]
eInvalidXrefObjectId: ClassVar[Self]
eNoViewAssociation: ClassVar[Self]
eNoLabelBlock: ClassVar[Self]
eUnableToSetViewAssociation: ClassVar[Self]
eUnableToGetViewAssociation: ClassVar[Self]
eUnableToSetLabelBlock: ClassVar[Self]
eUnableToGetLabelBlock: ClassVar[Self]
eUnableToRemoveAssociation: ClassVar[Self]
eUnableToSyncModelView: ClassVar[Self]
eDataLinkAdapterNotFound: ClassVar[Self]
eDataLinkInvalidAdapterId: ClassVar[Self]
eDataLinkNotFound: ClassVar[Self]
eDataLinkBadConnectionString: ClassVar[Self]
eDataLinkNotUpdatedYet: ClassVar[Self]
eDataLinkSourceNotFound: ClassVar[Self]
eDataLinkConnectionFailed: ClassVar[Self]
eDataLinkSourceUpdateNotAllowed: ClassVar[Self]
eDataLinkSourceIsWriteProtected: ClassVar[Self]
eDataLinkExcelNotFound: ClassVar[Self]
eDataLinkOtherError: ClassVar[Self]
eXrefReloaded: ClassVar[Self]
eXrefReloadImpossibleAtThisTime: ClassVar[Self]
eSecInitializationFailure: ClassVar[Self]
eSecErrorReadingFile: ClassVar[Self]
eSecErrorWritingFile: ClassVar[Self]
eSecInvalidDigitalID: ClassVar[Self]
eSecErrorGeneratingTimestamp: ClassVar[Self]
eSecErrorComputingSignature: ClassVar[Self]
eSecErrorWritingSignature: ClassVar[Self]
eSecErrorEncryptingData: ClassVar[Self]
eSecErrorCipherNotSupported: ClassVar[Self]
eSecErrorDecryptingData: ClassVar[Self]
eNoAcDbHostApplication: ClassVar[Self]
eNoUnderlayHost: ClassVar[Self]
ePCUnknown: ClassVar[Self]
ePCLargeData: ClassVar[Self]
ePCUnknownFileType: ClassVar[Self]
ePCFileNotFound: ClassVar[Self]
ePCFileNotCreated: ClassVar[Self]
ePCFileNotOpened: ClassVar[Self]
ePCFileNotClosed: ClassVar[Self]
ePCFileNotWritten: ClassVar[Self]
ePCFileWrongFormat: ClassVar[Self]
ePCFileDataSelectorInvalid: ClassVar[Self]
ePCCoordSysReprojectFail: ClassVar[Self]
ePCDiskSpaceTooSmall: ClassVar[Self]
ePCThreadTerminated: ClassVar[Self]
ePCFileNotErased: ClassVar[Self]
ePCCoordSysAssignFail: ClassVar[Self]
ePCLastImporterUnfinished: ClassVar[Self]
ePCNoEngineInfo: ClassVar[Self]
ePCInProgress: ClassVar[Self]
eInetBase: ClassVar[Self]
eInetOk: ClassVar[Self]
eInetInCache: ClassVar[Self]
eInetFileNotFound: ClassVar[Self]
eInetBadPath: ClassVar[Self]
eInetTooManyOpenFiles: ClassVar[Self]
eInetFileAccessDenied: ClassVar[Self]
eInetInvalidFileHandle: ClassVar[Self]
eInetDirectoryFull: ClassVar[Self]
eInetHardwareError: ClassVar[Self]
eInetSharingViolation: ClassVar[Self]
eInetDiskFull: ClassVar[Self]
eInetFileGenericError: ClassVar[Self]
eInetValidURL: ClassVar[Self]
eInetNotAnURL: ClassVar[Self]
eInetNoWinInet: ClassVar[Self]
eInetOldWinInet: ClassVar[Self]
eInetNoAcadInet: ClassVar[Self]
eInetNotImplemented: ClassVar[Self]
eInetProtocolNotSupported: ClassVar[Self]
eInetCreateInternetSessionFailed: ClassVar[Self]
eInetInternetSessionConnectFailed: ClassVar[Self]
eInetInternetSessionOpenFailed: ClassVar[Self]
eInetInvalidAccessType: ClassVar[Self]
eInetFileOpenFailed: ClassVar[Self]
eInetHttpOpenRequestFailed: ClassVar[Self]
eInetUserCancelledTransfer: ClassVar[Self]
eInetHttpBadRequest: ClassVar[Self]
eInetHttpAccessDenied: ClassVar[Self]
eInetHttpPaymentRequired: ClassVar[Self]
eInetHttpRequestForbidden: ClassVar[Self]
eInetHttpObjectNotFound: ClassVar[Self]
eInetHttpBadMethod: ClassVar[Self]
eInetHttpNoAcceptableResponse: ClassVar[Self]
eInetHttpProxyAuthorizationRequired: ClassVar[Self]
eInetHttpTimedOut: ClassVar[Self]
eInetHttpConflict: ClassVar[Self]
eInetHttpResourceGone: ClassVar[Self]
eInetHttpLengthRequired: ClassVar[Self]
eInetHttpPreconditionFailure: ClassVar[Self]
eInetHttpRequestTooLarge: ClassVar[Self]
eInetHttpUriTooLong: ClassVar[Self]
eInetHttpUnsupportedMedia: ClassVar[Self]
eInetHttpServerError: ClassVar[Self]
eInetHttpNotSupported: ClassVar[Self]
eInetHttpBadGateway: ClassVar[Self]
eInetHttpServiceUnavailable: ClassVar[Self]
eInetHttpGatewayTimeout: ClassVar[Self]
eInetHttpVersionNotSupported: ClassVar[Self]
eInetInternetError: ClassVar[Self]
eInetGenericException: ClassVar[Self]
eInetUnknownError: ClassVar[Self]
eAlreadyActive: ClassVar[Self]
eAlreadyInactive: ClassVar[Self]
eGraphEdgeNotFound: ClassVar[Self]
eGraphNodeNotFound: ClassVar[Self]
eGraphNodeAlreadyExists: ClassVar[Self]
eGraphEdgeAlreadyExists: ClassVar[Self]
eGraphCyclesFound: ClassVar[Self]
eAlreadyHasRepresentation: ClassVar[Self]
eNoRepresentation: ClassVar[Self]
eFailedToSetEdgeChamfers: ClassVar[Self]
eNoConnectedBlendSet: ClassVar[Self]
eFailedToBlend: ClassVar[Self]
eFailedToSetEdgeRounds: ClassVar[Self]
eFailedToSetVertexRounds: ClassVar[Self]
eVSNotFound: ClassVar[Self]
eVSTrue: ClassVar[Self]
eVSFalse: ClassVar[Self]
eVSAlreadyExists: ClassVar[Self]
eVSOneOffCreated: ClassVar[Self]
eVSAPIOnlyValues: ClassVar[Self]
eVSIsInUse: ClassVar[Self]
eVSIsAcadDefault: ClassVar[Self]
eEmptyOperand: ClassVar[Self]
eNoEntitiesFromPersistentIds: ClassVar[Self]
eFailedCurveCheck: ClassVar[Self]
eMaxNodes: ClassVar[Self]
eFailedToEvaluate: ClassVar[Self]
eFailedToEvaluateDependents: ClassVar[Self]
eInvalidExpression: ClassVar[Self]
eCyclicDependency: ClassVar[Self]
eInconsistentConstraint: ClassVar[Self]
eOverDefinedConstraint: ClassVar[Self]
eAllInSameRigidSet: ClassVar[Self]
eInvalidParameterName: ClassVar[Self]
eReferencedInEquation: ClassVar[Self]
eEntityRestricedInDOF: ClassVar[Self]
eDataTooLarge: ClassVar[Self]
eNearSizeLimit: ClassVar[Self]
eStringNotAllowedInExpression: ClassVar[Self]
eTooManyActiveCommands: ClassVar[Self]
eUnableToTrimLastPiece: ClassVar[Self]
eUnableToTrimSurface: ClassVar[Self]
eModifyingAssociativeEntity: ClassVar[Self]
eModifyingDimensionWithExpression: ClassVar[Self]
eDependentOnObjectErased: ClassVar[Self]
eSelfIntersecting: ClassVar[Self]
eNotOnBoundary: ClassVar[Self]
eNotConnected: ClassVar[Self]
eNoInputPath: ClassVar[Self]
eNotAssociative: ClassVar[Self]
eNotG1Continuous: ClassVar[Self]
eOwnerToBeTransformed: ClassVar[Self]
eMustBeInteger: ClassVar[Self]
eMustBePositiveInteger: ClassVar[Self]
eChangedAgainstAssociativity: ClassVar[Self]
eItemCountChanged: ClassVar[Self]
eGetAdIntImgServicesFailed: ClassVar[Self]
eReadImageBufferFailed: ClassVar[Self]
eWriteImageBufferFailed: ClassVar[Self]
eGetImageBytesFailed: ClassVar[Self]
eGetImageDIBFailed: ClassVar[Self]
eConvertImageFormatFailed: ClassVar[Self]
eGetPreviewImageFailed: ClassVar[Self]
eInvalidPreviewImage: ClassVar[Self]
eDelayMore: ClassVar[Self]
ePreviewFailed: ClassVar[Self]
eAbortPreview: ClassVar[Self]
eEndPreview: ClassVar[Self]
eNoPreviewContext: ClassVar[Self]
eFileNotInCloud: ClassVar[Self]
class ErrorStatusException Class
code: PyDb.ErrorStatus
message: str
fullmessage: str
class EvalVariant Class
def __ge__(self) -> bool:
def __gt__(self) -> bool:
def __init__(self) -> None:
This class provides a lightweight wrapper for a resbuf structure. It provides typed
constructors and overloaded assignment operators to facilitiate assigning values to the
underlying data. AcDbEvalExpr objects return instances of this class for the result of the
expressions. The class manages the copying of strings by calling acutNewString() to copy
strings. Linked lists of resbufs are not directly supported, but if an AcDbEvalVariant
contains a linked resbuf chain the destructor frees the entire chain using acutRelRb().
def __init__(self, bval: bool) -> None:
This class provides a lightweight wrapper for a resbuf structure. It provides typed
constructors and overloaded assignment operators to facilitiate assigning values to the
underlying data. AcDbEvalExpr objects return instances of this class for the result of the
expressions. The class manages the copying of strings by calling acutNewString() to copy
strings. Linked lists of resbufs are not directly supported, but if an AcDbEvalVariant
contains a linked resbuf chain the destructor frees the entire chain using acutRelRb().
def __init__(self, ival: int) -> None:
This class provides a lightweight wrapper for a resbuf structure. It provides typed
constructors and overloaded assignment operators to facilitiate assigning values to the
underlying data. AcDbEvalExpr objects return instances of this class for the result of the
expressions. The class manages the copying of strings by calling acutNewString() to copy
strings. Linked lists of resbufs are not directly supported, but if an AcDbEvalVariant
contains a linked resbuf chain the destructor frees the entire chain using acutRelRb().
def __init__(self, ival: int, isInt16: bool) -> None:
This class provides a lightweight wrapper for a resbuf structure. It provides typed
constructors and overloaded assignment operators to facilitiate assigning values to the
underlying data. AcDbEvalExpr objects return instances of this class for the result of the
expressions. The class manages the copying of strings by calling acutNewString() to copy
strings. Linked lists of resbufs are not directly supported, but if an AcDbEvalVariant
contains a linked resbuf chain the destructor frees the entire chain using acutRelRb().
def __init__(self, fval: float) -> None:
This class provides a lightweight wrapper for a resbuf structure. It provides typed
constructors and overloaded assignment operators to facilitiate assigning values to the
underlying data. AcDbEvalExpr objects return instances of this class for the result of the
expressions. The class manages the copying of strings by calling acutNewString() to copy
strings. Linked lists of resbufs are not directly supported, but if an AcDbEvalVariant
contains a linked resbuf chain the destructor frees the entire chain using acutRelRb().
def __init__(self, sval: str) -> None:
This class provides a lightweight wrapper for a resbuf structure. It provides typed
constructors and overloaded assignment operators to facilitiate assigning values to the
underlying data. AcDbEvalExpr objects return instances of this class for the result of the
expressions. The class manages the copying of strings by calling acutNewString() to copy
strings. Linked lists of resbufs are not directly supported, but if an AcDbEvalVariant
contains a linked resbuf chain the destructor frees the entire chain using acutRelRb().
def __init__(self, idval: PyDb.ObjectId) -> None:
This class provides a lightweight wrapper for a resbuf structure. It provides typed
constructors and overloaded assignment operators to facilitiate assigning values to the
underlying data. AcDbEvalExpr objects return instances of this class for the result of the
expressions. The class manages the copying of strings by calling acutNewString() to copy
strings. Linked lists of resbufs are not directly supported, but if an AcDbEvalVariant
contains a linked resbuf chain the destructor frees the entire chain using acutRelRb().
def __init__(self, pnt2dval: PyGe.Point2d) -> None:
This class provides a lightweight wrapper for a resbuf structure. It provides typed
constructors and overloaded assignment operators to facilitiate assigning values to the
underlying data. AcDbEvalExpr objects return instances of this class for the result of the
expressions. The class manages the copying of strings by calling acutNewString() to copy
strings. Linked lists of resbufs are not directly supported, but if an AcDbEvalVariant
contains a linked resbuf chain the destructor frees the entire chain using acutRelRb().
def __init__(self, pnt3dval: PyGe.Point3d) -> None:
This class provides a lightweight wrapper for a resbuf structure. It provides typed
constructors and overloaded assignment operators to facilitiate assigning values to the
underlying data. AcDbEvalExpr objects return instances of this class for the result of the
expressions. The class manages the copying of strings by calling acutNewString() to copy
strings. Linked lists of resbufs are not directly supported, but if an AcDbEvalVariant
contains a linked resbuf chain the destructor frees the entire chain using acutRelRb().
def __init__(*args) -> None:
This class provides a lightweight wrapper for a resbuf structure. It provides typed
constructors and overloaded assignment operators to facilitiate assigning values to the
underlying data. AcDbEvalExpr objects return instances of this class for the result of the
expressions. The class manages the copying of strings by calling acutNewString() to copy
strings. Linked lists of resbufs are not directly supported, but if an AcDbEvalVariant
contains a linked resbuf chain the destructor frees the entire chain using acutRelRb().
def __le__(self) -> bool:
def __lt__(self) -> bool:
def __ne__(self) -> bool:
def __reduce__(self) -> Any:
def className() -> str:
def clear(self) -> None:
Clears the contents of the AcDbEvalVariant and frees any allocated memory, including resbuf
chains descending from this AcDbEvalVariant. Changes the AcDbEvalVariant::restype to
AcDbEvalVariant::kNone.
def copyFrom(self, otherObject: PyRx.RxObject) -> None:
def desc() -> PyRx.RxClass:
Returns a pointer to the AcRxClass object representing the specific class, or most recent
parent class explicitly registered with ObjectARX of either the pointer type used to invoke
it or the class qualifier used with it. (Remember that when a static member function is
invoked via a pointer, the pointer type, not the object type, determines which
implementation of the function is invoked.) When working with a pointer to an object and
the proper AcRxClass object for the class of the object pointed to is desired, the
AcRxObject::isA() function should be used, since it is a virtual non-static method and is
therefore not pointer type dependent. Caching the value of the pointer returned by this
method is acceptable, provided the application knows that the AcRxClass object pointed to
by the returned pointer was created by an ObjectARX application that will not be unloaded.
def getDouble(self) -> float:
def getInt16(self) -> int:
def getInt32(self) -> int:
def getObjectId(self) -> ObjectId:
def getPoint2d(self) -> PyGe.Point2d:
def getPoint3d(self) -> PyGe.Point3d:
def getRbType(self) -> int:
def getString(self) -> str:
def getType(self) -> DwgDataType:
def setDouble(self, code: PyDb.DxfCode, val: float) -> None:
def setInt16(self, code: PyDb.DxfCode, val: int) -> None:
def setInt32(self, code: PyDb.DxfCode, val: int) -> None:
def setObjectId(self, code: PyDb.DxfCode, id: PyDb.ObjectId) -> None:
def setPoint2d(self, code: PyDb.DxfCode, pt: PyGe.Point2d) -> None:
def setPoint3d(self, code: PyDb.DxfCode, pt: PyGe.Point3d) -> None:
def setString(self, code: PyDb.DxfCode, val: str) -> None:
def toString(self) -> str:
class Extents Class
def __init__(self) -> None:
def __init__(self, min: PyGe.Point3d, max: PyGe.Point3d) -> None:
def __init__(*args) -> None:
def __reduce__(self) -> Any:
def addBlockExt(self, btr: PyDb.BlockTableRecord) -> None:
Compute the minimum box that encloses all of the entities in the block pointed to by pBTR
and the box already defined by this object. If any internal operation returns a status
other than Acad::eOk, the operation terminates and returns that status. On success return
Acad::eOk.
def addExt(self, extents: PyDb.Extents) -> None:
Expand the box defined by this object to also enclose the box defined by src.
def addPoint(self, pt: PyGe.Point3d) -> None:
Expand this box to also enclose the point pt.
def addPoints(self, pts: list[PyGe.Point3d]) -> None:
Expand this box to also enclose the point pt.
def contains(self, val: PyDb.Extents | PyGe.Point3d) -> bool:
def coords(self) -> tuple[float, ...]:
def expandBy(self, vec: PyGe.Vector3d) -> None:
Expand this box by the amount in the vector. This could be used for objects with a constant
thickness, for example. You would accumulate the basic box by iterating through the
object's points calling addPoint(), then you would make a single expandBy() call to expand
that box by the thickness amount.
def intersectsWith(self, other: PyDb.Extents | PyGe.LinearEnt3d) -> bool:
def maxPoint(self) -> PyGe.Point3d:
Return the point of the Extents box that has the smallest X, Y, & Z coordinate values.
def midPoint(self) -> PyGe.Point3d:
def minPoint(self) -> PyGe.Point3d:
Return the point of the Extents box that has the largest X, Y, & Z coordinate values.
def set(self, min: PyGe.Point3d, max: PyGe.Point3d) -> ErrorStatus:
Set minPoint to min and maxPoint to max if each of the X, Y, and Z values of min are less
than or equal to the corresponding values of max. If not, do nothing and return
Acad::eInvalidInput. Returns Acad::eOk if successful.
def transformBy(self, xform: PyGe.Matrix3d) -> None:
Transform the eight corners of the current box by this matrix and compute the box that
encloses the current box and those points.
class Extents2d Class
def __init__(self) -> None:
def __init__(self, min: PyGe.Point2d, max: PyGe.Point2d) -> None:
def __init__(*args) -> None:
def __reduce__(self) -> Any:
def addExt(self, ex: PyDb.Extents2d) -> None:
Expand this object's extents rectangle to also enclose src's extents rectangle.
def addPoint(self, pt: PyGe.Point2d) -> None:
Updates the extents to include point.
def addPoints(self, pts: list[PyGe.Point2d]) -> None:
Updates the extents to include point.
def contains(self, val: PyDb.Extents2d | PyGe.Point2d) -> bool:
def coords(self) -> tuple[float, ...]:
def expandBy(self, vector: PyGe.Vector2d) -> None:
This method expands the extents by vec. This is essentially like adding vec to copies of
the min and max extents points and then adding the resulting points to the extents.
def intersectsWith(self, ex: PyDb.Extents2d | PyGe.LinearEnt2d) -> bool:
def maxPoint(self) -> PyGe.Point2d:
Returns the maximum extent point.
def midPoint(self) -> PyGe.Point2d:
def minPoint(self) -> PyGe.Point2d:
Returns the minimum extent point.
def set(self, min: PyGe.Point2d, max: PyGe.Point2d) -> ErrorStatus:
Sets the minimum extent to min and the maximum extent to max.
def transformBy(self, xform: PyGe.Matrix2d) -> None:
Transform the four corners of the current extents rectangle by mat and compute the
rectangle that encloses the current extents and the transformed corner points.
class ExtrudedSurface Class
def __init__(self, id: PyDb.ObjectId, mode: PyDb.OpenMode, erased: bool) -> None:
def __reduce__(self) -> Any:
def cast(otherObject: PyRx.RxObject) -> ExtrudedSurface:
def className() -> str:
def cloneFrom(otherObject: PyRx.RxObject) -> ExtrudedSurface:
def desc() -> PyRx.RxClass:
Returns a pointer to the AcRxClass object representing the specific class, or most recent
parent class explicitly registered with ObjectARX of either the pointer type used to invoke
it or the class qualifier used with it. (Remember that when a static member function is
invoked via a pointer, the pointer type, not the object type, determines which
implementation of the function is invoked.) When working with a pointer to an object and
the proper AcRxClass object for the class of the object pointed to is desired, the
AcRxObject::isA() function should be used, since it is a virtual non-static method and is
therefore not pointer type dependent. Caching the value of the pointer returned by this
method is acceptable, provided the application knows that the AcRxClass object pointed to
by the returned pointer was created by an ObjectARX application that will not be unloaded.
class Face Class
def __init__(self) -> None:
The AcDbFace class represents the 3dface entity within AutoCAD.
def __init__(self, pt0: PyGe.Point3d, pt1: PyGe.Point3d, pt2: PyGe.Point3d) -> None:
The AcDbFace class represents the 3dface entity within AutoCAD.
def __init__(self, pt0: PyGe.Point3d, pt1: PyGe.Point3d, pt2: PyGe.Point3d, pt3: PyGe.Point3d) -> None:
The AcDbFace class represents the 3dface entity within AutoCAD.
def __init__(self, pt0: PyGe.Point3d, pt1: PyGe.Point3d, pt2: PyGe.Point3d, e0vis: bool, e1vis: bool, e2vis: bool, e3vis: bool, e4vis: bool) -> None:
The AcDbFace class represents the 3dface entity within AutoCAD.
def __init__(self, pt0: PyGe.Point3d, pt1: PyGe.Point3d, pt2: PyGe.Point3d, pt3: PyGe.Point3d, e0vis: bool, e1vis: bool, e2vis: bool, e3vis: bool, e4vis: bool) -> None:
The AcDbFace class represents the 3dface entity within AutoCAD.
def __init__(self, id: PyDb.ObjectId) -> None:
The AcDbFace class represents the 3dface entity within AutoCAD.
def __init__(self, id: PyDb.ObjectId, mode: PyDb.OpenMode) -> None:
The AcDbFace class represents the 3dface entity within AutoCAD.
def __init__(self, id: PyDb.ObjectId, mode: PyDb.OpenMode, erased: bool) -> None:
The AcDbFace class represents the 3dface entity within AutoCAD.
def __init__(*args) -> None:
The AcDbFace class represents the 3dface entity within AutoCAD.
def __reduce__(self) -> Any:
def cast(otherObject: PyRx.RxObject) -> Face:
def className() -> str:
def cloneFrom(otherObject: PyRx.RxObject) -> Face:
def desc() -> PyRx.RxClass:
Returns a pointer to the AcRxClass object representing the specific class, or most recent
parent class explicitly registered with ObjectARX of either the pointer type used to invoke
it or the class qualifier used with it. (Remember that when a static member function is
invoked via a pointer, the pointer type, not the object type, determines which
implementation of the function is invoked.) When working with a pointer to an object and
the proper AcRxClass object for the class of the object pointed to is desired, the
AcRxObject::isA() function should be used, since it is a virtual non-static method and is
therefore not pointer type dependent. Caching the value of the pointer returned by this
method is acceptable, provided the application knows that the AcRxClass object pointed to
by the returned pointer was created by an ObjectARX application that will not be unloaded.
def getVertexAt(self, vIndex: int) -> PyGe.Point3d:
This function uses the position argument to return the WCS value of the vertex specified by
vertexIndex. If successful, then Acad::eOk is returned. If vertexIndex is greater than 3,
then Acad::eInvalidIndex is returned. The vertex positions are used for DXF group codes 10
through 13.
def isEdgeVisibleAt(self, vIndex: int) -> bool:
This function uses the visibility argument to return the visibility value for the edge that
starts with the vertex specified by vertexIndex. A visibility value of Adesk::kTrue
indicates that the edge is visible. A value of Adesk::kFalse indicates the edge is
invisible. If successful then Acad::eOk is returned. If vertexIndex greater than 3, then
Acad::eInvalidIndex is returned. Edge visibility values are used for DXF group code 70 (bit
1 is for the first edge, bit 2 is for the second edge, etc. A set bit indicates the edge is
invisible).
def makeEdgeInvisibleAt(self, vIndex: int) -> None:
This function sets the edge that starts at the vertex specified by vertexIndex to be
invisible. If successful then Acad::eOk is returned. If vertexIndex greater than 3, then
Acad::eInvalidIndex is returned.
def makeEdgeVisibleAt(self, vIndex: int) -> None:
This function sets the edge that starts at the vertex specified by vertexIndex to be
visible. If successful then Acad::eOk is returned. If vertexIndex greater than 3, then
Acad::eInvalidIndex is returned.
def setVertexAt(self, vIndex: int, pnt: PyGe.Point3d) -> None:
This function sets the vertex specified by vertexIndex to use the position value position,
which must be in WCS coordinates. If successful then Acad::eOk is returned. If vertexIndex
greater than 3, then Acad::eInvalidIndex is returned. The vertex positions are used for DXF
group codes 10 through13.
class FaceRecord Class
def __init__(self) -> None:
The AcDbFaceRecord class is a special class of vertex that is used by the AcDbPolyFaceMesh
class to group together mesh point vertices that represent faces in the mesh. Each
AcDbFaceRecord stores the vertex indices of the vertices that are the face's corner points
and the visibility information for the edges determined by the vertices.
def __init__(self, vtx0: int, vtx1: int, vtx2: int, vtx3: int) -> None:
The AcDbFaceRecord class is a special class of vertex that is used by the AcDbPolyFaceMesh
class to group together mesh point vertices that represent faces in the mesh. Each
AcDbFaceRecord stores the vertex indices of the vertices that are the face's corner points
and the visibility information for the edges determined by the vertices.
def __init__(self, id: PyDb.ObjectId) -> None:
The AcDbFaceRecord class is a special class of vertex that is used by the AcDbPolyFaceMesh
class to group together mesh point vertices that represent faces in the mesh. Each
AcDbFaceRecord stores the vertex indices of the vertices that are the face's corner points
and the visibility information for the edges determined by the vertices.
def __init__(self, id: PyDb.ObjectId, mode: PyDb.OpenMode) -> None:
The AcDbFaceRecord class is a special class of vertex that is used by the AcDbPolyFaceMesh
class to group together mesh point vertices that represent faces in the mesh. Each
AcDbFaceRecord stores the vertex indices of the vertices that are the face's corner points
and the visibility information for the edges determined by the vertices.
def __init__(self, id: PyDb.ObjectId, mode: PyDb.OpenMode, erased: bool) -> None:
The AcDbFaceRecord class is a special class of vertex that is used by the AcDbPolyFaceMesh
class to group together mesh point vertices that represent faces in the mesh. Each
AcDbFaceRecord stores the vertex indices of the vertices that are the face's corner points
and the visibility information for the edges determined by the vertices.
def __init__(*args) -> None:
The AcDbFaceRecord class is a special class of vertex that is used by the AcDbPolyFaceMesh
class to group together mesh point vertices that represent faces in the mesh. Each
AcDbFaceRecord stores the vertex indices of the vertices that are the face's corner points
and the visibility information for the edges determined by the vertices.
def __reduce__(self) -> Any:
def cast(otherObject: PyRx.RxObject) -> FaceRecord:
def className() -> str:
def cloneFrom(otherObject: PyRx.RxObject) -> FaceRecord:
def desc() -> PyRx.RxClass:
Returns a pointer to the AcRxClass object representing the specific class, or most recent
parent class explicitly registered with ObjectARX of either the pointer type used to invoke
it or the class qualifier used with it. (Remember that when a static member function is
invoked via a pointer, the pointer type, not the object type, determines which
implementation of the function is invoked.) When working with a pointer to an object and
the proper AcRxClass object for the class of the object pointed to is desired, the
AcRxObject::isA() function should be used, since it is a virtual non-static method and is
therefore not pointer type dependent. Caching the value of the pointer returned by this
method is acceptable, provided the application knows that the AcRxClass object pointed to
by the returned pointer was created by an ObjectARX application that will not be unloaded.
def getVertexAt(self, val: int) -> int:
This function uses the vtxIdx argument to return the index number of the PolyFaceMesh
vertex used as the faceIdx corner of the face. Face corner indices start with 0, so faceIdx
must be 0, 1, 2, or 3. PolyFaceMesh vertex indices start with 1, and will be negative if
the edge is invisible or positive if the edge is visible. Returns Acad::eOk if successful.
If faceIdx greater than 3, then Acad::eInvalidFaceVertexIndex is returned. The vertex
indices are used for DXF group codes 71-74 (71 for faceIdx == 1, 72 for faceIdx == 2,
etc.).
def isEdgeVisibleAt(self, val: int) -> bool:
This function uses the visible argument to return the visibility value for the edge that
starts with the face corner specified by faceIndex. A visibility value of Adesk::kTrue
indicates that the edge is visible. A value of Adesk::kFalse indicates the edge is
invisible. Face corner indices start with 0, so faceIndex must be 0, 1, 2, or 3. If
successful, then Acad::eOk is returned. If faceIndex greater than 3, then
Acad::eInvalidFaceVertexIndex is returned. Edge visibility values are used for determining
whether the values in DXF group codes 71 - 74 are positive or negative. If the group code's
data value is positive, then the edge starting at that vertex will be visible. If the data
value is negative, then the edge will be invisible.
def makeEdgeInvisibleAt(self, val: int) -> None:
This function sets the edge that starts at the corner specified by faceIndex to be
invisible. Face corner indices start with 0, so faceIndex must be 0, 1, 2, or 3. If
successful, then Acad::eOk is returned. If faceIndex greater than 3, then
Acad::eInvalidFaceVertexIndex is returned. Setting an edge invisible will set the
corresponding DXF group codes 71 - 74 to be negative (faceIndex == 1 sets group code 71 to
be negative, faceIndex == 2 sets group code 72, etc.).
def makeEdgeVisibleAt(self, val: int) -> None:
This function sets the edge that starts at the corner specified by faceIndex to be visible.
Face corner indices start with 0, so faceIndex must be 0, 1, 2, or 3. If successful, then
Acad::eOk is returned. If faceIndex greater than 3, then Acad::eInvalidFaceVertexIndex is
returned. Setting an edge invisible will set the corresponding DXF group codes 71 - 74 to
be positive (faceIndex == 1 sets group code 71 to be positive, faceIndex == 2 sets group
code 72, etc.).
def setVertexAt(self, val: int, idx: int) -> None:
This function sets the FaceRecord so that the PolyFaceMesh vertex list index number vtxIdx
is used as the vertex index for the faceIdx corner of the face. Face corner indices start
with 0, so faceIdx must be 0, 1, 2, or 3. PolyFaceMesh vertex indices start with 1, so
vtxIdx must be greater than or equal to 1. If successful, then Acad::eOk is returned. If
faceIdx greater than 3, then Acad::eInvalidFaceVertexIndex is returned. The vertex indices
are used for DXF group codes 71-74 (71 for faceIdx == 1, 72 for faceIdx == 2, etc.).
class Fcf Class
def __init__(self) -> None:
The AcDbFcf class represents Feature Control Frames for Geometric Dimensioning and
Tolerancing. It is the entity type created by the TOLERANCE command in the AutoCAD command
editor. Tolerances are considered as dimensions in AutoCAD, which means they are controlled
by dimension variable settings and dimension styles. Within objects of this class, the text
string data member contains symbol and format codes that are used to define the actual
graphical representation that will be seen within AutoCAD. For more information on these
control codes, see the AcDbFcf::setText() member function description.
def __init__(self, val: str, pnt: PyGe.Point3d, normal: PyGe.Vector3d, direction: PyGe.Vector3d) -> None:
The AcDbFcf class represents Feature Control Frames for Geometric Dimensioning and
Tolerancing. It is the entity type created by the TOLERANCE command in the AutoCAD command
editor. Tolerances are considered as dimensions in AutoCAD, which means they are controlled
by dimension variable settings and dimension styles. Within objects of this class, the text
string data member contains symbol and format codes that are used to define the actual
graphical representation that will be seen within AutoCAD. For more information on these
control codes, see the AcDbFcf::setText() member function description.
def __init__(self, id: PyDb.ObjectId) -> None:
The AcDbFcf class represents Feature Control Frames for Geometric Dimensioning and
Tolerancing. It is the entity type created by the TOLERANCE command in the AutoCAD command
editor. Tolerances are considered as dimensions in AutoCAD, which means they are controlled
by dimension variable settings and dimension styles. Within objects of this class, the text
string data member contains symbol and format codes that are used to define the actual
graphical representation that will be seen within AutoCAD. For more information on these
control codes, see the AcDbFcf::setText() member function description.
def __init__(self, id: PyDb.ObjectId, mode: PyDb.OpenMode) -> None:
The AcDbFcf class represents Feature Control Frames for Geometric Dimensioning and
Tolerancing. It is the entity type created by the TOLERANCE command in the AutoCAD command
editor. Tolerances are considered as dimensions in AutoCAD, which means they are controlled
by dimension variable settings and dimension styles. Within objects of this class, the text
string data member contains symbol and format codes that are used to define the actual
graphical representation that will be seen within AutoCAD. For more information on these
control codes, see the AcDbFcf::setText() member function description.
def __init__(self, id: PyDb.ObjectId, mode: PyDb.OpenMode, erased: bool) -> None:
The AcDbFcf class represents Feature Control Frames for Geometric Dimensioning and
Tolerancing. It is the entity type created by the TOLERANCE command in the AutoCAD command
editor. Tolerances are considered as dimensions in AutoCAD, which means they are controlled
by dimension variable settings and dimension styles. Within objects of this class, the text
string data member contains symbol and format codes that are used to define the actual
graphical representation that will be seen within AutoCAD. For more information on these
control codes, see the AcDbFcf::setText() member function description.
def __init__(*args) -> None:
The AcDbFcf class represents Feature Control Frames for Geometric Dimensioning and
Tolerancing. It is the entity type created by the TOLERANCE command in the AutoCAD command
editor. Tolerances are considered as dimensions in AutoCAD, which means they are controlled
by dimension variable settings and dimension styles. Within objects of this class, the text
string data member contains symbol and format codes that are used to define the actual
graphical representation that will be seen within AutoCAD. For more information on these
control codes, see the AcDbFcf::setText() member function description.
def __reduce__(self) -> Any:
def cast(otherObject: PyRx.RxObject) -> Fcf:
def className() -> str:
def cloneFrom(otherObject: PyRx.RxObject) -> Fcf:
def desc() -> PyRx.RxClass:
Returns a pointer to the AcRxClass object representing the specific class, or most recent
parent class explicitly registered with ObjectARX of either the pointer type used to invoke
it or the class qualifier used with it. (Remember that when a static member function is
invoked via a pointer, the pointer type, not the object type, determines which
implementation of the function is invoked.) When working with a pointer to an object and
the proper AcRxClass object for the class of the object pointed to is desired, the
AcRxObject::isA() function should be used, since it is a virtual non-static method and is
therefore not pointer type dependent. Caching the value of the pointer returned by this
method is acceptable, provided the application knows that the AcRxClass object pointed to
by the returned pointer was created by an ObjectARX application that will not be unloaded.
def dimclrd(self) -> Color:
This function returns the current DIMCLRD value for the feature control frame. If the value
is overridden for this dimension, then that value is returned, otherwise the function will
return the value from this dimension's dimension style. See the System Variables section of
the AutoCAD Command Reference manual for information on DIMCLRD.
def dimclrt(self) -> Color:
This function returns the current DIMCLRT value for the feature control frame. If the value
is overridden for this dimension, then that value is returned, otherwise the function will
return the value from this dimension's dimension style. See the System Variables section of
the AutoCAD Command Reference manual for information on DIMCLRT.
def dimensionStyle(self) -> HardPointerId:
Returns the objectId of the object's DimensionStyle.
def dimgap(self) -> float:
This function returns the current DIMGAP value for the feature control frame. If the value
is overridden for this feature control frame, then that value is returned; otherwise, this
function returns the value from this feature control frame's dimension style. See the
System Variables section of the AutoCAD Command Reference for information on DIMGAP.
def dimscale(self) -> float:
This function returns the current DIMSCALE value for the feature control frame. If the
value is overridden for this dimension, then that value is returned, otherwise the function
will return the value from this dimension's dimension style. See the System Variables
section of the AutoCAD Command Reference manual for information on DIMSCALE.
def dimtxsty(self) -> ObjectId:
This function returns the objectId of the textStyle specified by the current DIMTXSTY value
of the feature control frame. If the value is overridden for this dimension, then that
value is returned, otherwise the function will return the value from this dimension's
dimension style. See the System Variables section of the AutoCAD Command Reference manual
for information on DIMTXSTY.
def dimtxt(self) -> float:
This function returns the current DIMTXT value for the feature control frame. If the value
is overridden for this dimension, then that value is returned, otherwise the function will
return the value from this dimension's dimension style. See the System Variables section of
the AutoCAD Command Reference manual for information on DIMTXT.
def direction(self) -> PyGe.Vector3d:
Returns the X-direction vector (in WCS) for the object. The X-direction vector determines
the direction that the object goes away from its 'location' point.
def getBoundingPline(self) -> list[PyGe.Point3d]:
This function appends to ptArray all the consecutive distinct corner points of the Fcf
object. Used in order, these points could be used to define a pline that overlays the
border of the complete Fcf object. The points start with the top left corner of the Fcf
object and run clockwise around the Fcf object's boundary, with the lower left corner as
the last point.
def getBoundingPoints(self) -> list[PyGe.Point3d]:
This function sets the ptArray's logical length to 4 and then fills in those four points as
follows: ptArray[0] == top left corner of Fcf ptArray[1] == top right corner of Fcf
ptArray[2] == bottom right corner of Fcf ptArray[3] == bottom left corner of Fcf All points
are in WCS coordinates.
def getDimstyleData(self) -> DimStyleTableRecord:
This function copies the DimStyle information from the AcDbDimStyleTableRecord referenced
by this object into the AcDbDimStyleTableRecord pointed to by pRecord. After copying the
data, any dimension variable overrides currently applied to this object will be copied into
the record pointed to by pRecord. The result is that pRecord represents the effective style
settings currently in use by this object. This function returns Acad::eOk if successful.
Acad::eInvalidInput will be returned if pRecord is not a valid AcDbDimStyleTableRecord.
Acad::eInvalidDimStyle will be returned if the dimension there is an invalid dimension
style associated with this dimension. Various open codes can be returned if the associated
AcDbDimStyleTableRecord cannot be opened. Acad::eNullObjectPointer will be returned if
pRecord or the associated AcDbDimStyleTableRecord is NULL.
def location(self) -> PyGe.Point3d:
Returns the insertion point (in WCS) of the Fcf object. The 'insertion' point for an Fcf is
the middle of the left edge of its first line.
def normal(self) -> PyGe.Vector3d:
Returns the unit normal vector (in WCS) of the plane containing the Fcf object.
def setDimVars(self) -> None:
Sets the Fcf object to use the dimStyle and dim override settings currently in effect in
the database loaded in the AutoCAD editor. This method is obsolete and will not be in
future releases. Use a call to setDimensionStyle() followed by a call to setDimstyleData()
instead.
def setDimclrd(self, val: Color) -> None:
Sets the AutoCAD color index within val to be the DIMCLRD value for the feature control
frame as an override. This function returns Acad::eOk if successful. See the System
Variables section of the AutoCAD Command Reference manual for information on DIMCLRD.
def setDimclrt(self, val: Color) -> None:
Sets the AutoCAD color index within val to be the DIMCLRT value for the feature control
frame as an override. This function returns Acad::eOk if successful. See the System
Variables section of the AutoCAD Command Reference manual for information on DIMCLRT.
def setDimensionStyle(self, val: PyDb.ObjectId) -> None:
Sets the Fcf object to reference the dimension style specified by the
dimensionStyleobjectId.
def setDimgap(self, val: float) -> None:
Overrides this feature control frame's DIMGAP value with val. Returns Acad::eOk if
successful. See the System Variables section of the AutoCAD Command Reference for
information on DIMGAP.
def setDimscale(self, val: float) -> None:
Sets scale to be the DIMSCALE value for the feature control frame as an override. This
function returns Acad::eOk if successful. See the System Variables section of the AutoCAD
Command Reference manual for information on DIMSCALE.
def setDimstyleData(self, val: PyDb.DimStyleTableRecord) -> None:
This function compares the DimStyle data in the record identified by newDataId with the
data in the record referenced by the feature control frame, and applies any differences as
dimension variable overrides on the object. So, when this function is finished, the
combination of the referenced DimStyleTableRecord and the newly applied dimension variable
overrides will make the dimension display as though it were actually referencing the
DimStyleTableRecordnewDataId. The DimStyleTableRecord identified by newDataId can be in any
database currently loaded in memory. This function This function returns Acad::eOk if
successful. Acad::eInvalidInput will be returned if pRecord is not a valid
AcDbDimStyleTableRecord. Acad::eInvalidDimStyle will be returned if the dimension there is
an invalid dimension style associated with this dimension. Various open codes can be
returned if the associated AcDbDimStyleTableRecord cannot be opened.
def setDimstyleData(self, val: PyDb.ObjectId) -> None:
This function compares the DimStyle data in the record identified by newDataId with the
data in the record referenced by the feature control frame, and applies any differences as
dimension variable overrides on the object. So, when this function is finished, the
combination of the referenced DimStyleTableRecord and the newly applied dimension variable
overrides will make the dimension display as though it were actually referencing the
DimStyleTableRecordnewDataId. The DimStyleTableRecord identified by newDataId can be in any
database currently loaded in memory. This function This function returns Acad::eOk if
successful. Acad::eInvalidInput will be returned if pRecord is not a valid
AcDbDimStyleTableRecord. Acad::eInvalidDimStyle will be returned if the dimension there is
an invalid dimension style associated with this dimension. Various open codes can be
returned if the associated AcDbDimStyleTableRecord cannot be opened.
def setDimstyleData(*args) -> None:
This function compares the DimStyle data in the record identified by newDataId with the
data in the record referenced by the feature control frame, and applies any differences as
dimension variable overrides on the object. So, when this function is finished, the
combination of the referenced DimStyleTableRecord and the newly applied dimension variable
overrides will make the dimension display as though it were actually referencing the
DimStyleTableRecordnewDataId. The DimStyleTableRecord identified by newDataId can be in any
database currently loaded in memory. This function This function returns Acad::eOk if
successful. Acad::eInvalidInput will be returned if pRecord is not a valid
AcDbDimStyleTableRecord. Acad::eInvalidDimStyle will be returned if the dimension there is
an invalid dimension style associated with this dimension. Various open codes can be
returned if the associated AcDbDimStyleTableRecord cannot be opened.
def setDimtxsty(self, id: PyDb.ObjectId) -> None:
Sets the dimStyle to use the AcDbTextStyleTableRecord with val as the DIMTXSTY value. This
function returns Acad::eOk if successful. See the System Variables section of the AutoCAD
Command Reference manual for information on DIMTXSTY.
def setDimtxt(self, val: float) -> None:
Sets val to be the DIMTXT value for the feature control frame as an override. This function
returns Acad::eOk if successful. See the System Variables section of the AutoCAD Command
Reference manual for information on DIMTXT.
def setLocation(self, val: PyGe.Point3d) -> None:
Sets the object to use loc as its new location ('insertion' point). The insertion point is
the middle of the left edge of its first line. loc must be in WCS coordinates.
def setOrientation(self, normal: PyGe.Vector3d, direction: PyGe.Vector3d) -> None:
Sets norm to be the Fcf plane normal and dir to be the X-direction for the Fcf. Both values
are specified in WCS coordinates. dir must be perpendicular to norm.
def setText(self, val: str) -> None:
Sets a copy of text to be the text string used by the Fcf. This string contains the codes
to specify which feature control symbols to use as well as the actual tolerance value. Here
is a sample of an Fcf and the text string that describes it: Here's the text string
describing the Fcf above:
'{\Fgdt;j}%%v{\Fgdt;n}0.001{\Fgdt;m}%%v1.200{\Fgdt;l}%%vA{\Fgdt;s}%%vB%%vCn{\Fgdt;j}%%v{\Fgdt;n}3.2%%v%%v%%v%%vn1.5{\Fgdt;p}'The
'{\Fgdt;x}' construction switches fonts inline to use the GDT font to print one special
character. Here is a list of the GDT characters used for the Tolerance command: {\Fgdt;j}
positional symbol (circle with cross in it) {\Fgdt;r} concentricity symbol (two concentric
circles) {\Fgdt;i} symmetry symbol (like division sign) {\Fgdt;f} parallelism symbol
('//') {\Fgdt;b} perpendicularity symbol (two perpendicular lines) {\Fgdt;a} angularity
symbol (similar to '<') {\Fgdt;g} cylindricity symbol ('/O/') {\Fgdt;c} flatness symbol
(parallelogram) {\Fgdt;e} circularity or roundness symbol (single circle) {\Fgdt;u}
straightness symbol ('-') {\Fgdt;d} profile of a surface symbol (closed half circle)
{\Fgdt;k} profile of a line symbol (open half circle) {\Fgdt;h} circular runout symbol
('/' with arrow at top end) {\Fgdt;t} total runout symbol ('//' with arrows at top of each
slash) {\Fgdt;n} diameter symbol {\Fgdt;m} maximum material condition symbol (circle with
'M' in it) {\Fgdt;l} least material condition symbol (circle with 'L' in it) {\Fgdt;s}
regardless of feature size (circle with 'S' in it) {\Fgdt;p} positional symbol (circle
with 'P' in it) %%v vertical side of a frame box
def text(self) -> str:
Each tolerance frame is one line of text, so, for example, a stack of two tolerance frames:
---------------- | // | 0.001 | <-- frame 1 |---------------- | O | 0.005 | M | <-- frame 2
----------------would have a line 0 (frame 1) and a line 1 (frame 2).WarningThe caller of
this function is responsible for deallocating the string returned by this function
(acdbFree() should be used).
def textAll(self) -> str:
Each tolerance frame is one line of text, so, for example, a stack of two tolerance frames:
---------------- | // | 0.001 | <-- frame 1 |---------------- | O | 0.005 | M | <-- frame 2
----------------would have a line 0 (frame 1) and a line 1 (frame 2).WarningThe caller of
this function is responsible for deallocating the string returned by this function
(acdbFree() should be used).
class Field Class
def __init__(self) -> None:
This class is used to represent a field. The field can evaluate to one of the supported
data types. The field object acts as a container to store the field expression, evaluated
result, and other data. An evaluator is required for evaluating the field.
def __init__(self, pszFieldCode: str) -> None:
This class is used to represent a field. The field can evaluate to one of the supported
data types. The field object acts as a container to store the field expression, evaluated
result, and other data. An evaluator is required for evaluating the field.
def __init__(self, pszFieldCode: str, bTextField: bool) -> None:
This class is used to represent a field. The field can evaluate to one of the supported
data types. The field object acts as a container to store the field expression, evaluated
result, and other data. An evaluator is required for evaluating the field.
def __init__(self, id: PyDb.ObjectId) -> None:
This class is used to represent a field. The field can evaluate to one of the supported
data types. The field object acts as a container to store the field expression, evaluated
result, and other data. An evaluator is required for evaluating the field.
def __init__(self, id: PyDb.ObjectId, mode: PyDb.OpenMode) -> None:
This class is used to represent a field. The field can evaluate to one of the supported
data types. The field object acts as a container to store the field expression, evaluated
result, and other data. An evaluator is required for evaluating the field.
def __init__(self, id: PyDb.ObjectId, mode: PyDb.OpenMode, erased: bool) -> None:
This class is used to represent a field. The field can evaluate to one of the supported
data types. The field object acts as a container to store the field expression, evaluated
result, and other data. An evaluator is required for evaluating the field.
def __init__(*args) -> None:
This class is used to represent a field. The field can evaluate to one of the supported
data types. The field object acts as a container to store the field expression, evaluated
result, and other data. An evaluator is required for evaluating the field.
def __reduce__(self) -> Any:
def cast(otherObject: PyRx.RxObject) -> Field:
def childCount(self) -> int:
Returns the number of child fields in the field. If this field is a text field, the child
fields are the fields embedded in the text. If this field is not a text field, the child
fields are the number of nested fields.
def className() -> str:
def cloneFrom(otherObject: PyRx.RxObject) -> Field:
def convertToTextField(self) -> None:
Converts the field to a text field. A text field encapsulates text with embedded fields.
Returns Acad::eOk if successful; otherwise, returns an AutoCAD error status.
def desc() -> PyRx.RxClass:
Returns a pointer to the AcRxClass object representing the specific class, or most recent
parent class explicitly registered with ObjectARX of either the pointer type used to invoke
it or the class qualifier used with it. (Remember that when a static member function is
invoked via a pointer, the pointer type, not the object type, determines which
implementation of the function is invoked.) When working with a pointer to an object and
the proper AcRxClass object for the class of the object pointed to is desired, the
AcRxObject::isA() function should be used, since it is a virtual non-static method and is
therefore not pointer type dependent. Caching the value of the pointer returned by this
method is acceptable, provided the application knows that the AcRxClass object pointed to
by the returned pointer was created by an ObjectARX application that will not be unloaded.
def evaluate(self) -> tuple[int, int]:
This method evaluates the field. After creating a field object and setting the field code,
call this method to evaluate the field. If pDb is null, the field's database will be used
if the field is database resident. If it is null and the field is not database resident,
then evaluation will fail if the field requires a database. Returns Acad::eOk if
successful. Otherwise, it returns an AutoCAD error status.
def evaluate(self, nFlag: PyDb.FieldEvalContext) -> tuple[int, int]:
This method evaluates the field. After creating a field object and setting the field code,
call this method to evaluate the field. If pDb is null, the field's database will be used
if the field is database resident. If it is null and the field is not database resident,
then evaluation will fail if the field requires a database. Returns Acad::eOk if
successful. Otherwise, it returns an AutoCAD error status.
def evaluate(self, nFlag: PyDb.FieldEvalContext, db: PyDb.Database) -> tuple[int, int]:
This method evaluates the field. After creating a field object and setting the field code,
call this method to evaluate the field. If pDb is null, the field's database will be used
if the field is database resident. If it is null and the field is not database resident,
then evaluation will fail if the field requires a database. Returns Acad::eOk if
successful. Otherwise, it returns an AutoCAD error status.
def evaluate(*args) -> tuple[int, int]:
This method evaluates the field. After creating a field object and setting the field code,
call this method to evaluate the field. If pDb is null, the field's database will be used
if the field is database resident. If it is null and the field is not database resident,
then evaluation will fail if the field requires a database. Returns Acad::eOk if
successful. Otherwise, it returns an AutoCAD error status.
def evaluationOption(self) -> FieldEvalOption:
Returns the evaluation option explicitly set in the field. It can be one or more of the
AcDbField::EvalOption values.
def evaluationStatus(self) -> FieldEvalStatus:
This function gets the evaluation status set by the evaluator. It returns kNotYetEvaluated
if the field is not yet evaluated. See AcDbField::EvalStatus for more information.
def evaluatorId(self) -> str:
This function returns the ID of the evaluator used by the field for evaluation. It returns
null if there is no evaluator set in the field, or if an evaluator could not be found and
assigned to the field.
def getChild(self, index: int, mode: PyDb.OpenMode) -> Field:
Gets the child field. If this field is a text field, the child fields are the fields
embedded in the text. If this field is not a text field, the child fields are the number of
nested fields. The returned field object is opened in the specified mode if this field is
database resident. The caller is responsible for closing the field object after using it.
Returns Acad::eOk if successful; otherwise, returns an AutoCAD error status.
def getData(self, key: str) -> AcValue:
def getFieldCode(self, nContext: PyDb.FieldCodeFlag) -> str:
This function can be used to get a field code in various forms. The child field codes in
pChildFields are the embedded fields if this is a text field or nested fields if this is
not a text field. Returns Acad::eOk if successful; otherwise, returns an AutoCAD error
status.
def getFieldCode(self, nContext: PyDb.FieldCodeFlag, children: PyDb.Field, mode: PyDb.OpenMode) -> str:
This function can be used to get a field code in various forms. The child field codes in
pChildFields are the embedded fields if this is a text field or nested fields if this is
not a text field. Returns Acad::eOk if successful; otherwise, returns an AutoCAD error
status.
def getFieldCode(*args) -> str:
This function can be used to get a field code in various forms. The child field codes in
pChildFields are the embedded fields if this is a text field or nested fields if this is
not a text field. Returns Acad::eOk if successful; otherwise, returns an AutoCAD error
status.
def getFormat(self) -> str:
Returns the output format set in the field. The returned pointer will point to a blank
string if there is no output format set.
def getValue(self) -> str:
Returns the field evaluation result as string after formatting the string using the format
set in the field. Returns a pointer to a blank string if the field is not yet evaluated.
def hasData(self, key: str) -> bool:
def isTextField(self) -> bool:
Returns true if this field is a text field, which is text with embedded fields. Otherwise,
returns false.
def postInDatabase(self, db: PyDb.Database) -> None:
Posts the field and its child fields to the database. Although this function posts the
field to the database, it will not have any owner until it is set in an object, and unowned
fields will not be saved with the drawing. To set the field in an object, use
AcDbObject::setField or AcDbField::setInObject. Returns Acad::eOk if successful; otherwise,
returns an AutoCAD error status.
def setData(self, key: str, value: PyDb.AcValue, bRecursive: bool) -> None:
def setEvaluationOption(self, val: PyDb.FieldEvalOption) -> None:
Sets the evaluation option for the field. The field is evaluated only if the evaluation
option set in the field matches the evaluation context in which it is evaluated. Returns
Acad::eOk if successful; otherwise, returns an AutoCAD error status.
def setEvaluatorId(self, pszEvaluatorId: str) -> None:
Sets the ID of the evaluator to be used for evaluating the field. Returns Acad::eOk if
successful; otherwise, returns an AutoCAD error status.
def setFormat(self, pszFormat: str) -> None:
Sets the output format, which is used to format the evaluated value as string. Returns
Acad::eOk if successful; otherwise, returns an AutoCAD error status.
def setInObject(self, db: PyDb.DbObject, pszPropName: str) -> None:
Sets the field in the specified object as a property of the object and adds the field
object to the database. The object must be database resident, or the function will fail.
Another way to set a field in an object is to use AcDbObject::setField. The pszPropName is
used as key to get the field from the object. It cannot be null or blank. Returns Acad::eOk
if successful; otherwise, returns an AutoCAD error status.
def state(self) -> FieldState:
Returns the field state, which can be one or more of the AcDbField::State values.
class FieldCodeFlag Class
kFieldCode: ClassVar[Self]
kEvaluatedText: ClassVar[Self]
kEvaluatedChildren: ClassVar[Self]
kObjectReference: ClassVar[Self]
kAddMarkers: ClassVar[Self]
kEscapeBackslash: ClassVar[Self]
kStripOptions: ClassVar[Self]
kPreserveFields: ClassVar[Self]
kTextField: ClassVar[Self]
kPreserveOptions: ClassVar[Self]
kDetachChildren: ClassVar[Self]
kChildObjectReference: ClassVar[Self]
kForExpression: ClassVar[Self]
class FieldEngine Class
def __init__() -> None:
Raises an exception.
This class cannot be instantiated from Python.
def __reduce__(self) -> Any:
def className() -> str:
def evaluationOption(self) -> FieldEvalOption:
def evaluatorLoaderCount(self) -> int:
def getEngine() -> FieldEngine:
def isEvaluatorLoaded(self, pszEvalId: str) -> bool:
def registerEvaluator(self, evaluator: PyDb.FieldEvaluator) -> None:
def setEvaluationOption(self, opt: PyDb.FieldEvalOption) -> None:
def unregisterEvaluator(self, evaluator: PyDb.FieldEvaluator) -> None:
class FieldEvalContext Class
kOpen: ClassVar[Self]
kSave: ClassVar[Self]
kPlot: ClassVar[Self]
kEtransmit: ClassVar[Self]
kRegen: ClassVar[Self]
kDemand: ClassVar[Self]
kPreview: ClassVar[Self]
kPlotPreview: ClassVar[Self]
class FieldEvalOption Class
kDisable: ClassVar[Self]
kOnOpen: ClassVar[Self]
kOnSave: ClassVar[Self]
kOnPlot: ClassVar[Self]
kOnEtransmit: ClassVar[Self]
kOnRegen: ClassVar[Self]
kOnDemand: ClassVar[Self]
kAutomatic: ClassVar[Self]
class FieldEvalStatus Class
kNotYetEvaluated: ClassVar[Self]
kSuccess: ClassVar[Self]
kEvaluatorNotFound: ClassVar[Self]
kSyntaxError: ClassVar[Self]
kInvalidCode: ClassVar[Self]
kInvalidContext: ClassVar[Self]
kOtherError: ClassVar[Self]
class FieldEvaluator Class
def __init__(self) -> None:
def __reduce__(self) -> Any:
def beginEvaluateFields(self, context: int, db: PyDb.Database) -> None:
This method is called before one or more fields in a database are evaluated. The return
value is ignored.
def className() -> str:
def compile(self, field: PyDb.Field, db: PyDb.Database, result: PyDb.AcValue) -> FieldEvalStatus:
The field framework calls this method to compile a field when the field code is changed.
The evaluator can do any parsing of the field code here and store the parsed data in the
field. This method will be called only when the field code is changed, unlike evaluate(),
which is called whenever the field needs to be evaluated. Returns Acad::eOk if successful.
Otherwise, returns an AutoCAD error status.
def endEvaluateFields(self, context: int, db: PyDb.Database) -> None:
This method is called after one or more fields in a database are evaluated. The return
value is ignored.
def evaluate(self, field: PyDb.Field, context: int, db: PyDb.Database, result: PyDb.AcValue) -> FieldEvalStatus:
The field framework calls this method to evaluate a field whenever the field needs to be
evaluated. A field will be evaluated only when the evaluation option set in the field
matches the context in which the field evaluation is invoked. For example, if a field
option is set to evaluate only manually, then it will be evaluated only when the user
updates the specific field or all fields in the drawing manually. The evaluator should
evaluate the field and set the evaluated value using AcFdFieldResult::setFieldValue() and
the error status using AcFdFieldResult::setEvaluationStatus() in the passed result object,
which in turn will set them in the field object. The passed database pointer may be null if
the field is not database resident and a database could not be obtained in the current
context. If the field evaluation requires a database, then this method can set the
evaluation error status in the field result object and return an error. If the evaluation
fails for any reason, the previously cached result in the field object can be left intact
and used as the field value. Alternatively, the cached result can be deleted and
substituted with an error string (for example, '#ERR'), which will be displayed as field
value. Returns Acad::eOk if successful. Otherwise, returns an AutoCAD error status.
def format(self, field: PyDb.Field) -> str:
The field framework calls this method when a field is queried to get the evaluated field
value as a string. The evaluator can implement this method to support custom formatting of
field values. If the evaluator does not implement this method, the standard data types will
be formatted using default formats.
def getEvalName(self) -> str:
def getName(self) -> str:
def initialize(self, field: PyDb.Field) -> ErrorStatus:
The field framework calls this method to initialize a new field. This method is called
after setting a field code in the field and before compile() is called. The evaluator can
change the default options that are set in the field when it is created. This method will
be called only once for a field. Returns Acad::eOk if successful. Otherwise, returns an
AutoCAD error status.
class FieldState Class
kInitialized: ClassVar[Self]
kCompiled: ClassVar[Self]
kModified: ClassVar[Self]
kEvaluated: ClassVar[Self]
kHasCache: ClassVar[Self]
kHasFormattedString: ClassVar[Self]
class FilerType Class
kFileFiler: ClassVar[Self]
kCopyFiler: ClassVar[Self]
kUndoFiler: ClassVar[Self]
kBagFiler: ClassVar[Self]
kIdXlateFiler: ClassVar[Self]
kPageFiler: ClassVar[Self]
kDeepCloneFiler: ClassVar[Self]
kIdFiler: ClassVar[Self]
kPurgeFiler: ClassVar[Self]
kWblockCloneFiler: ClassVar[Self]
class FindFileHint Class
kDefault: ClassVar[Self]
kFontFile: ClassVar[Self]
kCompiledShapeFile: ClassVar[Self]
kTrueTypeFontFile: ClassVar[Self]
kEmbeddedImageFile: ClassVar[Self]
kXRefDrawing: ClassVar[Self]
kPatternFile: ClassVar[Self]
kARXApplication: ClassVar[Self]
kFontMapFile: ClassVar[Self]
kUnderlayFile: ClassVar[Self]
kDataLinkFile: ClassVar[Self]
kPhotometricWebFile: ClassVar[Self]
kMaterialMapFile: ClassVar[Self]
kCloudOrProjectFile: ClassVar[Self]
class FullSubentPath Class
def __init__(self) -> None:
def __init__(self, sub: PyDb.SubentType, gsMarker: int) -> None:
def __init__(self, id: PyDb.ObjectId, sub: PyDb.SubentType, gsMarker: int) -> None:
def __init__(self, id: PyDb.ObjectId, sub: PyDb.SubentId) -> None:
def __init__(self, ids: list[PyDb.ObjectId], sub: PyDb.SubentId) -> None:
def __init__(*args) -> None:
def __ne__(self) -> bool:
def __reduce__(self) -> Any:
kNull: PyDb.SubentId
def objectIds(self) -> list[PyDb.ObjectId]:
Returns a reference to the AcDbFullSubentPath object's objectId array.
def setObjectIds(self, ids: list[PyDb.ObjectId]) -> None:
This function sets a reference to an objectId array for the AcDbFullSubentPath object.
def setSubentId(self, id: PyDb.SubentId) -> None:
This function sets a reference to an embedded AcDbSubentId.
def subentId(self) -> SubentId:
Returns const copy of the embedded AcDbSubentId.
class GeoCoordinateSystem Class
def __init__() -> None:
Raises an exception.
This class cannot be instantiated from Python.
def __reduce__(self) -> Any:
def className() -> str:
def create(val: str) -> GeoCoordinateSystem:
def getCartesianExtents(self) -> Extents2d:
def getDatum(self) -> tuple[str, str]:
def getDescription(self) -> str:
def getEllipsoid(self) -> tuple[str, str, float, float]:
def getEpsgCode(self) -> int:
def getGeoUnit(self) -> GeoCoordinateSystemUnit:
def getGeodeticExtents(self) -> Extents2d:
def getId(self) -> str:
def getOffset(self) -> PyGe.Vector2d:
def getProjectionCode(self) -> GeoCoordinateSystemProjectionCode:
def getType(self) -> GeoCoordinateSystemType:
def getUnit(self) -> UnitsValue:
def getUnitScale(self) -> float:
def getWktRepresentation(self) -> str:
def getXmlRepresentation(self) -> str:
class GeoCoordinateSystemProjectionCode Class
kProjectionCodeUnknown: ClassVar[Self]
kProjectionCodeAlber: ClassVar[Self]
kProjectionCodeAzede: ClassVar[Self]
kProjectionCodeAzmea: ClassVar[Self]
kProjectionCodeAzmed: ClassVar[Self]
kProjectionCodeBipolar: ClassVar[Self]
kProjectionCodeBonne: ClassVar[Self]
kProjectionCodeCassini: ClassVar[Self]
kProjectionCodeEckert4: ClassVar[Self]
kProjectionCodeEckert6: ClassVar[Self]
kProjectionCodeEdcnc: ClassVar[Self]
kProjectionCodeEdcyl: ClassVar[Self]
kProjectionCodeGaussK: ClassVar[Self]
kProjectionCodeGnomonic: ClassVar[Self]
kProjectionCodeGoode: ClassVar[Self]
kProjectionCodeHom1uv: ClassVar[Self]
kProjectionCodeHom1xy: ClassVar[Self]
kProjectionCodeHom2uv: ClassVar[Self]
kProjectionCodeHom2xy: ClassVar[Self]
kProjectionCodeKrovak: ClassVar[Self]
kProjectionCodeKrvk95: ClassVar[Self]
kProjectionCodeLL: ClassVar[Self]
kProjectionCodeLm1sp: ClassVar[Self]
kProjectionCodeLm2sp: ClassVar[Self]
kProjectionCodeLmblg: ClassVar[Self]
kProjectionCodeLmtan: ClassVar[Self]
kProjectionCodeMiller: ClassVar[Self]
kProjectionCodeMndotl: ClassVar[Self]
kProjectionCodeMndott: ClassVar[Self]
kProjectionCodeModpc: ClassVar[Self]
kProjectionCodeMollweid: ClassVar[Self]
kProjectionCodeMrcat: ClassVar[Self]
kProjectionCodeMrcatK: ClassVar[Self]
kProjectionCodeMstero: ClassVar[Self]
kProjectionCodeNeacyl: ClassVar[Self]
kProjectionCodeNerth: ClassVar[Self]
kProjectionCodeNzealand: ClassVar[Self]
kProjectionCodeOblqM: ClassVar[Self]
kProjectionCodeObqcyl: ClassVar[Self]
kProjectionCodeOrtho: ClassVar[Self]
kProjectionCodeOstn02: ClassVar[Self]
kProjectionCodeOstn97: ClassVar[Self]
kProjectionCodeOstro: ClassVar[Self]
kProjectionCodePlycn: ClassVar[Self]
kProjectionCodePstro: ClassVar[Self]
kProjectionCodePstrosl: ClassVar[Self]
kProjectionCodeRskew: ClassVar[Self]
kProjectionCodeRskewc: ClassVar[Self]
kProjectionCodeRskewo: ClassVar[Self]
kProjectionCodeRobinson: ClassVar[Self]
kProjectionCodeSinus: ClassVar[Self]
kProjectionCodeSotrm: ClassVar[Self]
kProjectionCodeSstro: ClassVar[Self]
kProjectionCodeSwiss: ClassVar[Self]
kProjectionCodeSys34: ClassVar[Self]
kProjectionCodeSys34_99: ClassVar[Self]
kProjectionCodeTeacyl: ClassVar[Self]
kProjectionCodeTm: ClassVar[Self]
kProjectionCodeTrmeraf: ClassVar[Self]
kProjectionCodeTrmrkrg: ClassVar[Self]
kProjectionCodeTrmrs: ClassVar[Self]
kProjectionCodeVdgrntn: ClassVar[Self]
kProjectionCodeWccsl: ClassVar[Self]
kProjectionCodeWccst: ClassVar[Self]
kProjectionCodeUtm: ClassVar[Self]
kProjectionCodeWinkl: ClassVar[Self]
kProjectionCodeNrthsrt: ClassVar[Self]
kProjectionCodeLmbrtaf: ClassVar[Self]
kProjectionCodeSys34_01: ClassVar[Self]
kProjectionCodeEdcylE: ClassVar[Self]
kProjectionCodePlateCarree: ClassVar[Self]
kProjectionCodePvMercator: ClassVar[Self]
class GeoCoordinateSystemTransformer Class
def __init__() -> None:
Raises an exception.
This class cannot be instantiated from Python.
def __reduce__(self) -> Any:
def className() -> str:
def create(sourceCoordSysId: str, targetCoordSysId: str) -> GeoCoordinateSystemTransformer:
def getSourceCoordinateSystemId(self) -> str:
def transformPoint(self, pt: PyGe.Point3d) -> PyGe.Point3d:
def transformPoints(self, pts: list[PyGe.Point3d]) -> list:
class GeoCoordinateSystemType Class
kTypeUnknown: ClassVar[Self]
kTypeArbitrary: ClassVar[Self]
kTypeGeographic: ClassVar[Self]
kTypeProjected: ClassVar[Self]
class GeoCoordinateSystemUnit Class
kUnitUnknown: ClassVar[Self]
kUnitMeter: ClassVar[Self]
kUnitFoot: ClassVar[Self]
kUnitInch: ClassVar[Self]
kUnitIFoot: ClassVar[Self]
kUnitClarkeFoot: ClassVar[Self]
kUnitIInch: ClassVar[Self]
kUnitCentimeter: ClassVar[Self]
kUnitKilometer: ClassVar[Self]
kUnitYard: ClassVar[Self]
kUnitSearsYard: ClassVar[Self]
kUnitMile: ClassVar[Self]
kUnitIYard: ClassVar[Self]
kUnitIMile: ClassVar[Self]
kUnitKnot: ClassVar[Self]
kUnitNautM: ClassVar[Self]
kUnitLat66: ClassVar[Self]
kUnitLat83: ClassVar[Self]
kUnitDecimeter: ClassVar[Self]
kUnitMillimeter: ClassVar[Self]
kUnitDekameter: ClassVar[Self]
kUnitHectometer: ClassVar[Self]
kUnitGermanMeter: ClassVar[Self]
kUnitCaGrid: ClassVar[Self]
kUnitClarkeChain: ClassVar[Self]
kUnitGunterChain: ClassVar[Self]
kUnitBenoitChain: ClassVar[Self]
kUnitSearsChain: ClassVar[Self]
kUnitClarkeLink: ClassVar[Self]
kUnitGunterLink: ClassVar[Self]
kUnitBenoitLink: ClassVar[Self]
kUnitSearsLink: ClassVar[Self]
kUnitRod: ClassVar[Self]
kUnitPerch: ClassVar[Self]
kUnitPole: ClassVar[Self]
kUnitFurlong: ClassVar[Self]
kUnitRood: ClassVar[Self]
kUnitCapeFoot: ClassVar[Self]
kUnitBrealey: ClassVar[Self]
kUnitSearsFoot: ClassVar[Self]
kUnitGoldCoastFoot: ClassVar[Self]
kUnitMicroInch: ClassVar[Self]
kUnitIndianYard: ClassVar[Self]
kUnitIndianFoot: ClassVar[Self]
kUnitIndianFt37: ClassVar[Self]
kUnitIndianFt62: ClassVar[Self]
kUnitIndianFt75: ClassVar[Self]
kUnitIndianYd37: ClassVar[Self]
kUnitDecameter: ClassVar[Self]
kUnitInternationalChain: ClassVar[Self]
kUnitInternationalLink: ClassVar[Self]
kUnitDegree: ClassVar[Self]
kUnitGrad: ClassVar[Self]
kUnitGrade: ClassVar[Self]
kUnitMapInfo: ClassVar[Self]
kUnitMil: ClassVar[Self]
kUnitMinute: ClassVar[Self]
kUnitRadian: ClassVar[Self]
kUnitSecond: ClassVar[Self]
kUnitDecisec: ClassVar[Self]
kUnitCentisec: ClassVar[Self]
kUnitMillisec: ClassVar[Self]
class GeoData Class
def __init__(self) -> None:
This object identifies the geographical space a design is located in. It also provides all
the information necessary to accurately map a design coordinate system to a location on
earth (a latitude-longitude based system). Furthermore this object provides a simple
transformation to support efforts like Google Earth and geo-tagging and enough information
to initialize geo-spatial applications for accurate coordinate system transformation and
place a design on the earth, relative to each other. The minimum requirements for a valid
object are:Type of design coordinates.Design point.Reference point.A 'design coordinate to
geodetic coordinate' mesh with at least one point.It is the association of the Design point
and the Reference point which provides the minimum level of 'georeferencing.' Any
application, regardless of its access to a coordinate conversion library, may obtain a
georefernce for the object by calling one of the transformation functions with, for
example, the values specified by the setDesignPoint function. For many applications, this
minimum level of georeferencing is adequate. Positioning a house within Google Earth, for
example. To the degree that additional information is provided, more precise and
comprehensive transformation results become available.
def __init__(self, id: PyDb.ObjectId) -> None:
This object identifies the geographical space a design is located in. It also provides all
the information necessary to accurately map a design coordinate system to a location on
earth (a latitude-longitude based system). Furthermore this object provides a simple
transformation to support efforts like Google Earth and geo-tagging and enough information
to initialize geo-spatial applications for accurate coordinate system transformation and
place a design on the earth, relative to each other. The minimum requirements for a valid
object are:Type of design coordinates.Design point.Reference point.A 'design coordinate to
geodetic coordinate' mesh with at least one point.It is the association of the Design point
and the Reference point which provides the minimum level of 'georeferencing.' Any
application, regardless of its access to a coordinate conversion library, may obtain a
georefernce for the object by calling one of the transformation functions with, for
example, the values specified by the setDesignPoint function. For many applications, this
minimum level of georeferencing is adequate. Positioning a house within Google Earth, for
example. To the degree that additional information is provided, more precise and
comprehensive transformation results become available.
def __init__(self, id: PyDb.ObjectId, mode: PyDb.OpenMode) -> None:
This object identifies the geographical space a design is located in. It also provides all
the information necessary to accurately map a design coordinate system to a location on
earth (a latitude-longitude based system). Furthermore this object provides a simple
transformation to support efforts like Google Earth and geo-tagging and enough information
to initialize geo-spatial applications for accurate coordinate system transformation and
place a design on the earth, relative to each other. The minimum requirements for a valid
object are:Type of design coordinates.Design point.Reference point.A 'design coordinate to
geodetic coordinate' mesh with at least one point.It is the association of the Design point
and the Reference point which provides the minimum level of 'georeferencing.' Any
application, regardless of its access to a coordinate conversion library, may obtain a
georefernce for the object by calling one of the transformation functions with, for
example, the values specified by the setDesignPoint function. For many applications, this
minimum level of georeferencing is adequate. Positioning a house within Google Earth, for
example. To the degree that additional information is provided, more precise and
comprehensive transformation results become available.
def __init__(self, id: PyDb.ObjectId, mode: PyDb.OpenMode, erased: bool) -> None:
This object identifies the geographical space a design is located in. It also provides all
the information necessary to accurately map a design coordinate system to a location on
earth (a latitude-longitude based system). Furthermore this object provides a simple
transformation to support efforts like Google Earth and geo-tagging and enough information
to initialize geo-spatial applications for accurate coordinate system transformation and
place a design on the earth, relative to each other. The minimum requirements for a valid
object are:Type of design coordinates.Design point.Reference point.A 'design coordinate to
geodetic coordinate' mesh with at least one point.It is the association of the Design point
and the Reference point which provides the minimum level of 'georeferencing.' Any
application, regardless of its access to a coordinate conversion library, may obtain a
georefernce for the object by calling one of the transformation functions with, for
example, the values specified by the setDesignPoint function. For many applications, this
minimum level of georeferencing is adequate. Positioning a house within Google Earth, for
example. To the degree that additional information is provided, more precise and
comprehensive transformation results become available.
def __init__(*args) -> None:
This object identifies the geographical space a design is located in. It also provides all
the information necessary to accurately map a design coordinate system to a location on
earth (a latitude-longitude based system). Furthermore this object provides a simple
transformation to support efforts like Google Earth and geo-tagging and enough information
to initialize geo-spatial applications for accurate coordinate system transformation and
place a design on the earth, relative to each other. The minimum requirements for a valid
object are:Type of design coordinates.Design point.Reference point.A 'design coordinate to
geodetic coordinate' mesh with at least one point.It is the association of the Design point
and the Reference point which provides the minimum level of 'georeferencing.' Any
application, regardless of its access to a coordinate conversion library, may obtain a
georefernce for the object by calling one of the transformation functions with, for
example, the values specified by the setDesignPoint function. For many applications, this
minimum level of georeferencing is adequate. Positioning a house within Google Earth, for
example. To the degree that additional information is provided, more precise and
comprehensive transformation results become available.
def __reduce__(self) -> Any:
def addMeshFace(self, idx: int, p0: int, p1: int, p2: int) -> None:
Sets 3 vertex indices for a triangle face specified by faceIndex.
def addMeshPointMap(self, idx: int, src: PyGe.Point2d, dest: PyGe.Point2d) -> None:
Inserts a new design/reference point association into the mesh.
def blockTableRecordId(self) -> ObjectId:
This function returns the object Id of the model space block table record object.
def cast(otherObject: PyRx.RxObject) -> GeoData:
def className() -> str:
def cloneFrom(otherObject: PyRx.RxObject) -> GeoData:
def coordinateProjectionRadius(self) -> float:
This method provides the radius of curvature, in meters, of the ellipsoid model to be used
in the sea-level correction algorithm.
def coordinateSystem(self) -> str:
This property method sets the coordinate system definition in string form. The value of
this string is expected to be in the form of an XML string which upon successful parsing,
produces a valid internal MAP coordinate reference system definition.
def coordinateType(self) -> GeoTypeOfCoordinates:
Returns the type of the design coordinates; that is the type of the actual coordinates
which appear in the host database entities. Creators of this object must specify this
value, and consumers of this object should not change this value.
def desc() -> PyRx.RxClass:
Returns a pointer to the AcRxClass object representing the specific class, or most recent
parent class explicitly registered with ObjectARX of either the pointer type used to invoke
it or the class qualifier used with it. (Remember that when a static member function is
invoked via a pointer, the pointer type, not the object type, determines which
implementation of the function is invoked.) When working with a pointer to an object and
the proper AcRxClass object for the class of the object pointed to is desired, the
AcRxObject::isA() function should be used, since it is a virtual non-static method and is
therefore not pointer type dependent. Caching the value of the pointer returned by this
method is acceptable, provided the application knows that the AcRxClass object pointed to
by the returned pointer was created by an ObjectARX application that will not be unloaded.
def designPoint(self) -> PyGe.Point3d:
Returns the design coordinates of the point associated with the location specified by the
setReferencePoint method. The coordinates used by this method are always design
coordinates.
def doSeaLevelCorrection(self) -> bool:
Returns the current state of the object's doSeaLevelCorrection property, which controls the
application of the sea-level correction to horizontal coordinates during a local to grid
transformation process.
def eraseFromDb(self) -> None:
Erases this object from the database.
def geoRSSTag(self) -> str:
Returns the georss tag. This is automatically updated to the global point if set. For more
information see http://georss.org/
def getMeshFace(self, idx: int) -> tuple[int, int, int]:
Gets 3 vertex indices at the triangle face for the given faceIndex.
def getMeshPointMap(self, idx: int) -> tuple[PyGe.Point2d, PyGe.Point2d]:
Returns a copy of design points, and the associated reference points, in the object's
current transformation mesh.
def getMeshPointMaps(self) -> tuple[list[PyGe.Point2d], list[PyGe.Point2d]]:
Returns a complete copy of the object's transformation mesh points.
def horizontalUnitScale(self) -> float:
Returns the current horizontal unit scale value.
def horizontalUnits(self) -> UnitsValue:
Returns the current horizontal unit scale value.
def northDirection(self) -> float:
Returns the azimuth of the local grid Y axis relative to true north. When returned as a
double, the value returned is in radians east of true north. The value of this vector is
used to calculate coordinate rotation in the local to grid portion of a
LocalToGridToReference transformation. The local coordinates are rotated about the point
specified by the setLocalPoint method. The setNorthDirectionVector member expects a unit
vector, and the provided vector will be normalized before use. Default = (0,1);
def northDirectionVector(self) -> PyGe.Vector2d:
Returns a copy of the two dimensional vector which defines the direction of true north in
terms of design coordinates.
def numMeshFaces(self) -> int:
Returns the number of faces in the mesh triangulation.
def numMeshPoints(self) -> int:
Returns the number of points currently in the transformation mesh capability.
def observationCoverage(self) -> str:
Returns the current value of the object's Observation Coverage property.
def observationFrom(self) -> str:
Returns the current value of the object's Observation From property.
def observationTo(self) -> str:
Returns the current value of the object's Observation To property.
def postToDb(self) -> ObjectId:
This function posts this object to the extension dictionary of the model space block table
record. The user must call setBlockTableRecordId() to set the model space block table
record before calling postToDb().
def referencePoint(self) -> PyGe.Point3d:
Returns the reference point associated with the design coordinates set with the
setDesignPoint method. In the case where coordinate type is coordTypLocal, the point
argument is that of the grid coordinate that corresponds to the designPoint location in the
grid coordinate system defined by the setCoordinateSystem method of this object. In the
case of design coordinates of the coordTypGrid or coordTypGeodetic types, this
specification is not required.
def resetMeshPointMaps(self) -> None:
Erases both internal transformation mesh point arrays.
def scaleEstimationMethod(self) -> GeoScaleEstimationMethod:
Returns a copy of the currently active local coordinate system scale estimation method.
def scaleFactor(self) -> float:
Returns a copy of the user specified scale factor to be used in the local to grid portion
of any transformation when the scale estimation method is set to
kScaleEstMethodUserDefined.
def seaLevelElevation(self) -> float:
Returns the object's current value for the elevation which is to be used in the sea level
correction algorithm.
def setBlockTableRecordId(self, id: PyDb.ObjectId) -> None:
This function sets the object id of the model space block table record.
def setCoordinateProjectionRadius(self, val: float) -> None:
Sets the radius, in meters, of the ellipsoid model to be used in the sea-level correction
algorithm.
def setCoordinateSystem(self, val: str) -> None:
This property method sets the coordinate system definition in string form. The value of
this string is expected to be in the form of an XML string which upon successful parsing,
produces a valid internal MAP coordinate reference system definition.
def setCoordinateType(self, val: PyDb.GeoTypeOfCoordinates) -> None:
Sets the type of the design coordinates; that is the type of the actual coordinates which
appear in the host database entities. Creators of this object must specify this value, and
consumers of this object should not change this value. Default = coordTypUnknown.
def setDesignPoint(self, pt: PyGe.Point3d) -> None:
Sets the design coordinates of the point associated with the location specified by the
setReferencePoint method. The coordinates provided to this method must be design
coordinates.
def setDoSeaLevelCorrection(self, val: bool) -> None:
Enables and disables the sea-level correction feature for local to grid transformations
(and vice versa).
def setGeoRSSTag(self, val: str) -> None:
Sets a user generated georss tag.
def setHorizontalUnitScale(self, val: float) -> None:
Sets the horizontal unit scale value.
def setHorizontalUnits(self, val: PyDb.UnitsValue) -> None:
Sets the horizontal unit scale value.
def setMeshPointMaps(self, src: list[PyGe.Point2d], dest: list[PyGe.Point2d]) -> None:
Replaces completely the object's transformation mesh point arrays.
def setNorthDirectionVector(self, vec: PyGe.Vector2d) -> None:
Sets the direction of true north in terms of design coordinates.
def setObservationCoverage(self, val: str) -> None:
Use this method to obtain access to the object's Observation Coverage property.
def setObservationFrom(self, val: str) -> None:
Sets the value of the object's Observation From property.
def setObservationTo(self, val: str) -> None:
Sets the object's Observation To property.
def setReferencePoint(self, pt: PyGe.Point3d) -> None:
Use this method to set the reference point to be associated with the design coordinates
specified by the setDesignPoint method.
def setScaleEstimationMethod(self, val: PyDb.GeoScaleEstimationMethod) -> None:
Sets the value of the object's Scale Estimation Method property.
def setScaleFactor(self, val: float) -> None:
Sets the user-specified scale factor to be used in the local to grid portion of any
transformation when the scale estimation method is set to kScaleEstMethodUserDefined.
def setSeaLevelElevation(self, val: float) -> None:
Sets the average elevation above (or below) sea level for the local grid system described
by this object.
def setUpDirection(self, vec: PyGe.Vector3d) -> None:
Sets the vector which defines the direction of the vertical axis of a local coordinate
system.
def setVerticalUnitScale(self, val: float) -> None:
Returns the current vertical unit scale factor.
def setVerticalUnits(self, val: PyDb.UnitsValue) -> None:
Sets the vertical unit for the system
def transformFromLonLatAlt(self, pt: PyGe.Point3d | float) -> PyGe.Point3d:
Transforms the provided geographic coordinate to the design coordinate equivalent.
def transformToLonLatAlt(self, pt: PyGe.Point3d | float) -> PyGe.Point3d:
Performs the transformation indicated by the current content of this object. The most
accurate transformation available is performed.
def upDirection(self) -> PyGe.Vector3d:
Returns a copy of the vector which defines the direction of the vertical axis of a local
coordinate system.
def updateTransformationMatrix(self) -> None:
This function must be called after there has been any modification to the triangulation
mesh point arrays, and/or triangulation face arrays, to validate and activate any such
changes.
def verticalUnitScale(self) -> float:
Returns the current vertical unit scale factor.
def verticalUnits(self) -> UnitsValue:
Obtains the vertical unit type.
class GeoMap Class
def LOD(self) -> int:
def __init__(self, mapType: PyDb.AcGeoMapType, res: PyDb.AcGeoMapResolution, levelOfDetail: int) -> None:
The AcDbGeoMap class represents an embedded raster image which is captured from a portion
of LiveMap
def __init__(self, viewportId: PyDb.ObjectId, isViewportSpecific: bool) -> None:
The AcDbGeoMap class represents an embedded raster image which is captured from a portion
of LiveMap
def __init__(self, id: PyDb.ObjectId) -> None:
The AcDbGeoMap class represents an embedded raster image which is captured from a portion
of LiveMap
def __init__(self, id: PyDb.ObjectId, mode: PyDb.OpenMode) -> None:
The AcDbGeoMap class represents an embedded raster image which is captured from a portion
of LiveMap
def __init__(self, id: PyDb.ObjectId, mode: PyDb.OpenMode, erased: bool) -> None:
The AcDbGeoMap class represents an embedded raster image which is captured from a portion
of LiveMap
def __init__(*args) -> None:
The AcDbGeoMap class represents an embedded raster image which is captured from a portion
of LiveMap
def __reduce__(self) -> Any:
def bottomLeftPt(self) -> PyGe.Point3d:
def cast(otherObject: PyRx.RxObject) -> GeoMap:
def className() -> str:
def cloneFrom(otherObject: PyRx.RxObject) -> GeoMap:
def desc() -> PyRx.RxClass:
Returns a pointer to the AcRxClass object representing the specific class, or most recent
parent class explicitly registered with ObjectARX of either the pointer type used to invoke
it or the class qualifier used with it. (Remember that when a static member function is
invoked via a pointer, the pointer type, not the object type, determines which
implementation of the function is invoked.) When working with a pointer to an object and
the proper AcRxClass object for the class of the object pointed to is desired, the
AcRxObject::isA() function should be used, since it is a virtual non-static method and is
therefore not pointer type dependent. Caching the value of the pointer returned by this
method is acceptable, provided the application knows that the AcRxClass object pointed to
by the returned pointer was created by an ObjectARX application that will not be unloaded.
def height(self) -> float:
def imageBottomLeftPt(self) -> PyGe.Point3d:
def imageHeight(self) -> float:
def imageWidth(self) -> float:
def isOutOfDate(self) -> bool:
def mapType(self) -> AcGeoMapType:
def resolution(self) -> AcGeoMapResolution:
def setMapType(self, val: PyDb.AcGeoMapType) -> None:
def setResolution(self, val: PyDb.AcGeoMapResolution) -> None:
def updateMapImage(self, reset: bool) -> bool:
def width(self) -> float:
class GeoPositionMarker Class
def __init__(self) -> None:
def __init__(self, position: PyGe.Point3d, radius: float, landingGap: float) -> None:
def __init__(self, id: PyDb.ObjectId) -> None:
def __init__(self, id: PyDb.ObjectId, mode: PyDb.OpenMode) -> None:
def __init__(self, id: PyDb.ObjectId, mode: PyDb.OpenMode, erased: bool) -> None:
def __init__(*args) -> None:
def __reduce__(self) -> Any:
def cast(otherObject: PyRx.RxObject) -> GeoPositionMarker:
def className() -> str:
def cloneFrom(otherObject: PyRx.RxObject) -> GeoPositionMarker:
def desc() -> PyRx.RxClass:
Returns a pointer to the AcRxClass object representing the specific class, or most recent
parent class explicitly registered with ObjectARX of either the pointer type used to invoke
it or the class qualifier used with it. (Remember that when a static member function is
invoked via a pointer, the pointer type, not the object type, determines which
implementation of the function is invoked.) When working with a pointer to an object and
the proper AcRxClass object for the class of the object pointed to is desired, the
AcRxObject::isA() function should be used, since it is a virtual non-static method and is
therefore not pointer type dependent. Caching the value of the pointer returned by this
method is acceptable, provided the application knows that the AcRxClass object pointed to
by the returned pointer was created by an ObjectARX application that will not be unloaded.
def enableFrameText(self) -> bool:
def geoPosition(self) -> PyGe.Point3d:
def landingGap(self) -> float:
def latLonAlt(self) -> tuple[float, float, float]:
def mtext(self) -> MText:
def mtextVisible(self) -> bool:
def normal(self) -> PyGe.Vector3d:
def notes(self) -> str:
def position(self) -> PyGe.Point3d:
def radius(self) -> float:
def setEnableFrameText(self, val: bool) -> None:
def setGeoPosition(self, pt: PyGe.Point3d) -> None:
def setLandingGap(self, val: float) -> None:
def setLatLonAlt(self, lat: float, lon: float, alt: float) -> None:
def setMText(self, val: PyDb.MText.M) -> None:
def setMTextVisible(self, val: bool) -> None:
def setNotes(self, val: str) -> None:
def setPosition(self, pt: PyGe.Point3d) -> None:
def setRadius(self, val: float) -> None:
def setText(self, val: str) -> None:
def setTextAlignmentType(self, val: PyDb.GeoTextAlignmentType) -> None:
def text(self) -> str:
def textAlignmentType(self) -> GeoTextAlignmentType:
def textStyle(self) -> ObjectId:
class GeoScaleEstimationMethod Class
kScaleEstMethodUnity: ClassVar[Self]
kScaleEstMethodUserDefined: ClassVar[Self]
kScaleEstMethodReferencePoint: ClassVar[Self]
kScaleEstMethodPrismoidal: ClassVar[Self]
class GeoTextAlignmentType Class
kLeftAlignment: ClassVar[Self]
kCenterAlignment: ClassVar[Self]
kRightAlignment: ClassVar[Self]
class GeoTypeOfCoordinates Class
kCoordTypUnknown: ClassVar[Self]
kCoordTypLocal: ClassVar[Self]
kCoordTypGrid: ClassVar[Self]
kCoordTypGeographic: ClassVar[Self]
class Graph Class
def __init__() -> None:
Raises an exception.
This class cannot be instantiated from Python.
def __reduce__(self) -> Any:
def addEdge(self, pfrom: PyDb.GraphNode, pto: PyDb.GraphNode) -> None:
def addNode(self, val: PyDb.GraphNode) -> None:
def breakCycleEdge(self, pfrom: PyDb.GraphNode, pto: PyDb.GraphNode) -> None:
def className() -> str:
def clearAll(self, flags: int) -> None:
def delNode(self, val: PyDb.GraphNode) -> None:
def findCycles(self, start: PyDb.GraphNode) -> bool:
def isEmpty(self) -> bool:
def node(self, val: int) -> GraphNode:
def numNodes(self) -> int:
def reset(self) -> None:
def rootNode(self) -> GraphNode:
def setNodeGrowthRate(self, val: int) -> None:
class GraphNode Class
def __init__() -> None:
Raises an exception.
This class cannot be instantiated from Python.
def __reduce__(self) -> Any:
def addRefTo(self, val: PyDb.GraphNode) -> None:
def className() -> str:
def clear(self, val: int) -> None:
def cycleIn(self, val: int) -> GraphNode:
def cycleOut(self, val: int) -> GraphNode:
def disconnectAll(self) -> None:
def isCycleNode(self, val: int) -> bool:
def isMarkedAs(self, val: int) -> bool:
def markAs(self, val: int) -> None:
def nextCycleNode(self) -> GraphNode:
def nodeIn(self, val: int) -> GraphNode:
def nodeOut(self, val: int) -> GraphNode:
def numCycleIn(self) -> int:
def numCycleOut(self) -> int:
def numIn(self) -> int:
def numOut(self) -> int:
def owner(self) -> Graph:
def removeRefTo(self, val: PyDb.GraphNode) -> None:
def setEdgeGrowthRate(self, outEdgeRate: int, inEdgeRate: int) -> None:
class GraphNodeFlags Class
kNone: ClassVar[Self]
kVisited: ClassVar[Self]
kOutsideRefed: ClassVar[Self]
kSelected: ClassVar[Self]
kInList: ClassVar[Self]
kListAll: ClassVar[Self]
kFirstLevel: ClassVar[Self]
kUnresTree: ClassVar[Self]
kAll: ClassVar[Self]
class GridLineStyle Class
kGridLineStyleSingle: ClassVar[Self]
kGridLineStyleDouble: ClassVar[Self]
class GridLineType Class
kInvalidGridLine: ClassVar[Self]
kHorzTop: ClassVar[Self]
kHorzInside: ClassVar[Self]
kHorzBottom: ClassVar[Self]
kVertLeft: ClassVar[Self]
kVertInside: ClassVar[Self]
kVertRight: ClassVar[Self]
kHorzGridLineTypes: ClassVar[Self]
kVertGridLineTypes: ClassVar[Self]
kOuterGridLineTypes: ClassVar[Self]
kInnerGridLineTypes: ClassVar[Self]
kAllGridLineTypes: ClassVar[Self]
class GridProperty Class
kGridPropInvalid: ClassVar[Self]
kGridPropLineStyle: ClassVar[Self]
kGridPropLineWeight: ClassVar[Self]
kGridPropLinetype: ClassVar[Self]
kGridPropColor: ClassVar[Self]
kGridPropVisibility: ClassVar[Self]
kGridPropDoubleLineSpacing: ClassVar[Self]
kGridPropAll: ClassVar[Self]
class GripData Class
def __init__(self) -> None:
This class describes a specific grip for a specific entity. It allows applications with
control over grips to Draw their own grip glyph graphicsPerform custom operations when the
user picks or hovers over a gripControl a right-click menu that involves gripsReceive
detailed notification about a grip editing operation When a custom class implements the
AcDbEntity::getGripPoints() function, it fills the AcDbGripDataArray argument with
AcDbGripData objects, one per grip point. The AcDbGripData object contains two members that
define the grip: the actual 3d point for the grip and a pointer to a data structure
specified by the custom entity that is used as the identifier for the grip. These two data
members are required. The object also includes optional members that contain pointers to
callbacks that the host application may call during a grip edit operation to allow the
custom entity to do event processing. These pointers may be null if the functionality is
not provided. The object also includes an optional bitmask that controls the appearance of
the grip during drag operations. These bit values may be OR'd together.
def __reduce__(self) -> Any:
def className() -> str:
def gripPoint(self) -> PyGe.Point3d:
This function returns a reference to the grip point that this AcDbGripData object
represents.
def setGripPoint(self, pt: PyGe.Point3d) -> None:
This method sets the grip point for this grip.
class Group Class
def __init__(self) -> None:
The AcDbGroup class represents a collection of entities referred to by a single name. All
AcDbGroup objects belong to a dictionary object which can be obtained through the
AcDbDatabase::getGroupDictionary() method. Unlike a block, entities within a group can be
individually manipulated. This class contains a dynamic array of object IDs that are the
objects in the group.
def __init__(self, grpDesc: str) -> None:
The AcDbGroup class represents a collection of entities referred to by a single name. All
AcDbGroup objects belong to a dictionary object which can be obtained through the
AcDbDatabase::getGroupDictionary() method. Unlike a block, entities within a group can be
individually manipulated. This class contains a dynamic array of object IDs that are the
objects in the group.
def __init__(self, grpDesc: str, selectable: bool) -> None:
The AcDbGroup class represents a collection of entities referred to by a single name. All
AcDbGroup objects belong to a dictionary object which can be obtained through the
AcDbDatabase::getGroupDictionary() method. Unlike a block, entities within a group can be
individually manipulated. This class contains a dynamic array of object IDs that are the
objects in the group.
def __init__(self, id: PyDb.ObjectId) -> None:
The AcDbGroup class represents a collection of entities referred to by a single name. All
AcDbGroup objects belong to a dictionary object which can be obtained through the
AcDbDatabase::getGroupDictionary() method. Unlike a block, entities within a group can be
individually manipulated. This class contains a dynamic array of object IDs that are the
objects in the group.
def __init__(self, id: PyDb.ObjectId, mode: PyDb.OpenMode) -> None:
The AcDbGroup class represents a collection of entities referred to by a single name. All
AcDbGroup objects belong to a dictionary object which can be obtained through the
AcDbDatabase::getGroupDictionary() method. Unlike a block, entities within a group can be
individually manipulated. This class contains a dynamic array of object IDs that are the
objects in the group.
def __init__(self, id: PyDb.ObjectId, mode: PyDb.OpenMode, erased: bool) -> None:
The AcDbGroup class represents a collection of entities referred to by a single name. All
AcDbGroup objects belong to a dictionary object which can be obtained through the
AcDbDatabase::getGroupDictionary() method. Unlike a block, entities within a group can be
individually manipulated. This class contains a dynamic array of object IDs that are the
objects in the group.
def __init__(*args) -> None:
The AcDbGroup class represents a collection of entities referred to by a single name. All
AcDbGroup objects belong to a dictionary object which can be obtained through the
AcDbDatabase::getGroupDictionary() method. Unlike a block, entities within a group can be
individually manipulated. This class contains a dynamic array of object IDs that are the
objects in the group.
def __reduce__(self) -> Any:
def allEntityIds(self) -> list[PyDb.ObjectId]:
This method fills in the id's array with the objectIds of the entities in the group.
Returns the number of entities in a group.
def append(self, id: PyDb.ObjectId | list[PyDb.ObjectId]) -> None:
This function appends the objects whose objectIds are in the ids array to the group.
def cast(otherObject: PyRx.RxObject) -> Group:
def className() -> str:
def clear(self) -> None:
This methods resets or clears the contents of a group. After this method is called the
group contains no elements. All other settings in the group remain unchanged (for example,
name, description, colorIndex, etc.). Returns Acad::eOk if successful.
def cloneFrom(otherObject: PyRx.RxObject) -> Group:
def desc() -> PyRx.RxClass:
Returns a pointer to the AcRxClass object representing the specific class, or most recent
parent class explicitly registered with ObjectARX of either the pointer type used to invoke
it or the class qualifier used with it. (Remember that when a static member function is
invoked via a pointer, the pointer type, not the object type, determines which
implementation of the function is invoked.) When working with a pointer to an object and
the proper AcRxClass object for the class of the object pointed to is desired, the
AcRxObject::isA() function should be used, since it is a virtual non-static method and is
therefore not pointer type dependent. Caching the value of the pointer returned by this
method is acceptable, provided the application knows that the AcRxClass object pointed to
by the returned pointer was created by an ObjectARX application that will not be unloaded.
def description(self) -> str:
Returns a pointer to the group description string. The description can be changed using the
AcDbGroup::setDescription() member function. WarningAs the const qualifier indicates, no
attempt should be made to deallocate the returned string.
def getIndex(self, id: PyDb.ObjectId) -> int:
This method sets idx to the index value in the group of the object with objectIdid. Returns
Acad::eOk if successful.
def getName(self) -> str:
Gets the group's name into the caller's AcString.
def has(self, entity: PyDb.Entity) -> bool:
This method will look for the entity pointed to by pEntity. It returns true if pEntity is
present in the group or false if pEntity is not part of the group.
def insertAt(self, index: int, id: PyDb.ObjectId | list[PyDb.ObjectId]) -> None:
Inserts the objects whose objectIds are in the ids array into the group just after the
entry at index idx. The indices are zero based. Hence the first element in the group will
have an index of 0. Returns Acad::eOk if successful. If any of the objects are already in
the group, then none of the objects whose objectIds are in the ids array are appended and
Acad::eAlreadyInGroup is returned. If any of the objects are not entities, then none of the
objects whose objectIds are in the ids array are appended and Acad::eNotAnEntity is
returned. If idx is an invalid index, then Acad::eInvalidIndex is returned.
def isAnonymous(self) -> bool:
This method returns true if the group is an anonymous group, otherwise false is returned
def isNotAccessible(self) -> bool:
This method returns true if the group is marked as inaccessible, otherwise returns false.
Currently, only groups in Xrefs are marked as inaccessible.
def isSelectable(self) -> bool:
Returns a Boolean indicating whether the group is selectable. A value of true indicates
that the group (as a whole) is selectable. A return value of false means that individual
entities in the group will be selected.
def numEntities(self) -> int:
Returns the number of entities in the group.
def objectIds(self) -> list[PyDb.ObjectId]:
def prepend(self, id: PyDb.ObjectId | list[PyDb.ObjectId]) -> None:
This function prepends the objects whose objectIds are in the ids array to the group.
def remove(self, id: PyDb.ObjectId | list[PyDb.ObjectId]) -> None:
Removes from the group, all objects whose object IDs are in the ids array. Returns
Acad::eOk if successful. If any of the objects are not in the group, then none of the
objects whose objectIds are in the ids array are removed and Acad::eNotInGroup is returned.
def removeAt(self, index: int, id: PyDb.ObjectId | list[PyDb.ObjectId]) -> None:
This is removeAt, a member of class AcDbGroup.
def replace(self, oldid: PyDb.ObjectId, newid: PyDb.ObjectId) -> None:
This function replaces the oldId entity with the newId entity in the group. Returns
Acad::eOk if successful. If the oldId is not in the group, then Acad::eNotInGroup is
returned. If the newId is already in the group, then Acad::eAlreadyInGroup is returned. If
the newId is not an entity, then Acad::eNotAnEntity is returned.
def reverse(self) -> None:
This method reverses the indices of all the objects in the group. The first object in the
group will become the last object in the group, and so on. Returns Acad::eOk if successful.
def setAnonymous(self) -> None:
This method sets the group to be anonymous. The group's current name will be replaced by an
automatically generated anonymous group name. Returns Acad::eOk if successful.
def setColor(self, clr: PyDb.AcCmColor) -> None:
All the entities in the group will be set to the color specified by color. Returns
Acad::eOk if successful.
def setColorIndex(self, clr: int) -> None:
All the entities in the group will be set to the color specified by color. Returns
Acad::eOk if successful.
def setDescription(self, grpDesc: str) -> None:
AcDbGroup::setDescription
def setHighlight(self, val: bool) -> None:
If newVal == true, then all entities in the group will be highlighted. If newVal == false,
then all entities in the group will be unhighlighted. Returns Acad::eOk if successful.
def setLayer(self, id: str | PyDb.ObjectId) -> None:
Sets the LayerTableRecord with name newVal to be the layer for all entities in the group.
If the layer specified by newVal exists, the entities will be modified to reference that
layer. If the layer does not exist, a layer of name newVal is created before modifying the
entities. Returns Acad::eOk if successful.
def setLinetype(self, id: str | PyDb.ObjectId) -> None:
Sets the LinetypeTableRecord with name newVal to be the line type for all entities in the
group. This function will succeed only if the specified linetype is already loaded. Returns
Acad::eOk if successful.
def setLinetypeScale(self, val: float) -> None:
Sets the line type scale to newVal for all entities in the group. Returns Acad::eOk if
successful.
def setMaterial(self, id: str | PyDb.ObjectId) -> None:
Sets the material for this group.
def setName(self, val: str) -> None:
Sets a copy of newName as the name for the group. If newName's first character is a '*',
then the group will be set to be anonymous and all characters after the '*' in newName will
be ignored. If the first character in newName is not a '*', the name change is successful,
and the group is currently anonymous, then the group will also be changed to not be
anonymous. Returns Acad::eOk if successful.
def setSelectable(self, val: bool) -> None:
If selectable == true, then the entire group is selected and manipulated as one unit.
selectable == false allows users to manipulate individual entities within the group.
Returns Acad::eOk if successful.
def setVisibility(self, val: PyDb.Visibility) -> None:
Sets the visibility to newVal for all entities in the group. Returns Acad::eOk if
successful.
def transfer(self, fromIndex: int, valtoIndex: int, numItems: int) -> None:
Starting with the item at index fromIndex and going upwards in index values, this function
transfers numItems from the index fromIndex to the index toIndex. This method enables users
to re-arrange ranges of items within a group. Returns Acad::eOk if successful. If there are
no numItems of objects at and above fromIndex, then no transfer takes place and
Acad::eInvalidInput is returned.
class Handle Class
def __getinitargs__(self) -> tuple:
def __hash__(self) -> int:
def __init__(self) -> None:
def __init__(self, low: int, high: int) -> None:
def __init__(self, strVal: str) -> None:
def __init__(self, int64Val: int) -> None:
def __init__(*args) -> None:
def __ne__(self) -> bool:
def __reduce__(self) -> Any:
def decrement(self) -> None:
def high(self) -> int:
def increment(self) -> None:
def isNull(self) -> bool:
def isOne(self) -> bool:
def low(self) -> int:
def setHigh(self, val: int) -> None:
def setLow(self, val: int) -> None:
def setNull(self) -> None:
def setValue(self, val: int) -> None:
def toString(self) -> str:
def value(self) -> int:
class HardOwnershipId Class
def __init__(self, id: PyDb.ObjectId) -> None:
def __reduce__(self) -> Any:
class HardPointerId Class
def __init__(self, id: PyDb.ObjectId) -> None:
def __reduce__(self) -> Any:
class Hatch Class
def __init__(self) -> None:
AcDbHatch is a planar entity that can be created and placed in an arbitrary plane in 3D
space. The hatch plane can be uniquely defined by a normal vector in WCS (World Coordinate
System) and an elevation indicating the distance from the WCS origin to the hatch plane.
The hatch plane adopts a standard AutoCAD object coordinate system (OCS). Its origin
coincides with the WCS origin and its X and Y axes are calculated using the arbitrary axis
algorithm. The hatch boundary defines the area to be filled with the specified hatch
pattern. The internal representation of the hatch boundary consists of a set of planar
loops. Each loop is made of a collection of 2D edges of line, circular arc, elliptic arc
and spline. If the hatch boundary contains two or more loops, the areas enclosed by
individual loops must be completely disjoint or one will completely enclose the other. A
loop must be simple, closed, and continuous, intersecting itself only at its endpoints.
Furthermore, its start point and end point must coincide. When defining the hatch boundary,
the application must ensure that the loops and edges are well defined and structured. If
the boundary contains two or more loops, they must be organized into a nested structure in
which the external loop is constructed first, then followed by all its internal loops in
nested order. If there is more than one external loop, repeat the process. AutoCAD provides
limited validation of the hatch boundary in order to maintain API efficiency and
performance. The internal representations of hatch boundary edges are GELIB 2D geometry,
including AcGeLineSeg2d, AcGeCircArc2d, AcGeEllipArc2d and AcGeNurbCurve2d. If the hatch
boundary consists of a polyline, special methods are provided to construct the loop.
Associative hatching allows the application to create a hatch entity that is associative to
the boundaries of existing AutoCAD database entities, including LINE, ARC, CIRCLE, ELLIPSE,
SPLINE, POLYLINE, TEXT, MTEXT, ATTRIBUTE DEFINITION, ATTRIBUTE, SHAPE, SOLID, TRACE,
TOLERANCE, REGION, VIEWPORT, 3D FACE, BLOCK INSERT, XREF, LWPOLYLINE, RASTER etc. When you
edit the source geometry, the hatch entity will adapt to the changes automatically. When
using a custom entity, you must define an explode method in order for the hatching to work.
Your explode method should break your entity down into less complicated entities. When
defining a hatch boundary using existing database entities, the application must ensure
that the selected objects have a valid hatch boundary and are coplanar with the hatch
plane. The selected objects must also form well-defined loops. You also need to set the
associativity flag before you set the hatch boundary. insertLoopAt() and appendLoop()
methods will extract the geometry from database objects and maintain the database object
IDs with the loop structure for associative hatch. If the hatch boundary contains two or
more loops for a solid fill operation, the areas enclosed by the individual loops must be
completely disjoint or one will completely enclose the other. Also, each loop must be
simple, closed, and continuous, in which it intersects itself only at its endpoints. If the
hatch boundary does not meet these requirements, the results may be unpredictable and
inconsistent between the regular hatch and the solid fill pattern. Mlines are complex
entities that can produce more than one loop, which means they will be rejected as hatch
boundaries. If you use the AcDbHatch API and select an AcDbMline object to be hatched, no
hatching will be displayed, and appendloop() will return eInvalidInput. To work around
this, you can explode the mline, get the resulting edges, and produce loops from them. If
AcDbMline::explode() produces a set of edges that do not form a single closed loop, you can
create a region by using the edges to construct an AcDbRegion object. You can then explode
the region to get simple closed loops, and pass those loops to the AcDbHatch object. Your
application should check the return status of each API call and delete the hatch entity if
the status is eInvalidInput. Currently, AutoCAD supports three hatch pattern types that are
User-defined, Predefined, and Custom. See the HatchPatternType enum for more information.
The following methods enable the application to set and get hatch pattern-related data. If
you call AcDbHatch::setPatternScale() (or any of the pattern methods), the scale value
changes but the pattern does not change on the display. This is by design. You need to call
AcDbHatch::setPattern() after changing the pattern scale, angle, name, etc. One call to
this function is sufficient for all combinations of pattern changes. AutoCAD currently
supports three hatch styles, which are Normal, Outer, and Ignore. See the HatchStyle enum
for more information. The following methods provide the application to set and get hatch
style. These methods are provided for compatibility purposes; it is recommended to always
use Normal style. AcDbHatch::HatchStyle style() const;Acad::ErrorStatus
setStyle(AcDbHatch::HatchStyle hstyle); After defining the hatch boundary and specifying
the hatch pattern and style, the application must elaborate the hatch lines or solid fill
for display. The AcDbHatch class implementation maintains the computed hatch lines and
solid fill to support worldDraw() and viewportDraw() methods for hatch entity display.
However, the computed hatch lines and solid fill are not saved with the drawing or DXF
files for file size efficiency. Instead, AutoCAD recomputes the hatch lines or solid fill
when a DWG or DXF file is opened by AutoCAD. If the hatch boundary definition loops or
edges get changed or removed, the application must re-elaborate the hatch lines or solid
fill to update the display. The hatch boundary definition loops and edges are not
displayed. This should not present a problem because the hatch entity is always associative
with existing geometry in the AutoCAD database in most cases.
def __init__(self, id: PyDb.ObjectId) -> None:
AcDbHatch is a planar entity that can be created and placed in an arbitrary plane in 3D
space. The hatch plane can be uniquely defined by a normal vector in WCS (World Coordinate
System) and an elevation indicating the distance from the WCS origin to the hatch plane.
The hatch plane adopts a standard AutoCAD object coordinate system (OCS). Its origin
coincides with the WCS origin and its X and Y axes are calculated using the arbitrary axis
algorithm. The hatch boundary defines the area to be filled with the specified hatch
pattern. The internal representation of the hatch boundary consists of a set of planar
loops. Each loop is made of a collection of 2D edges of line, circular arc, elliptic arc
and spline. If the hatch boundary contains two or more loops, the areas enclosed by
individual loops must be completely disjoint or one will completely enclose the other. A
loop must be simple, closed, and continuous, intersecting itself only at its endpoints.
Furthermore, its start point and end point must coincide. When defining the hatch boundary,
the application must ensure that the loops and edges are well defined and structured. If
the boundary contains two or more loops, they must be organized into a nested structure in
which the external loop is constructed first, then followed by all its internal loops in
nested order. If there is more than one external loop, repeat the process. AutoCAD provides
limited validation of the hatch boundary in order to maintain API efficiency and
performance. The internal representations of hatch boundary edges are GELIB 2D geometry,
including AcGeLineSeg2d, AcGeCircArc2d, AcGeEllipArc2d and AcGeNurbCurve2d. If the hatch
boundary consists of a polyline, special methods are provided to construct the loop.
Associative hatching allows the application to create a hatch entity that is associative to
the boundaries of existing AutoCAD database entities, including LINE, ARC, CIRCLE, ELLIPSE,
SPLINE, POLYLINE, TEXT, MTEXT, ATTRIBUTE DEFINITION, ATTRIBUTE, SHAPE, SOLID, TRACE,
TOLERANCE, REGION, VIEWPORT, 3D FACE, BLOCK INSERT, XREF, LWPOLYLINE, RASTER etc. When you
edit the source geometry, the hatch entity will adapt to the changes automatically. When
using a custom entity, you must define an explode method in order for the hatching to work.
Your explode method should break your entity down into less complicated entities. When
defining a hatch boundary using existing database entities, the application must ensure
that the selected objects have a valid hatch boundary and are coplanar with the hatch
plane. The selected objects must also form well-defined loops. You also need to set the
associativity flag before you set the hatch boundary. insertLoopAt() and appendLoop()
methods will extract the geometry from database objects and maintain the database object
IDs with the loop structure for associative hatch. If the hatch boundary contains two or
more loops for a solid fill operation, the areas enclosed by the individual loops must be
completely disjoint or one will completely enclose the other. Also, each loop must be
simple, closed, and continuous, in which it intersects itself only at its endpoints. If the
hatch boundary does not meet these requirements, the results may be unpredictable and
inconsistent between the regular hatch and the solid fill pattern. Mlines are complex
entities that can produce more than one loop, which means they will be rejected as hatch
boundaries. If you use the AcDbHatch API and select an AcDbMline object to be hatched, no
hatching will be displayed, and appendloop() will return eInvalidInput. To work around
this, you can explode the mline, get the resulting edges, and produce loops from them. If
AcDbMline::explode() produces a set of edges that do not form a single closed loop, you can
create a region by using the edges to construct an AcDbRegion object. You can then explode
the region to get simple closed loops, and pass those loops to the AcDbHatch object. Your
application should check the return status of each API call and delete the hatch entity if
the status is eInvalidInput. Currently, AutoCAD supports three hatch pattern types that are
User-defined, Predefined, and Custom. See the HatchPatternType enum for more information.
The following methods enable the application to set and get hatch pattern-related data. If
you call AcDbHatch::setPatternScale() (or any of the pattern methods), the scale value
changes but the pattern does not change on the display. This is by design. You need to call
AcDbHatch::setPattern() after changing the pattern scale, angle, name, etc. One call to
this function is sufficient for all combinations of pattern changes. AutoCAD currently
supports three hatch styles, which are Normal, Outer, and Ignore. See the HatchStyle enum
for more information. The following methods provide the application to set and get hatch
style. These methods are provided for compatibility purposes; it is recommended to always
use Normal style. AcDbHatch::HatchStyle style() const;Acad::ErrorStatus
setStyle(AcDbHatch::HatchStyle hstyle); After defining the hatch boundary and specifying
the hatch pattern and style, the application must elaborate the hatch lines or solid fill
for display. The AcDbHatch class implementation maintains the computed hatch lines and
solid fill to support worldDraw() and viewportDraw() methods for hatch entity display.
However, the computed hatch lines and solid fill are not saved with the drawing or DXF
files for file size efficiency. Instead, AutoCAD recomputes the hatch lines or solid fill
when a DWG or DXF file is opened by AutoCAD. If the hatch boundary definition loops or
edges get changed or removed, the application must re-elaborate the hatch lines or solid
fill to update the display. The hatch boundary definition loops and edges are not
displayed. This should not present a problem because the hatch entity is always associative
with existing geometry in the AutoCAD database in most cases.
def __init__(self, id: PyDb.ObjectId, mode: PyDb.OpenMode) -> None:
AcDbHatch is a planar entity that can be created and placed in an arbitrary plane in 3D
space. The hatch plane can be uniquely defined by a normal vector in WCS (World Coordinate
System) and an elevation indicating the distance from the WCS origin to the hatch plane.
The hatch plane adopts a standard AutoCAD object coordinate system (OCS). Its origin
coincides with the WCS origin and its X and Y axes are calculated using the arbitrary axis
algorithm. The hatch boundary defines the area to be filled with the specified hatch
pattern. The internal representation of the hatch boundary consists of a set of planar
loops. Each loop is made of a collection of 2D edges of line, circular arc, elliptic arc
and spline. If the hatch boundary contains two or more loops, the areas enclosed by
individual loops must be completely disjoint or one will completely enclose the other. A
loop must be simple, closed, and continuous, intersecting itself only at its endpoints.
Furthermore, its start point and end point must coincide. When defining the hatch boundary,
the application must ensure that the loops and edges are well defined and structured. If
the boundary contains two or more loops, they must be organized into a nested structure in
which the external loop is constructed first, then followed by all its internal loops in
nested order. If there is more than one external loop, repeat the process. AutoCAD provides
limited validation of the hatch boundary in order to maintain API efficiency and
performance. The internal representations of hatch boundary edges are GELIB 2D geometry,
including AcGeLineSeg2d, AcGeCircArc2d, AcGeEllipArc2d and AcGeNurbCurve2d. If the hatch
boundary consists of a polyline, special methods are provided to construct the loop.
Associative hatching allows the application to create a hatch entity that is associative to
the boundaries of existing AutoCAD database entities, including LINE, ARC, CIRCLE, ELLIPSE,
SPLINE, POLYLINE, TEXT, MTEXT, ATTRIBUTE DEFINITION, ATTRIBUTE, SHAPE, SOLID, TRACE,
TOLERANCE, REGION, VIEWPORT, 3D FACE, BLOCK INSERT, XREF, LWPOLYLINE, RASTER etc. When you
edit the source geometry, the hatch entity will adapt to the changes automatically. When
using a custom entity, you must define an explode method in order for the hatching to work.
Your explode method should break your entity down into less complicated entities. When
defining a hatch boundary using existing database entities, the application must ensure
that the selected objects have a valid hatch boundary and are coplanar with the hatch
plane. The selected objects must also form well-defined loops. You also need to set the
associativity flag before you set the hatch boundary. insertLoopAt() and appendLoop()
methods will extract the geometry from database objects and maintain the database object
IDs with the loop structure for associative hatch. If the hatch boundary contains two or
more loops for a solid fill operation, the areas enclosed by the individual loops must be
completely disjoint or one will completely enclose the other. Also, each loop must be
simple, closed, and continuous, in which it intersects itself only at its endpoints. If the
hatch boundary does not meet these requirements, the results may be unpredictable and
inconsistent between the regular hatch and the solid fill pattern. Mlines are complex
entities that can produce more than one loop, which means they will be rejected as hatch
boundaries. If you use the AcDbHatch API and select an AcDbMline object to be hatched, no
hatching will be displayed, and appendloop() will return eInvalidInput. To work around
this, you can explode the mline, get the resulting edges, and produce loops from them. If
AcDbMline::explode() produces a set of edges that do not form a single closed loop, you can
create a region by using the edges to construct an AcDbRegion object. You can then explode
the region to get simple closed loops, and pass those loops to the AcDbHatch object. Your
application should check the return status of each API call and delete the hatch entity if
the status is eInvalidInput. Currently, AutoCAD supports three hatch pattern types that are
User-defined, Predefined, and Custom. See the HatchPatternType enum for more information.
The following methods enable the application to set and get hatch pattern-related data. If
you call AcDbHatch::setPatternScale() (or any of the pattern methods), the scale value
changes but the pattern does not change on the display. This is by design. You need to call
AcDbHatch::setPattern() after changing the pattern scale, angle, name, etc. One call to
this function is sufficient for all combinations of pattern changes. AutoCAD currently
supports three hatch styles, which are Normal, Outer, and Ignore. See the HatchStyle enum
for more information. The following methods provide the application to set and get hatch
style. These methods are provided for compatibility purposes; it is recommended to always
use Normal style. AcDbHatch::HatchStyle style() const;Acad::ErrorStatus
setStyle(AcDbHatch::HatchStyle hstyle); After defining the hatch boundary and specifying
the hatch pattern and style, the application must elaborate the hatch lines or solid fill
for display. The AcDbHatch class implementation maintains the computed hatch lines and
solid fill to support worldDraw() and viewportDraw() methods for hatch entity display.
However, the computed hatch lines and solid fill are not saved with the drawing or DXF
files for file size efficiency. Instead, AutoCAD recomputes the hatch lines or solid fill
when a DWG or DXF file is opened by AutoCAD. If the hatch boundary definition loops or
edges get changed or removed, the application must re-elaborate the hatch lines or solid
fill to update the display. The hatch boundary definition loops and edges are not
displayed. This should not present a problem because the hatch entity is always associative
with existing geometry in the AutoCAD database in most cases.
def __init__(self, id: PyDb.ObjectId, mode: PyDb.OpenMode, erased: bool) -> None:
AcDbHatch is a planar entity that can be created and placed in an arbitrary plane in 3D
space. The hatch plane can be uniquely defined by a normal vector in WCS (World Coordinate
System) and an elevation indicating the distance from the WCS origin to the hatch plane.
The hatch plane adopts a standard AutoCAD object coordinate system (OCS). Its origin
coincides with the WCS origin and its X and Y axes are calculated using the arbitrary axis
algorithm. The hatch boundary defines the area to be filled with the specified hatch
pattern. The internal representation of the hatch boundary consists of a set of planar
loops. Each loop is made of a collection of 2D edges of line, circular arc, elliptic arc
and spline. If the hatch boundary contains two or more loops, the areas enclosed by
individual loops must be completely disjoint or one will completely enclose the other. A
loop must be simple, closed, and continuous, intersecting itself only at its endpoints.
Furthermore, its start point and end point must coincide. When defining the hatch boundary,
the application must ensure that the loops and edges are well defined and structured. If
the boundary contains two or more loops, they must be organized into a nested structure in
which the external loop is constructed first, then followed by all its internal loops in
nested order. If there is more than one external loop, repeat the process. AutoCAD provides
limited validation of the hatch boundary in order to maintain API efficiency and
performance. The internal representations of hatch boundary edges are GELIB 2D geometry,
including AcGeLineSeg2d, AcGeCircArc2d, AcGeEllipArc2d and AcGeNurbCurve2d. If the hatch
boundary consists of a polyline, special methods are provided to construct the loop.
Associative hatching allows the application to create a hatch entity that is associative to
the boundaries of existing AutoCAD database entities, including LINE, ARC, CIRCLE, ELLIPSE,
SPLINE, POLYLINE, TEXT, MTEXT, ATTRIBUTE DEFINITION, ATTRIBUTE, SHAPE, SOLID, TRACE,
TOLERANCE, REGION, VIEWPORT, 3D FACE, BLOCK INSERT, XREF, LWPOLYLINE, RASTER etc. When you
edit the source geometry, the hatch entity will adapt to the changes automatically. When
using a custom entity, you must define an explode method in order for the hatching to work.
Your explode method should break your entity down into less complicated entities. When
defining a hatch boundary using existing database entities, the application must ensure
that the selected objects have a valid hatch boundary and are coplanar with the hatch
plane. The selected objects must also form well-defined loops. You also need to set the
associativity flag before you set the hatch boundary. insertLoopAt() and appendLoop()
methods will extract the geometry from database objects and maintain the database object
IDs with the loop structure for associative hatch. If the hatch boundary contains two or
more loops for a solid fill operation, the areas enclosed by the individual loops must be
completely disjoint or one will completely enclose the other. Also, each loop must be
simple, closed, and continuous, in which it intersects itself only at its endpoints. If the
hatch boundary does not meet these requirements, the results may be unpredictable and
inconsistent between the regular hatch and the solid fill pattern. Mlines are complex
entities that can produce more than one loop, which means they will be rejected as hatch
boundaries. If you use the AcDbHatch API and select an AcDbMline object to be hatched, no
hatching will be displayed, and appendloop() will return eInvalidInput. To work around
this, you can explode the mline, get the resulting edges, and produce loops from them. If
AcDbMline::explode() produces a set of edges that do not form a single closed loop, you can
create a region by using the edges to construct an AcDbRegion object. You can then explode
the region to get simple closed loops, and pass those loops to the AcDbHatch object. Your
application should check the return status of each API call and delete the hatch entity if
the status is eInvalidInput. Currently, AutoCAD supports three hatch pattern types that are
User-defined, Predefined, and Custom. See the HatchPatternType enum for more information.
The following methods enable the application to set and get hatch pattern-related data. If
you call AcDbHatch::setPatternScale() (or any of the pattern methods), the scale value
changes but the pattern does not change on the display. This is by design. You need to call
AcDbHatch::setPattern() after changing the pattern scale, angle, name, etc. One call to
this function is sufficient for all combinations of pattern changes. AutoCAD currently
supports three hatch styles, which are Normal, Outer, and Ignore. See the HatchStyle enum
for more information. The following methods provide the application to set and get hatch
style. These methods are provided for compatibility purposes; it is recommended to always
use Normal style. AcDbHatch::HatchStyle style() const;Acad::ErrorStatus
setStyle(AcDbHatch::HatchStyle hstyle); After defining the hatch boundary and specifying
the hatch pattern and style, the application must elaborate the hatch lines or solid fill
for display. The AcDbHatch class implementation maintains the computed hatch lines and
solid fill to support worldDraw() and viewportDraw() methods for hatch entity display.
However, the computed hatch lines and solid fill are not saved with the drawing or DXF
files for file size efficiency. Instead, AutoCAD recomputes the hatch lines or solid fill
when a DWG or DXF file is opened by AutoCAD. If the hatch boundary definition loops or
edges get changed or removed, the application must re-elaborate the hatch lines or solid
fill to update the display. The hatch boundary definition loops and edges are not
displayed. This should not present a problem because the hatch entity is always associative
with existing geometry in the AutoCAD database in most cases.
def __init__(*args) -> None:
AcDbHatch is a planar entity that can be created and placed in an arbitrary plane in 3D
space. The hatch plane can be uniquely defined by a normal vector in WCS (World Coordinate
System) and an elevation indicating the distance from the WCS origin to the hatch plane.
The hatch plane adopts a standard AutoCAD object coordinate system (OCS). Its origin
coincides with the WCS origin and its X and Y axes are calculated using the arbitrary axis
algorithm. The hatch boundary defines the area to be filled with the specified hatch
pattern. The internal representation of the hatch boundary consists of a set of planar
loops. Each loop is made of a collection of 2D edges of line, circular arc, elliptic arc
and spline. If the hatch boundary contains two or more loops, the areas enclosed by
individual loops must be completely disjoint or one will completely enclose the other. A
loop must be simple, closed, and continuous, intersecting itself only at its endpoints.
Furthermore, its start point and end point must coincide. When defining the hatch boundary,
the application must ensure that the loops and edges are well defined and structured. If
the boundary contains two or more loops, they must be organized into a nested structure in
which the external loop is constructed first, then followed by all its internal loops in
nested order. If there is more than one external loop, repeat the process. AutoCAD provides
limited validation of the hatch boundary in order to maintain API efficiency and
performance. The internal representations of hatch boundary edges are GELIB 2D geometry,
including AcGeLineSeg2d, AcGeCircArc2d, AcGeEllipArc2d and AcGeNurbCurve2d. If the hatch
boundary consists of a polyline, special methods are provided to construct the loop.
Associative hatching allows the application to create a hatch entity that is associative to
the boundaries of existing AutoCAD database entities, including LINE, ARC, CIRCLE, ELLIPSE,
SPLINE, POLYLINE, TEXT, MTEXT, ATTRIBUTE DEFINITION, ATTRIBUTE, SHAPE, SOLID, TRACE,
TOLERANCE, REGION, VIEWPORT, 3D FACE, BLOCK INSERT, XREF, LWPOLYLINE, RASTER etc. When you
edit the source geometry, the hatch entity will adapt to the changes automatically. When
using a custom entity, you must define an explode method in order for the hatching to work.
Your explode method should break your entity down into less complicated entities. When
defining a hatch boundary using existing database entities, the application must ensure
that the selected objects have a valid hatch boundary and are coplanar with the hatch
plane. The selected objects must also form well-defined loops. You also need to set the
associativity flag before you set the hatch boundary. insertLoopAt() and appendLoop()
methods will extract the geometry from database objects and maintain the database object
IDs with the loop structure for associative hatch. If the hatch boundary contains two or
more loops for a solid fill operation, the areas enclosed by the individual loops must be
completely disjoint or one will completely enclose the other. Also, each loop must be
simple, closed, and continuous, in which it intersects itself only at its endpoints. If the
hatch boundary does not meet these requirements, the results may be unpredictable and
inconsistent between the regular hatch and the solid fill pattern. Mlines are complex
entities that can produce more than one loop, which means they will be rejected as hatch
boundaries. If you use the AcDbHatch API and select an AcDbMline object to be hatched, no
hatching will be displayed, and appendloop() will return eInvalidInput. To work around
this, you can explode the mline, get the resulting edges, and produce loops from them. If
AcDbMline::explode() produces a set of edges that do not form a single closed loop, you can
create a region by using the edges to construct an AcDbRegion object. You can then explode
the region to get simple closed loops, and pass those loops to the AcDbHatch object. Your
application should check the return status of each API call and delete the hatch entity if
the status is eInvalidInput. Currently, AutoCAD supports three hatch pattern types that are
User-defined, Predefined, and Custom. See the HatchPatternType enum for more information.
The following methods enable the application to set and get hatch pattern-related data. If
you call AcDbHatch::setPatternScale() (or any of the pattern methods), the scale value
changes but the pattern does not change on the display. This is by design. You need to call
AcDbHatch::setPattern() after changing the pattern scale, angle, name, etc. One call to
this function is sufficient for all combinations of pattern changes. AutoCAD currently
supports three hatch styles, which are Normal, Outer, and Ignore. See the HatchStyle enum
for more information. The following methods provide the application to set and get hatch
style. These methods are provided for compatibility purposes; it is recommended to always
use Normal style. AcDbHatch::HatchStyle style() const;Acad::ErrorStatus
setStyle(AcDbHatch::HatchStyle hstyle); After defining the hatch boundary and specifying
the hatch pattern and style, the application must elaborate the hatch lines or solid fill
for display. The AcDbHatch class implementation maintains the computed hatch lines and
solid fill to support worldDraw() and viewportDraw() methods for hatch entity display.
However, the computed hatch lines and solid fill are not saved with the drawing or DXF
files for file size efficiency. Instead, AutoCAD recomputes the hatch lines or solid fill
when a DWG or DXF file is opened by AutoCAD. If the hatch boundary definition loops or
edges get changed or removed, the application must re-elaborate the hatch lines or solid
fill to update the display. The hatch boundary definition loops and edges are not
displayed. This should not present a problem because the hatch entity is always associative
with existing geometry in the AutoCAD database in most cases.
def __reduce__(self) -> Any:
def appendLoop(self, loopType: int, ids: list[PyDb.ObjectId]) -> None:
This function appends a new boundary loop (path) to the hatch entity. loopType specifies
the type for the loop, which is an enum number of kDefault or kExternal. edgePtrs is a set
of voided AcGeCurve pointers, including AcGeLineSeg2d, AcGeCircArc2d, AcGeEllipArc2d, and
AcGeNurbCurve2d. edgeTypes is a set of enumerated edge types, including kLine, kCirArc,
kEllArc, and kSpline. edgePtrs and edgeTypes must be correspondent and have the same array
length. This function returns Acad::eOk when successful or Acad::eInvalidInput when failed.
def appendLoopBulges(self, loopType: int, vertices: list, bulges: list) -> None:
This function appends a new boundary loop (path) to the hatch entity. loopType specifies
the type for the loop, which is an enum number of kDefault or kExternal. edgePtrs is a set
of voided AcGeCurve pointers, including AcGeLineSeg2d, AcGeCircArc2d, AcGeEllipArc2d, and
AcGeNurbCurve2d. edgeTypes is a set of enumerated edge types, including kLine, kCirArc,
kEllArc, and kSpline. edgePtrs and edgeTypes must be correspondent and have the same array
length. This function returns Acad::eOk when successful or Acad::eInvalidInput when failed.
def appendLoopEdges(self, loopType: int, edges: list, edgeTypes: list) -> None:
This function appends a new boundary loop (path) to the hatch entity. loopType specifies
the type for the loop, which is an enum number of kDefault or kExternal. edgePtrs is a set
of voided AcGeCurve pointers, including AcGeLineSeg2d, AcGeCircArc2d, AcGeEllipArc2d, and
AcGeNurbCurve2d. edgeTypes is a set of enumerated edge types, including kLine, kCirArc,
kEllArc, and kSpline. edgePtrs and edgeTypes must be correspondent and have the same array
length. This function returns Acad::eOk when successful or Acad::eInvalidInput when failed.
def associative(self) -> bool:
This function returns true or false depending on whether this hatch entity is associative
with its source boundary geometries. The source boundary geometries must be AutoCAD
database-resident entities such as AcDbLine, AcDbArc, etc. Using an associative hatch
provides automatic re-calculation of the hatch lines when you modify the source boundary
geometries.
def backgroundColor(self) -> Color:
This function returns the full true background color information for the hatch entity
within an instance of AcCmColor
def cast(otherObject: PyRx.RxObject) -> Hatch:
def className() -> str:
def cloneFrom(otherObject: PyRx.RxObject) -> Hatch:
def desc() -> PyRx.RxClass:
Returns a pointer to the AcRxClass object representing the specific class, or most recent
parent class explicitly registered with ObjectARX of either the pointer type used to invoke
it or the class qualifier used with it. (Remember that when a static member function is
invoked via a pointer, the pointer type, not the object type, determines which
implementation of the function is invoked.) When working with a pointer to an object and
the proper AcRxClass object for the class of the object pointed to is desired, the
AcRxObject::isA() function should be used, since it is a virtual non-static method and is
therefore not pointer type dependent. Caching the value of the pointer returned by this
method is acceptable, provided the application knows that the AcRxClass object pointed to
by the returned pointer was created by an ObjectARX application that will not be unloaded.
def elevation(self) -> float:
This function returns the elevation for the hatch entity. elevation defines the distance
from the WCS origin to the hatch plane.
def evaluateGradientColorAt(self, val: float) -> Color:
This method provides a way to evaluate the interpolated color that the current gradient
definition and colors will produce at a specified location along the gradient. The point of
evaluation is indicated by the argument value. Returns Acad::eOk if the operation is
successful. Returns Acad::eNotApplicable if the object is currently a classic hatch.
def evaluateHatch(self, val: bool) -> None:
This function evaluates the hatch lines or solid fill for the hatch entity using the
specified hatch pattern. For regular hatch patterns, except for solid, this function
performs intersection calculations between pattern definition lines and hatch boundary
curves to form hatch lines. For a solid fill hatch pattern, this function performs
triangulation of the hatch area and fills in the triangular meshes with the given color.
This function returns Acad::eOk when successful. Returns Acad::eHatchTooDense if the number
of hatch lines is very high (above 100,000). Otherwise, it returns Acad::eInvalidInput.
def evaluateHatchAllScales(self, val: bool) -> None:
This is evaluateHatchAllScales, a member of class AcDbHatch.
def getArea(self) -> float:
Gets the area of the hatch entity. Returns Acad::eOk if the area was successfully
calculated.
def getAssocObjIds(self) -> list[PyDb.ObjectId]:
This function gets all the object IDs of the source boundary geometries associative to the
hatch entity. dbObjIds contains a set of AcDbObjectIds associative to the hatch entity.
dbObjIds may be an empty set if the hatch entity is not associative. This function always
returns Acad::eOk.
def getAssocObjIdsAt(self, val: int) -> list[PyDb.ObjectId]:
This function gets the object IDs of the source boundary geometries associative to the
selected loop. This function returns Acad::eOk when successful and Acad::eInvalidIndex if
the specified loopIndex is out of range.
def getGradientColors(self) -> tuple[list[PyDb.Color], list[float]]:
This method returns the colors and interpolation values describing how the gradient fill
definition will be applied. The gradient will transition from colors[0] to colors[count-1].
In the current implementation, count is always two. The values array is a list of floating
point values, normalized to the range [0.0f...1.0f]. These values determine the speed of
the transition from the starting color, (values[0]==0.0f), to the ending color,
(values[1]==1.0f). The elements values[0] and values[1] are always 0.0f and 1.0f,
respectively. The calling application should make copies of the colors and values arrays if
it wishes to use them. Returns Acad::eOk if the operation is successful. Returns
Acad::eNotApplicable if the object is currently a classic hatch.
def getGradientOneColorMode(self) -> bool:
This function determines whether the gradient hatch is transitioning from a start to a stop
color (two-color) or from a color to an adjusted luminance version of the same color
(one-color). In the latter case, the full luminance version is the 'tint' and the zero
luminance version is the 'shade.' Returns true if the object is using one color. Returns
false otherwise.
def getHatchLineDataAt(self, val: int) -> tuple[PyGe.Point2d, PyGe.Point2d]:
This function gets the hatch line data from the hatch entity. This function returns
Acad::eOk when successful. It returns Acad::eInvalidIndex when the index is out of range,
or Acad::eNotApplicable if the current object type is gradient.
def getHatchLinesData(self) -> tuple[list[PyGe.Point2d], list[PyGe.Point2d]]:
This function gets the hatch line data from the hatch entity. startPts is an AcGePoint2d
array containing the start points of all hatch lines. endPts is an AcGePoint2d array
containing the endpoints of all hatch lines. startPts and endPts must be correspondent and
have the same length. For example, startPts[0] and endPts[0] define the start point and
endpoint of the first hatch line. This function returns Acad::eNotApplicable if the current
object type is gradient. Normally, it returns Acad::eOk.
def getLoopBulgesAt(self, val: int) -> tuple:
This function gets the loop definition data (path) of a selected hatch boundary loop from
the hatch entity. loopIndex specifies the index of the selected loop. loopType is an enum
number which may be either kDefault, kExternal, kPolyline, kDerived, kTextbox, or their
bitwise combinations. edgePtrs contains a set of voided AcGeCurve pointers, including
AcGeLineSeg2d, AcGeCircArc2d, AcGeEllipArc2d, and AcGeNurbCurve2d. edgeTypes contains a set
of enumerated edge types, including kLine, kCirArc, kEllArc, and kSpline. edgePtrs and
edgeTypes must be correspondent and have the same array length. This function returns
Acad::eOk when successful or Acad::eInvalidIndex when the loopIndex is out of the range. It
may also return Acad::eNotApplicable when the loopType is a kPolyline.
def getLoopEdgesAt(self, val: int) -> tuple:
This function gets the loop definition data (path) of a selected hatch boundary loop from
the hatch entity. loopIndex specifies the index of the selected loop. loopType is an enum
number which may be either kDefault, kExternal, kPolyline, kDerived, kTextbox, or their
bitwise combinations. edgePtrs contains a set of voided AcGeCurve pointers, including
AcGeLineSeg2d, AcGeCircArc2d, AcGeEllipArc2d, and AcGeNurbCurve2d. edgeTypes contains a set
of enumerated edge types, including kLine, kCirArc, kEllArc, and kSpline. edgePtrs and
edgeTypes must be correspondent and have the same array length. This function returns
Acad::eOk when successful or Acad::eInvalidIndex when the loopIndex is out of the range. It
may also return Acad::eNotApplicable when the loopType is a kPolyline.
def getPatternDefinitionAt(self, val: int) -> tuple:
This function gets the pattern definition line data from the hatch entity at the selected
pattern line. index specifies the number at which the pattern line data will be returned.
angle, baseX, baseY, offsetX, offsetY, and dashes compose the pattern definition line data.
This function returns Acad::eNotApplicable if the current object type is gradient.
Normally, it returns Acad::eOk.
def getRegionArea(self) -> Region:
This function creates a region representing the hatch area from the boundary loops of the
hatch. Returns null if the hatch entity does not have a closed boundary, or if the region
cannot be created for any other reason.
def getShadeTintValue(self) -> float:
Returns a value in the range 0.0 to 1.0, where 0.0 corresponds to a luminance of 0 and 1.0
corresponds to full luminance. If the gradient is using one-color mode, this function gets
the luminance value applied to the first color.
def gradientAngle(self) -> float:
Returns the angle, in radians, at which the current gradient definition is applied.
def gradientName(self) -> str:
Returns the name of the current gradient. The caller should make a copy of the returned
string if it wishes to make further use of it. The caller should not free the returned
pointer.
def gradientShift(self) -> float:
Returns the current interpolation value between the gradient definition's default and
shifted values. The default is 0.0f.
def gradientType(self) -> HatchGradientPatternType:
This function returns an enumerator specifying the type of the gradient pattern. Possible
return values are kPreDefinedGradient (the default) and kUserDefinedGradient.
def hatchObjectType(self) -> HatchObjectType:
This function returns the current state of the gradient object. Possible return values are
kHatchObject (the default) and kGradientObject.
def hatchStyle(self) -> HatchStyle:
This function returns the hatch style of the hatch entity. The hatch style is an enumerated
number of kNormal, kOuter, or kIgnore.
def insertLoopAt(self, idx: int, loopType: int, ids: list[PyDb.ObjectId]) -> None:
This function inserts a new boundary loop (path) to the hatch entity. loopIndex specifies
the index at which the loop will be inserted into the boundary loop list. loopType
specifies the type for the loop which is an enum number of kDefault or kExternal. edgePtrs
defines a set of voided AcGeCurve pointers, including AcGeLineSeg2d, AcGeCircArc2d,
AcGeEllipArc2d, and AcGeNurbCurve2d. edgeTypes contains a set of enumerated edge types,
including kLine, kCirArc, kEllArc, and kSpline. edgePtrs and edgeTypes must be
correspondent and have the same array length. This function returns Acad::eOk when
successful. Otherwise, it returns Acad::eInvalidInput.
def isGradient(self) -> bool:
This 'convenience' method wraps the AcDbHatch::hatchObjectType() method. Returns
Adesk::kTrue if the AcDbHatch object is a gradient. Otherwise, this method returns
Adesk::kFalse.
def isHatch(self) -> bool:
This 'convenience' method wraps the AcDbHatch::hatchObjectType() method. Returns
Adesk::kTrue if the AcDbHatch object is a hatched pattern as opposed to a solid or gradient
fill pattern.
def isSolidFill(self) -> bool:
This method returns true if the hatch object is configured for solid fill. Otherwise, it
returns false.
def lineGenerationEnabled(self) -> bool:
Returns a Boolean value indicating whether line generation is enabled.
def normal(self) -> PyGe.Vector3d:
This function returns the normal vector of the hatch entity. The normal vector is expressed
in WCS and normalized to unit length.
def numHatchLines(self) -> int:
This function returns the total number of hatch lines contained in the hatch entity. The
hatch lines are calculated by the function evaluateHatch(). It returns 0 if the hatch
pattern is SOLID.
def numLoops(self) -> int:
This function returns the total number of boundary loops contained in the hatch entity.
Boundary loops define the area to be hatched.
def numPatternDefinitions(self) -> int:
This function returns the total number of pattern definition lines contained in the pattern
of the hatch entity. Each pattern definition line contains data such as angle, baseX,
baseY, offsetX, offsetY, and dashes.
def originPoint(self) -> PyGe.Point2d:
Returns the origin point for the hatch pattern of this hatch entity. The returned point is
expressed in WCS coordinates.
def patternAngle(self) -> float:
This function returns the pattern angle (in radians) of the hatch entity.
def patternDouble(self) -> bool:
This function returns the value of double pattern flag for the hatch entity. patternDouble
applies a second set of hatch lines at 90 degrees to the original hatch lines. This
function is used for kUserDefined pattern type only. It always returns false for
kPreDefined and kCustomDefined pattern types.
def patternName(self) -> str:
def patternScale(self) -> float:
This function returns the pattern scale of the hatch entity. patternScale is a non-zero
positive number. This function is used for kPreDefined and kCustomDefined pattern types
only.
def patternSpace(self) -> float:
This function returns the pattern space of the hatch entity. patternSpace is the distance
between two parallel hatch lines. This function is used for the kUserDefined pattern type
only.
def patternType(self) -> HatchPatternType:
This function returns an enumerated pattern type of either kUserDefined, kPreDefined, or
kCustomDefined for the hatch entity.
def removeAssocObjIds(self) -> None:
This function removes all the object IDs of the source boundary geometries associative to
the hatch entity. This function always returns Acad::eOk.
def removeHatchLines(self) -> None:
This function removes the hatch lines of non-solid and non-gradient hatches.
def removeLoopAt(self, idx: int) -> None:
This function removes a loop and its data from the hatch entity. It returns Acad::eOk when
successful and Acad::eInvalidIndex if loopIndex is out of range.
def setAssociative(self, val: bool) -> None:
This function sets the associativity flag to true or false for the hatch entity. To create
an associative hatch entity, you must use this function and set the associativity flag to
true before you begin to build the boundary loops using the appendLoop(loopType, dbObjIds)
or insertLoopAt(loopIndex, loopType, dbObjIds) functions. This function always returns
Acad::eOk.
def setBackgroundColor(self, val: PyDb.AcCmColor) -> None:
This function sets the hatch's background color to the color specified by color.
def setElevation(self, val: float) -> None:
This function sets the elevation for the hatch entity. The function always returns
Acad::eOk.
def setGradient(self, val: PyDb.HatchGradientPatternType, name: str) -> None:
This method provides the mechanism for specifying the shape definition of the gradient
fill. gradType may be either kPreDefinedGradient or kUserDefinedGradient, but currently
only predefined gradient definitions are supported. Valid values for gradName are LINEAR,
CYLINDER, INVCYLINDER, SPHERICAL, INVSPHERICAL, HEMISPHERICAL, INVHEMISPHERICAL, CURVED,
and INVCURVED. After this call is made, the object's type will be kGradientObject. Returns
Acad::eOk if the operation is successful. Returns Acad::eInvalidInput if the length of
gradName is greater than GRADIENT_PATTERN_NAME_LENGTH - 1 characters. Returns
Acad::eInvalidInput if the gradient name could not be found. Returns
Acad::eNotImplementedYet if gradType is kUserDefinedGradient.
def setGradientAngle(self, val: float) -> None:
Sets the angle, in radians, at which the gradient definition will be applied. Returns
Acad::eOK if the operation is successful. Returns Acad::eNotApplicable if the object is
currently a classic hatch.
def setGradientColors(self, colors: list, values: list) -> None:
This method provides the mechanism for defining the colors to be applied to the gradient
definition. In the simplest case, the color definition consists of the starting and ending
color. The start color maps to colors[0] and the stop color maps to colors[count-1]. The
current implementation supports only a count value of 2. The AcDbHatch object makes a copy
of the arrays provided as arguments. It is the caller's responsibility to free the colors
and values arrays. Returns Acad::eOk if the operation is successful. Returns
Acad::eNotApplicable if the object is currently a classic hatch. Returns Acad::eBadColor if
the colors are not of the color method AcCmEntityColor::kByColor or kByACI. Returns
Acad::eInvalidInput if any member of the values array is not in the range [0.0f .. 1.0f].
Returns Acad::eInvalidInput if count is less than 2. Returns Acad::eInvalidInput if
values[0] != 0.0f. Returns Acad::eInvalidInput if values[count-1] != 1.0f. Returns
Acad::eNotImplementedYet if count is greater than 2. Returns Acad::eOutOfMemory if an
allocation error occurs.
def setGradientOneColorMode(self, val: bool) -> None:
This function sets the gradient hatch to transition either from a start to a stop color
(two-color) or from a color to an adjusted luminance version of the same color (one-color).
In the latter case, the full luminance version is the 'tint' and the zero luminance version
is the 'shade.' Returns Acad::eOk if successful.
def setGradientShift(self, val: float) -> None:
This method sets the interpolation value between the gradient definition's default and
shifted values. A value of 0.0 evaluates as a fully unshifted gradient. A value of 1.0
evaluates as a fully shifted gradient. Returns Acad::eOk if the operation is successful.
Returns Acad::eInvalidInput if shiftValue is not in the range [0.0...1.0]. Returns
Acad::eNotApplicable if the object is currently a classic hatch.
def setHatchObjectType(self, val: PyDb.HatchObjectType) -> None:
Returns Acad::eOK if the operation is successful.
def setHatchStyle(self, val: PyDb.HatchStyle) -> None:
This function sets the hatch style for the hatch entity. hstyle specifies the new hatch
style, which must be an enumerated number of either kNormal, kOuter, or kIgnore. This
function returns Acad::eNotApplicable if the current object type is gradient. Otherwise, it
returns Acad::eOk.
def setLineGenerationEnabled(self, val: bool) -> bool:
Enable or disable line generation.
def setNormal(self, val: PyGe.Vector3d) -> None:
This function sets the normal vector for the hatch entity. The normal vector must be
expressed in WCS and normalized to unit length.
def setOriginPoint(self, val: PyGe.Point2d) -> None:
This function sets pt to be the origin point for the hatch pattern of the hatch entity.
Returns Acad::eOk if successful.
def setPattern(self, val: PyDb.HatchPatternType, name: str) -> None:
This function sets both pattern type and pattern name for hatch entity. patType specifies
an enumerated number of either kUserDefined, kPreDefined, or kCustomDefined. patName is the
name of the pattern, which may be set to NULL for kUserDefined pattern type. For the
kUserDefined pattern type, you may need to use setPatternAngle(angle),
setPatternSpace(space), and setPatternDouble(double) to define pattern data before you call
this function. For the kPreDefined pattern type, this function will read in pattern data
from the AutoCAD standard hatch pattern file acad.pat and maintain it with the hatch
entity. For the kCustomDefined pattern type, you must supply your own PAT file, where the
name of the hatch pattern must match the name of the file. For instance, you must store the
TEST hatch pattern in a file named test.pat, and the file must be located in the ACAD
search path. When you use a pre-defined or custom-defined pattern, you can also specify a
scale and angle in order to modify the hatch's appearance. This function returns Acad::eOk
when successful. Otherwise, it returns the Acad::eInvalidInput.
def setPatternAngle(self, val: float) -> None:
This function sets the pattern angle for the hatch entity. angle specifies the angle in
radians. This function returns Acad::eNotApplicable if the current object type is gradient.
Otherwise, it returns Acad::eOk.
def setPatternDouble(self, val: bool) -> None:
This function sets the double pattern flag for the hatch entity. Double patterns apply a
second set of hatch lines at 90 degrees to the original hatch lines. This function is used
for the kUserDefined pattern type only. The double pattern flag is ignored for the
kPreDefined and kCustomDefined pattern types. This function returns Acad::eNotApplicable if
the current object type is gradient. Otherwise, it returns Acad::eOk.
def setPatternScale(self, val: float) -> None:
This function sets the pattern scale for the hatch entity. scale must be a non-zero and
positive number. It is used to set a scale applying to the original pattern definition for
the kPreDefined and kCustomDefined pattern types only. This function returns
Acad::eNotApplicable if the current object type is gradient. Otherwise, it returns
Acad::eOk.
def setPatternSpace(self, val: float) -> None:
This function sets the pattern space for the hatch entity. space is the distance between
two parallel hatch lines. It is used to define pattern data for the kUserDefined pattern
type only. This function returns Acad::eNotApplicable if the current object type is
gradient. Otherwise, it returns Acad::eOk.
def setShadeTintValue(self, val: float) -> None:
Sets the one-color tint shade (luminance) value. If the gradient is using one-color mode,
this function sets the luminance value applied to the first color. Returns Acad::eOk if
successful. Returns Acad::eInvalidInput if the input is out of range.
def setShadeTintValueAndColor2(self, val: float) -> None:
If the gradient is using one-color mode, this function sets the luminance value applied to
the first color and then uses the argument to calculate and set the second hatch gradient
color. Returns Acad::eOk if successful; returns Acad::eInvalidInput if the input is out of
range; returns Acad::eInvalidContext if the hatch is not set for color by shade tint or no
hatch colors have been set yet.
class HatchEdgeType Class
kLine: ClassVar[Self]
kCirArc: ClassVar[Self]
kEllArc: ClassVar[Self]
kSpline: ClassVar[Self]
class HatchGradientPatternType Class
kPreDefinedGradient: ClassVar[Self]
kUserDefinedGradient: ClassVar[Self]
class HatchLoopType Class
kDefault: ClassVar[Self]
kExternal: ClassVar[Self]
kPolyline: ClassVar[Self]
kDerived: ClassVar[Self]
kTextbox: ClassVar[Self]
kOutermost: ClassVar[Self]
kNotClosed: ClassVar[Self]
kSelfIntersecting: ClassVar[Self]
kTextIsland: ClassVar[Self]
kDuplicate: ClassVar[Self]
kIsAnnotative: ClassVar[Self]
kDoesNotSupportScale: ClassVar[Self]
kForceAnnoAllVisible: ClassVar[Self]
kOrientToPaper: ClassVar[Self]
kIsAnnotativeBlock: ClassVar[Self]
class HatchObjectType Class
kHatchObject: ClassVar[Self]
kGradientObject: ClassVar[Self]
class HatchPatternType Class
kUserDefined: ClassVar[Self]
kPreDefined: ClassVar[Self]
kCustomDefined: ClassVar[Self]
class HatchStyle Class
kNormal: ClassVar[Self]
kOuter: ClassVar[Self]
kIgnore: ClassVar[Self]
class Helix Class
def __init__(self, id: PyDb.ObjectId, mode: PyDb.OpenMode) -> None:
def __reduce__(self) -> Any:
def axisPoint(self) -> PyGe.Point3d:
def axisVector(self) -> PyGe.Vector3d:
def baseRadius(self) -> float:
def cast(otherObject: PyRx.RxObject) -> Helix:
def className() -> str:
def cloneFrom(otherObject: PyRx.RxObject) -> Helix:
def constrain(self) -> HelixConstrainType:
def createHelix(self) -> None:
def desc() -> PyRx.RxClass:
Returns a pointer to the AcRxClass object representing the specific class, or most recent
parent class explicitly registered with ObjectARX of either the pointer type used to invoke
it or the class qualifier used with it. (Remember that when a static member function is
invoked via a pointer, the pointer type, not the object type, determines which
implementation of the function is invoked.) When working with a pointer to an object and
the proper AcRxClass object for the class of the object pointed to is desired, the
AcRxObject::isA() function should be used, since it is a virtual non-static method and is
therefore not pointer type dependent. Caching the value of the pointer returned by this
method is acceptable, provided the application knows that the AcRxClass object pointed to
by the returned pointer was created by an ObjectARX application that will not be unloaded.
def height(self) -> float:
def reverseCurve(self) -> None:
def setAxisPoint(self, axisPoint: PyGe.Point3d, bMoveStartPoint: bool) -> None:
def setAxisVector(self, val: PyGe.Vector3d) -> None:
def setBaseRadius(self, val: float) -> None:
def setConstrain(self, val: PyDb.HelixConstrainType) -> None:
def setHeight(self, val: float) -> None:
def setStartPoint(self, val: PyGe.Point3d) -> None:
def setTopRadius(self, val: float) -> None:
def setTurnHeight(self, val: float) -> None:
def setTurns(self, val: float) -> None:
def setTwist(self, val: bool) -> None:
def startPoint(self) -> PyGe.Point3d:
def topRadius(self) -> float:
def totalLength(self) -> float:
def turnHeight(self) -> float:
def turnSlope(self) -> float:
def turns(self) -> float:
def twist(self) -> bool:
class HelixConstrainType Class
kTurnHeight: ClassVar[Self]
kTurns: ClassVar[Self]
kHeight: ClassVar[Self]
class HostApplicationServices Class
def LayoutManager(self) -> LayoutManager:
The layoutManager() method returns a pointer to the one and only instance of the layout
manager object. This object is used for accessing layout related functionality and methods
used for manipulating layouts (not just paper space layouts) as described by the exported
classes AcDbLayoutManager and AcApLayoutManager. Please see the ObjectARX Developer's Guide
for for a list of the functionality that can be accessed given an AcDbLayoutManager
pointer.
def __init__(self) -> None:
def __reduce__(self) -> Any:
def companyName(self) -> str:
This method is called by the database in various places to display 'About' information. The
return value of this method depends on the implementation of AcDbHostApplicationServices
and is shown in the following table: Product Return Value AutoCAD 'Autodesk, Inc.' RealDWG
'Autodesk, Inc.' OEM 'Autodesk, Inc.' This method may be overridden to return a constant
string containing the name of your company.
def createOutputCapture() -> OutputDisplayService:
def findFile(self, fileName: str) -> str:
This is findFile, a member of class AcDbHostApplicationServices.
def findFile(self, fileName: str, db: PyDb.Database) -> str:
This is findFile, a member of class AcDbHostApplicationServices.
def findFile(self, fileName: str, db: PyDb.Database, hint: PyDb.FindFileHint) -> str:
This is findFile, a member of class AcDbHostApplicationServices.
def findFile(*args) -> str:
This is findFile, a member of class AcDbHostApplicationServices.
def getMachineRegistryProductRootKey(self) -> str:
Use this function to obtain registry root for storing/retrieving product specific data.
This location is generally read-only for limited users.
def getUserRegistryProductRootKey(self) -> str:
Use this function to obtain registry root for storing/retrieving product specific user
data.
def plotSettingsValidator(self) -> PlotSettingsValidator:
def product(self) -> str:
This method is called by the database in various places to display 'About' information. The
return value of this method depends on the implementation of AcDbHostApplicationServices
and is shown in the following table: Product Return Value AutoCAD 'AutoCAD' RealDWG
'ObjectDBX' OEM The product name; for example, 'AutoCAD OEM' This method may be overridden
to return a constant string containing the name of your product.
def program(self) -> str:
This method is called by the database in various places to display 'About' information. The
return value of this method depends on the implementation of AcDbHostApplicationServices
and is shown in the following table: Product Return Value AutoCAD 'acad' RealDWG 'acdb' OEM
'aoem' This method should not be overridden because it is used to identify support files.
def releaseMajorMinorString(self) -> str:
This method is called by the database in various places to provide version numbers. The
return value of this method depends on the implementation of AcDbHostApplicationServices.
The following table shows AutoCAD 2025 values: Product Return Value AutoCAD 'R25.0' RealDWG
'R25.0' OEM 'R25.0' For binary-compatible API releases, the minor version (in other words,
the digit to the right of the decimal point) increments the previous release's minor
version value by 1. This method should not be overridden because it is used to identify
support files.
def releaseMarketVersion(self) -> str:
This value is primarily used in User Interface. It is the year displayed after the product
name, as in 'AutoCAD 2025.' For host application that derives from
AcDbHostApplicationServices, they will need to override this virtual method and provide a
valid value. If they do not, then the default value returned will be the same as AutoCAD's
version of the same year.
def setWorkingDatabase(self, val: PyDb.Database) -> None:
This method may not be overridden. setWorkingDatabase() may be called by the host
application, by database code, and by both dependent and independent ObjectARX
applications.
def versionString(self) -> str:
This method is called by the database in various places to provide version numbers. The
return value of this method depends on the implementation of AcDbHostApplicationServices.
The following table shows AutoCAD 2025 values: Product Return Value AutoCAD '25.0' RealDWG
'25.0' OEM '25.0' For binary-compatible API releases, the minor version (i.e., the digit to
the right of the decimal point) increments the previous release's minor version value by 1.
This method should not be overridden because it is used to identify support files.
def workingDatabase(self) -> Database:
This method may not be overridden. workingDatabase() may be called by the host application,
by database code, and by both dependent and independent ObjectARX applications. When
AutoCAD is the host application, this is equivalent to the old acdbCurDwg() API, and will
return a pointer to the primary database open in whichever document (window) has focus. In
other host applications, the meaning of working database will be application-defined.
class Hyperlink Class
def __init__() -> None:
Raises an exception.
This class cannot be instantiated from Python.
def __reduce__(self) -> Any:
def className() -> str:
def description(self) -> str:
def flags(self) -> int:
def getDisplayString(self) -> str:
def getNestedLevel(self) -> int:
def isOutermostContainer(self) -> bool:
def name(self) -> str:
def setDescription(self, val: str) -> None:
def setFlags(self, val: int) -> None:
def setName(self, val: str) -> None:
def setSubLocation(self, val: str) -> None:
def subLocation(self) -> str:
class HyperlinkCollection Class
def __init__() -> None:
Raises an exception.
This class cannot be instantiated from Python.
def __reduce__(self) -> Any:
def addAt(self, index: int, sName: str, sDescription: str, sSubLocation: str) -> None:
def addAt(self, index: int, pHLink: PyDb.Hyperlink) -> None:
def addAt(*args) -> None:
def addHead(self, sName: str, sDescription: str, sSubLocation: str) -> None:
def addTail(self, sName: str, sDescription: str, sSubLocation: str) -> None:
def className() -> str:
def count(self) -> int:
def item(self, index: int) -> Hyperlink:
def removeAt(self, index: int) -> None:
def removeHead(self) -> None:
def removeTail(self) -> None:
class IdMapping Class
def __init__(self) -> None:
def __reduce__(self) -> Any:
def assign(self, pair: PyDb.IdPair) -> None:
This function adds idPair to the AcDbIdMapping object's map. It returns Acad::eOk if
successful.
def change(self, pair: PyDb.IdPair) -> bool:
This function searches the AcDbIdMapping object's map for the key contained in pairToChange
and, if found, replaces the entry with a copy of pairToChange. Returns true if the change
is successful. Otherwise returns false.
def compute(self, pair: PyDb.IdPair) -> bool:
This function searches the AcDbIdMapping object's ID map for an AcDbIdPair that has a key
that matches the key passed in within idPair. If the key is found, the remaining data in
the 'found' AcDbIdPair within the map will be copied into idPair and the function returns
true. If the key is not found and the ID map is being used to clone within the same
database, then the function sets the value of idPair equal to the key and returns false. If
the key is not found and the ID map is either being used as a container, or for cloning
between two databases, then the value of idPair is set to NULL and the function returns
false. This function can only be used to find an entry based on the key for the AcDbIdPair,
not on the value for the pair.
def deepCloneContext(self) -> DeepCloneType:
Returns context of the deepclone operation the AcDbIdMapping object is involved in. The
possible values for AcDb::DeepCloneType
are:kDcCopykDcExplodekDcBlockkDcXrefBindkDcSymTableMergekDcSaveAskDcInsertkDcWblockkDcObjects
def destDb(self) -> Database:
This function sets db to point to the database that is the destination for the deep clone
operation for which the AcDbIdMapping object is being used. Returns Acad::eOk if
successful. If the AcDbIdMapping object's destination database is NULL, then
Acad::eNullObjectId is returned.
def duplicateRecordCloning(self) -> DuplicateRecordCloning:
Returns the value for duplicate record cloning, which determines what happens if symbols or
dictionary entries are cloned, and a duplicate is found to already exist in the destination
database. See AcDb::DuplicateRecordCloning for possible return values.
def idPairs(self) -> list[PyDb.IdPair]:
Fills idPair in with the data from the AcDbIdPair object the iterator is currently looking
at in the ID map. Returns true if successful. Otherwise returns false.
def origDb(self) -> Database:
This function sets db to point to the database that is the destination for the deep clone
operation for which the AcDbIdMapping object is being used. Returns Acad::eOk if
successful. If the AcDbIdMapping object's destination database is NULL, then
Acad::eNullObjectId is returned.
def remove(self, key: PyDb.ObjectId) -> bool:
This function searches the AcDbIdMapping ID map for an entry that has a key matching key.
If a matching entry is found, it is deleted from the ID map. Returns true if the search is
successful and an ID pair is deleted. Otherwise returns false.
def setDestDb(self, dest: PyDb.Database) -> None:
The destination database can only be set if it has not yet been set in the AcDbIdMapping
object. Once set, it cannot be changed. If the destination database for AcDbIdMapping
object is NULL then it will be set to the database pointed to by db and Acad::eOK will be
returned. If the AcDbIdMapping object's destination database is not NULL and it is the same
as that pointed to by db, then Acad::eOk will be returned. If the AcDbIdMapping object's
destination database is not NULL and it is not the same as that pointed to by db, then no
change will take place and Acad::eWrongDatabase will be returned.
class IdPair Class
def __init__(self) -> None:
AcDbIdPair is the element class for AcDbIdMapping, which is used in deep clone operations.
It holds a pair of AcDbObjectIds. The key is the original object's ID, and the value is the
cloned object's ID.
def __init__(self, key: PyDb.ObjectId, val: PyDb.ObjectId) -> None:
AcDbIdPair is the element class for AcDbIdMapping, which is used in deep clone operations.
It holds a pair of AcDbObjectIds. The key is the original object's ID, and the value is the
cloned object's ID.
def __init__(self, key: PyDb.ObjectId, val: PyDb.ObjectId, isCloned: bool) -> None:
AcDbIdPair is the element class for AcDbIdMapping, which is used in deep clone operations.
It holds a pair of AcDbObjectIds. The key is the original object's ID, and the value is the
cloned object's ID.
def __init__(self, key: PyDb.ObjectId, val: PyDb.ObjectId, isCloned: bool, isPrimary: bool, isOwnerXlated: bool) -> None:
AcDbIdPair is the element class for AcDbIdMapping, which is used in deep clone operations.
It holds a pair of AcDbObjectIds. The key is the original object's ID, and the value is the
cloned object's ID.
def __init__(*args) -> None:
AcDbIdPair is the element class for AcDbIdMapping, which is used in deep clone operations.
It holds a pair of AcDbObjectIds. The key is the original object's ID, and the value is the
cloned object's ID.
def __reduce__(self) -> Any:
def isCloned(self) -> bool:
Returns true if the key object has been cloned. Otherwise returns false.
def isOwnerXlated(self) -> bool:
Returns true if the owner has been translated. Otherwise returns false.
def isPrimary(self) -> bool:
Returns true if the key object is part of the primary set of objects being cloned, or if it
was 'deep cloned' because it was owned by a cloned primary object. Otherwise returns false.
def key(self) -> ObjectId:
Returns the key (which is the objectId of the original object).
def setIsCloned(self, val: bool) -> None:
Sets the isCloned status of the AcDbIdPair object. If isCloned == true, then the status is
set to indicate that the object identified by the key objectId has already been cloned. If
isCloned == false, then the status is set to indicate that the object has not been cloned
yet..
def setIsOwnerXlated(self, val: bool) -> None:
Sets the isOwnerXlated status of the AcDbIdPair object. If isOwnerXlated == true, then the
status is set to indicate that the owner of the object identified by the key objectId has
already been translated. If isCloned == false, then the status is set to indicate that the
object's owner has not been translated yet..
def setIsPrimary(self, val: bool) -> None:
Sets the isPrimary status of the AcDbIdPair object. If isPrimary == true, then the status
is set to indicate that the object identified by the key objectId is a primary object. If
isPrimary == false, then the status is set to indicate that the object is not a primary
object..
def setKey(self, val: PyDb.ObjectId) -> None:
Sets key to be the key (the original object) objectId for the AcDbIdPair object.
def setValue(self, val: PyDb.ObjectId) -> None:
Sets value to be the value (the cloned object) objectId for the AcDbIdPair object.
def value(self) -> ObjectId:
Returns the value (which is the objectId of the cloned object).
class Image Class
def __init__(self, id: PyDb.ObjectId, mode: PyDb.OpenMode, erased: bool) -> None:
Abstract base class for immediate mode raster-based entities, including AcDbRasterImage.
Every time entities derived from this class are drawn on the screen or plotted, the
getScanLines method is called by the display or plot driver to get the pixels needed for
display in the image format and scale required by the driver. These objects must be drawn
at regen time using the AcGiViewportGeometry::rasterImageDc() method accessible through
AcGiViewportDraw::geometry() in the entity's viewportDraw method. For more information
about the AcGiRequestScanLines, refer to the RequestScanLines structure in the ADI 4.3
specification, but note that they are not identical. In particular, the pixToDc parameter
specified in AcGiViewportGeometry::rasterImageDc() is returned in the
AcGiRequestScanLines::mPixelToDc field, but is not used by the driver. It should be set to
the 2D source image pixel-to-dc (logical coordinate) transform. When
AcDbImage::getScanLines() is called, this transform must be combined with the dc-to-device
pixel transform (pan, zoom) implied by the AcGiRequestScanLines::mPixelMinX,
AcGiRequestScanLines::mPixelMinY, AcGiRequestScanLines::mPixelMaxX,
AcGiRequestScanLines::mPixelMaxY parameters (device coordinates), and
AcGiRequestScanLines::mLowerLeft, AcGiRequestScanLines::mUpperRight parameters (dc or
logical coordinates) to create the complete source image pixel to device pixel transform.
This complete transform is either an affine transform or a perspective transform.
def __reduce__(self) -> Any:
def cast(otherObject: PyRx.RxObject) -> Image:
def className() -> str:
def cloneFrom(otherObject: PyRx.RxObject) -> Image:
def desc() -> PyRx.RxClass:
Returns a pointer to the AcRxClass object representing the specific class, or most recent
parent class explicitly registered with ObjectARX of either the pointer type used to invoke
it or the class qualifier used with it. (Remember that when a static member function is
invoked via a pointer, the pointer type, not the object type, determines which
implementation of the function is invoked.) When working with a pointer to an object and
the proper AcRxClass object for the class of the object pointed to is desired, the
AcRxObject::isA() function should be used, since it is a virtual non-static method and is
therefore not pointer type dependent. Caching the value of the pointer returned by this
method is acceptable, provided the application knows that the AcRxClass object pointed to
by the returned pointer was created by an ObjectARX application that will not be unloaded.
class ImageDisplayOpt Class
kShow: ClassVar[Self]
kShowUnAligned: ClassVar[Self]
kClip: ClassVar[Self]
kTransparent: ClassVar[Self]
class ImageUnits Class
kNone: ClassVar[Self]
kMillimeter: ClassVar[Self]
kCentimeter: ClassVar[Self]
kMeter: ClassVar[Self]
kKilometer: ClassVar[Self]
kInch: ClassVar[Self]
kFoot: ClassVar[Self]
kYard: ClassVar[Self]
kMile: ClassVar[Self]
kMicroinches: ClassVar[Self]
kMils: ClassVar[Self]
kAngstroms: ClassVar[Self]
kNanometers: ClassVar[Self]
kMicrons: ClassVar[Self]
kDecimeters: ClassVar[Self]
kDekameters: ClassVar[Self]
kHectometers: ClassVar[Self]
kGigameters: ClassVar[Self]
kAstronomical: ClassVar[Self]
kLightYears: ClassVar[Self]
kParsecs: ClassVar[Self]
class IndexFilterManager Class
def __init__(self) -> None:
AcDbIndexFilterManager is a namespace that provides a collection of functions for index and
filter access and maintenance functionality.
def __reduce__(self) -> Any:
def addFilter(blkRef: PyDb.BlockReference, filter: PyDb.SpatialFilter) -> None:
This function adds a filter to the provided block reference. It replaces the AcDbFilter of
the same AcRxClass if such a filter exists. Returns Acad::eOk if successful.
def className() -> str:
def getFilter(ref: PyDb.BlockReference, key: PyRx.Class, mode: PyDb.OpenMode) -> SpatialFilter:
This function is used to get at an AcDbFilter in a block reference. This function is
usually called in conjunction with the numFilters function that gives the total number of
filter objects in a block reference. Returns Acad::eOk if successful or Acad::eKeyNotFound
if the index does not exist.
def getFilter(ref: PyDb.BlockReference, index: int, mode: PyDb.OpenMode, erased: bool) -> SpatialFilter:
This function is used to get at an AcDbFilter in a block reference. This function is
usually called in conjunction with the numFilters function that gives the total number of
filter objects in a block reference. Returns Acad::eOk if successful or Acad::eKeyNotFound
if the index does not exist.
def getFilter(*args) -> SpatialFilter:
This function is used to get at an AcDbFilter in a block reference. This function is
usually called in conjunction with the numFilters function that gives the total number of
filter objects in a block reference. Returns Acad::eOk if successful or Acad::eKeyNotFound
if the index does not exist.
def numIndexes(blkRef: PyDb.BlockTableRecord) -> int:
This function returns the number of indexes within the provided block table record. It
returns 0 if no indexes exist within the block table record.
def removeFilter(blkRef: PyDb.BlockReference, key: PyRx.Class) -> None:
This function removes a filter from the provided block. Returns Acad::eOk if successful or
Acad::eKeyNotFound if the index does not exist.
class Intersect Class
kOnBothOperands: ClassVar[Self]
kExtendThis: ClassVar[Self]
kExtendArg: ClassVar[Self]
kExtendBoth: ClassVar[Self]
class JoinEntityPE Class
def __init__(self, obj: PyRx.RxObject) -> None:
def __reduce__(self) -> Any:
def className() -> str:
def desc() -> PyRx.RxClass:
Returns a pointer to the AcRxClass object representing the specific class, or most recent
parent class explicitly registered with ObjectARX of either the pointer type used to invoke
it or the class qualifier used with it. (Remember that when a static member function is
invoked via a pointer, the pointer type, not the object type, determines which
implementation of the function is invoked.) When working with a pointer to an object and
the proper AcRxClass object for the class of the object pointed to is desired, the
AcRxObject::isA() function should be used, since it is a virtual non-static method and is
therefore not pointer type dependent. Caching the value of the pointer returned by this
method is acceptable, provided the application knows that the AcRxClass object pointed to
by the returned pointer was created by an ObjectARX application that will not be unloaded.
def joinEntities(self, primaryEntity: PyDb.Entity, secondaryEntities: list[PyDb.Entity], tol: PyGe.Tol) -> list[int]:
def joinEntity(self, primaryEntity: PyDb.Entity, secondaryEntity: PyDb.Entity, tol: PyGe.Tol) -> bool:
class JoinStyle Class
kJnStylNone: ClassVar[Self]
kJnStylRound: ClassVar[Self]
kJnStylAngle: ClassVar[Self]
kJnStylFlat: ClassVar[Self]
class LayerFilter Class
def __init__(self) -> None:
This class is a list of layers that need to have their corresponding entity lists traversed
during filtered block traversal. The newIterator() method does return a pointer to a valid
AcDbFilteredBlockIterator object. These objects are optionally saved in the drawing for
purposes of xref demand loading efficiency.
def __init__(self, id: PyDb.ObjectId) -> None:
This class is a list of layers that need to have their corresponding entity lists traversed
during filtered block traversal. The newIterator() method does return a pointer to a valid
AcDbFilteredBlockIterator object. These objects are optionally saved in the drawing for
purposes of xref demand loading efficiency.
def __init__(self, id: PyDb.ObjectId, mode: PyDb.OpenMode) -> None:
This class is a list of layers that need to have their corresponding entity lists traversed
during filtered block traversal. The newIterator() method does return a pointer to a valid
AcDbFilteredBlockIterator object. These objects are optionally saved in the drawing for
purposes of xref demand loading efficiency.
def __init__(self, id: PyDb.ObjectId, mode: PyDb.OpenMode, erased: bool) -> None:
This class is a list of layers that need to have their corresponding entity lists traversed
during filtered block traversal. The newIterator() method does return a pointer to a valid
AcDbFilteredBlockIterator object. These objects are optionally saved in the drawing for
purposes of xref demand loading efficiency.
def __init__(*args) -> None:
This class is a list of layers that need to have their corresponding entity lists traversed
during filtered block traversal. The newIterator() method does return a pointer to a valid
AcDbFilteredBlockIterator object. These objects are optionally saved in the drawing for
purposes of xref demand loading efficiency.
def __reduce__(self) -> Any:
def add(self, val: str) -> None:
def cast(otherObject: PyRx.RxObject) -> LayerFilter:
def className() -> str:
def cloneFrom(otherObject: PyRx.RxObject) -> LayerFilter:
def desc() -> PyRx.RxClass:
Returns a pointer to the AcRxClass object representing the specific class, or most recent
parent class explicitly registered with ObjectARX of either the pointer type used to invoke
it or the class qualifier used with it. (Remember that when a static member function is
invoked via a pointer, the pointer type, not the object type, determines which
implementation of the function is invoked.) When working with a pointer to an object and
the proper AcRxClass object for the class of the object pointed to is desired, the
AcRxObject::isA() function should be used, since it is a virtual non-static method and is
therefore not pointer type dependent. Caching the value of the pointer returned by this
method is acceptable, provided the application knows that the AcRxClass object pointed to
by the returned pointer was created by an ObjectARX application that will not be unloaded.
def getAt(self, val: int) -> str:
def indexClass(self) -> PyRx.RxClass:
def isValid(self) -> bool:
def layerCount(self) -> int:
def remove(self, val: str) -> None:
class LayerStateManager Class
def __init__(self, db: PyDb.Database) -> None:
The AcDbLayerStateManager class is used to access and manipulate individual layer states
associated with a drawing database. The layer state manager is not implemented as a
collection class. Instead it is intended for high-level access to layer state manager
functions. For enumerating, listing, and other lower-level functions, developers should use
the existing APIs to access the layer state dictionary within the layer table's extension
dictionary. The specific name of the layer state dictionary is ACAD_LAYERSTATES.
def __reduce__(self) -> Any:
def addLayerStateLayers(self, sName: str, layerIds: list[PyDb.ObjectId]) -> None:
Adds more layers to a layer state.
def className() -> str:
def compareLayerStateToDb(self, sName: str, vpId: PyDb.ObjectId) -> bool:
Compares the layer values saved in a layer state to the current layer values in the
drawing. This method compares everything except layer description. This method can also use
VPLAYER and override settings of a viewport for comparison of visibility and overridable
properties. Specify AcDbObjectId::kNull for the idVp argument to ignore viewport settings.
Returns true if the layer state matches the layers in the drawing, false otherwise.
def deleteLayerState(self, sName: str) -> None:
Deletes the specified layer state. This method returns Acad::eOk on success and
Acad::eKeyNotFound if the passed-in layer state name is not found in the layer state
dictionary. Other Acad::ErrorStatus values unequal to Acad::eOk can come from internal
calls to AcDbObject::erase() while erasing the Xrecord and acdbOpenObject() while opening
the layer states dictionary.
def desc() -> PyRx.RxClass:
Returns a pointer to the AcRxClass object representing the specific class, or most recent
parent class explicitly registered with ObjectARX of either the pointer type used to invoke
it or the class qualifier used with it. (Remember that when a static member function is
invoked via a pointer, the pointer type, not the object type, determines which
implementation of the function is invoked.) When working with a pointer to an object and
the proper AcRxClass object for the class of the object pointed to is desired, the
AcRxObject::isA() function should be used, since it is a virtual non-static method and is
therefore not pointer type dependent. Caching the value of the pointer returned by this
method is acceptable, provided the application knows that the AcRxClass object pointed to
by the returned pointer was created by an ObjectARX application that will not be unloaded.
def exportLayerState(self, sName: str, fName: str) -> None:
exportLayerState() reads the passed-in layer state name and exports the corresponding layer
state to the export file. The layer state name must be passed with a single 0 after the
name. Return Value Description Acad::eOk The export was successful Acad::eNullObjectId The
layer state dictionary ID is Null Acad::eNoFileName The passed in filename is Null or zero
bytes Acad::eWrongObjectType The passed in layer state name refers to something other than
an Xrecord Acad::eCantOpenFile The passed-in filename cannot be opened for writing
Acad::eNotInitializedYet The database is Null Acad::eKeyNotFound The passed-in layer state
name was not found in the layer state dictionary Other possible Acad::ErrorStatus values
unequal to Acad::eOk can come from internal calls to:
AcDbDatabase::getPlotStyleNameDictionary() while opening the plotstyle
dictionaryAcDbDictionary::nameAt() while reading the string name of the plotstyle
IDacdbGetObjectId() while getting the object ID of the linetype, plotstyle, or
layeracdbOpenObject() while opening the Xrecord of the layer
stateAcDbSymbolUtilities::getSymbolName() while getting the string form of the linetype or
layer
def getDatabase(self) -> Database:
Returns a pointer to the hosting database for AcDbLayerStateManager.
def getLastRestoredLayerState(self) -> tuple[str, PyDb.ObjectId]:
Returns the name and objectId of the last layer state restored in the drawing. This value
is saved by the restoreLayerState() method so any means of restoring a layer state will
automatically set that value. Returns Acad::eOk if Successful; returns
Acad::eNotInitializedYet if the database is NULL; returns Acad::eKeyNotFound if the object
ID of the layer state dictionary is NULL; returns Acad::eNullObjectId if the layer state
dictionary ID is NULL.
def getLayerStateDescription(self, sName: str) -> str:
AcDbLaterStateManager::getLayerStateDescription
def getLayerStateLayers(self, sName: str, invert: bool) -> list[str]:
Gets an array of the names of all the layers that are saved in a layer state. If bInvert is
true, the array will contain the names of the layers in the current drawing that are NOT
saved in the layer state. Returns Acad::eOk if successful; otherwise, returns an AutoCAD
error status.
def getLayerStateMask(self, sName: str) -> LayerStateMask:
Gets the mask for the named layer state. Return Value Description Acad::eOk Successful
operation Acad::eWrongObjectType The passed in layer state name refers to something other
than an Xrecord Acad::eKeyNotFound The passed in layer state name is not found in the layer
state dictionary, or the mask data was not found in the layer state Xrecord Other possible
Acad::ErrorStatus values unequal to Acad::eOk can come from an internal call to
acdbOpenObject() while opening the layer states dictionary.
def getLayerStateNames(self, bIncludeHidden: bool, bIncludeXref: bool) -> list[str]:
Gets an array of the names of all the layer states. Returns Acad::eOk if successful;
otherwise, returns an AutoCAD error status.
def hasLayerState(self, sName: str) -> bool:
Checks if the layer state sName is present and returns true if so, and false otherwise.
def importLayerState(self, fName: str) -> str:
importLayerState() reads the passed-in filename (saved by a previous export) and extracts
layer states to import. If an import file layer state has the same name as a layer state
already existing in the drawing, the imported layer state is ignored. If an import file
layer state name is not found in the drawing, it is created in the drawing. If any
newly-created layer states refer to layers which are nonexistent in the drawing, the layers
are created using default settings.
def importLayerStateFromDb(self, sName: str, db: PyDb.Database) -> None:
Imports the layer state name passed in pStateName from the open drawing file pointer passed
in pDb. This method will also import linetypes, materials and plot styles that are saved in
the imported layer state but are missing in the current drawing. This method allows
importing of layer states directly from drawing files rather than having to export to an
.LAS file format in order to import a layer state. Returns Acad::eOk if successful;
otherwise, returns an AutoCAD error status.
def isDependentLayerState(self, sName: str) -> bool:
Returns true if the layer state is dependent.
def layerStateHasViewportData(self, sName: str) -> bool:
Returns a Boolean indicating whether the given layer state has viewport data associated
with it. A layer state has viewport data if saveLayerState() was called with a non-null
idVp parameter.
def layerStatesDictionaryId(self, bCreateIfNotPresent: bool) -> ObjectId:
Returns AcDbObjectId of the layer states extension dictionary (within the layer table
extension dictionary) or AcDbObjectId(NULL) if the database is Null, or if the symbol table
is Null, or if the layer table extension dictionary or the layer states extension
dictionary is Null (and bCreateIfNotPresent is false), or if the layer table extension
dictionary or layer states extension dictionary cannot be created (and bCreateIfNotPresent
is true), or if the layer table extension dictionary cannot be opened for read.
def removeLayerStateLayers(self, sName: str, layerNames: list[str]) -> None:
Removes layers from a layer state.
def renameLayerState(self, sName: str, newsName: str) -> None:
Renames the layer state sName to be sNewName. Return Value Description Acad::eOk The rename
was successful Acad::eDuplicateKey The sNewName layer state 'new' name already exists in
the layer state dictionary Acad::eKeyNotFound The sName layer state 'old' name was not
found in the layer state dictionary, or the object ID of the layer state dictionary ID is
Null Other Acad::ErrorStatus values unequal to Acad::eOk can come from an internal call to
acdbOpenObject() while opening the layer states dictionary.
def restoreLayerState(self, sName: str, vpId: PyDb.ObjectId, flags: int, mask: PyDb.LayerStateMask) -> None:
Restores the layer state sName and the VPLAYER settings for the viewport specified. Also
restores attributes specified in pClientMask. nUndefOff may be used to turn off or freeze
undefined layers in the layer state. It can be set to one of the following values: Name
Value Description kUndefDoNothing 0 Take no action. kUndefTurnOff 1 Turn layers off.
kUndefFreeze 2 Freeze layers. A wide range of return values is possible, as described in
the following table: Return Value Description Acad::eOk Successful restore.
Acad::eUndefinedLineType A linetype not in the database was found in the layer state
(warning). Acad::eBadPlotStyleName A plotstyle not in the database was found in the layer
state (warning). Acad::eInvalidLayer The restore attempted to updated current layer's
frozen state (warning). Acad::eNotInitializedYet The database or transaction manager is
null. Acad::eKeyNotFound The passed-in layer state name is not found in the layer state
dictionary. Acad::eInvalidInput The viewport data is not available. Other possible
Acad::ErrorStatus values unequal to Acad::eOk can come from internal calls to:
AcDbDatabase::getSymbolTable() while getting the layer tableAcDbLayerTable::getAt() while
opening an existing layer for readacdbGetObjectId() while getting a layer's object
IDacdbOpenObject() while opening an existing layer for
readAcDbLayerTableRecord::setIsFrozen() while setting or resetting the frozen state of a
layerAcDbLayerTableRecord::setIsPlottable() while setting or resetting the plottable state
of a layerAcDbLayerTableRecord::setLineWeight() while setting a layer's lineweight
def saveLayerState(self, sName: str, mask: PyDb.LayerStateMask, id: PyDb.ObjectId) -> None:
Saves the current state of the layer table to the layer state specified by sName. This
function also captures the VPLAYER settings for the viewport specified. Specify
AcDbObjectId::kNull for the idVp argument to capture a layer state without VPLAYER
settings. Return Value Description Acad::eOk Successful save. Acad::eNotInitializedYet The
database or transaction manager is null. Acad::eDuplicateKey The layer state already
exists. Acad::eOutOfMemory The layer state xrecord cannot be created. Acad::eKeyNotFound
The object ID of the layer state dictionary is null. Other possible Acad::ErrorStatus
values unequal to Acad::eOk can come from internal calls to AcDbDatabase::getSymbolTable()
while getting the layer table; acDbOpenObject() while opening the layer states dictionary;
or AcDbDictionary::setAt () while setting the new state in the extension dictionary.
def setLayerStateDescription(self, sName: str, desc: str) -> None:
AcDbLayerStateManager::setLayerStateDescription
def setLayerStateMask(self, sName: str, mask: PyDb.LayerStateMask) -> None:
Updates the mask used when restoring a layer state. Return Value Description Acad::eOk
Successful operation Acad::eWrongObjectType The passed in layer state name refers to
something other than an Xrecord Acad::eKeyNotFound The passed in layer state name is not
found in the layer state dictionary, or the mask data was not found in the layer state
Xrecord Other possible Acad::ErrorStatus values unequal to Acad::eOk can come from an
internal call to acdbOpenObject() while opening the layer states dictionary.
class LayerStateMask Class
kNone: ClassVar[Self]
kOn: ClassVar[Self]
kFrozen: ClassVar[Self]
kLocked: ClassVar[Self]
kPlot: ClassVar[Self]
kNewViewport: ClassVar[Self]
kColor: ClassVar[Self]
kLineType: ClassVar[Self]
kLineWeight: ClassVar[Self]
kPlotStyle: ClassVar[Self]
kCurrentViewport: ClassVar[Self]
kTransparency: ClassVar[Self]
kAll: ClassVar[Self]
kStateIsHidden: ClassVar[Self]
kLastRestored: ClassVar[Self]
kDecomposition: ClassVar[Self]
class LayerTable Class
def __init__(self, id: PyDb.ObjectId, mode: PyDb.OpenMode, erased: bool) -> None:
def __reduce__(self) -> Any:
def add(self, val: PyDb.LayerTableRecord) -> ObjectId:
This function adds the record pointed to by pRecord to both the database containing the
table and the table itself. If the additions succeeded, recordId is set to the AcDbObjectId
of the record in the database. Possible return ErrorStatus codes are: Acad::eOk,
Acad::eOutOfMemory, Acad::eDuplicateRecordName, Acad::eNoDatabase.
def cast(otherObject: PyRx.RxObject) -> LayerTable:
def className() -> str:
def cloneFrom(otherObject: PyRx.RxObject) -> LayerTable:
def desc() -> PyRx.RxClass:
Returns a pointer to the AcRxClass object representing the specific class, or most recent
parent class explicitly registered with ObjectARX of either the pointer type used to invoke
it or the class qualifier used with it. (Remember that when a static member function is
invoked via a pointer, the pointer type, not the object type, determines which
implementation of the function is invoked.) When working with a pointer to an object and
the proper AcRxClass object for the class of the object pointed to is desired, the
AcRxObject::isA() function should be used, since it is a virtual non-static method and is
therefore not pointer type dependent. Caching the value of the pointer returned by this
method is acceptable, provided the application knows that the AcRxClass object pointed to
by the returned pointer was created by an ObjectARX application that will not be unloaded.
class LayerTableRecord Class
def VPDFLT(self) -> bool:
This oddly named function stands for ViewPort visibility DeFauLT. If the layer is frozen by
default in new viewports, then this function returns true. If the layer is thawed in new
viewports, then this function returns false. The VPDFLT value is used for the second bit of
DXF group code 70.
def __init__(self) -> None:
Objects of this class represent records in the AcDbLayerTable. Each of these records
contains the information (color, on or off, frozen or thawed, etc.) about a layer in the
drawing database.
def __init__(self, id: PyDb.ObjectId) -> None:
Objects of this class represent records in the AcDbLayerTable. Each of these records
contains the information (color, on or off, frozen or thawed, etc.) about a layer in the
drawing database.
def __init__(self, id: PyDb.ObjectId, mode: PyDb.OpenMode) -> None:
Objects of this class represent records in the AcDbLayerTable. Each of these records
contains the information (color, on or off, frozen or thawed, etc.) about a layer in the
drawing database.
def __init__(self, id: PyDb.ObjectId, mode: PyDb.OpenMode, erased: bool) -> None:
Objects of this class represent records in the AcDbLayerTable. Each of these records
contains the information (color, on or off, frozen or thawed, etc.) about a layer in the
drawing database.
def __init__(*args) -> None:
Objects of this class represent records in the AcDbLayerTable. Each of these records
contains the information (color, on or off, frozen or thawed, etc.) about a layer in the
drawing database.
def __reduce__(self) -> Any:
def cast(otherObject: PyRx.RxObject) -> LayerTableRecord:
def className() -> str:
def cloneFrom(otherObject: PyRx.RxObject) -> LayerTableRecord:
def color(self, vpid: PyDb.ObjectId) -> Color:
This function returns an AcCmColor object that contains the color value of the layer.
def desc() -> PyRx.RxClass:
Returns a pointer to the AcRxClass object representing the specific class, or most recent
parent class explicitly registered with ObjectARX of either the pointer type used to invoke
it or the class qualifier used with it. (Remember that when a static member function is
invoked via a pointer, the pointer type, not the object type, determines which
implementation of the function is invoked.) When working with a pointer to an object and
the proper AcRxClass object for the class of the object pointed to is desired, the
AcRxObject::isA() function should be used, since it is a virtual non-static method and is
therefore not pointer type dependent. Caching the value of the pointer returned by this
method is acceptable, provided the application knows that the AcRxClass object pointed to
by the returned pointer was created by an ObjectARX application that will not be unloaded.
def description(self) -> str:
Returns user-defined descriptive text for the layer.
def entityColor(self) -> EntityColor:
This function returns the color settings of the layer in an AcCmEntityColor form. Most
clients should still use the color() function, which returns the heavyweight AcCmColor.
However, if color name information is not required, this function provides faster access to
the lightweight AcCmEntityColor data.
def hasAnyOverrides(self) -> bool:
Returns true if this layer has any property overrides associated with any viewport in the
drawing.
def hasOverrides(self, id: PyDb.ObjectId) -> bool:
Returns true if this layer has one or more property overrides that are associated with the
viewport whose object id is passed in to the method.
def isFrozen(self) -> bool:
This functions returns true if and only if the layer is frozen. If the layer is thawed,
then false is returned. The isFrozen value is for the first bit of DXF group code 70.
def isHidden(self) -> bool:
Indicates whether the layer is shown in the user interface of host applications that
support this flag. Returns true if the layer is hidden. Otherwise, returns false.
def isHiddenS(val: PyDb.ObjectId) -> bool:
def isInUse(self) -> bool:
Returns false if the layer was not in use when AcDbLayerTable::generateUsageData() was last
called. Otherwise, returns true. Usage data is not available (and the function returns
true) if the AcDbLayerTableRecord isn't part of an AcDbDatabase or if
AcDbLayerTable::generateUsageData() has not been called since this AcDbLayerTableRecord was
constructed.
def isLocked(self) -> bool:
This functions returns true if and only if the layer is locked. If the layer is unlocked,
then false is returned. The isLocked value is used for the third bit of DXF group code 70.
def isOff(self) -> bool:
This functions returns true if the layer is off. If the layer is on, then false is
returned. The isOff value is represented as the positive or negative status of the color
index in DXF group code 62 (if the color index is negative, then the layer is off).
def isPlottable(self) -> bool:
This functions returns true if the layer is plottable. If the layer is not plottable, then
false is returned. The isPlottable value is used for DXF group code 290 (enumerated
constant AcDbLayerTableRecord::kDxfLayerPlotBit).
def isReconciled(self) -> bool:
Returns true if this layer has been marked as reconciled.
def isReconciledS(val: PyDb.ObjectId) -> bool:
def lineWeight(self, vpid: PyDb.ObjectId) -> LineWeight:
This function returns the AcDb::LineWeight of the layer table record. The lineWeight value
is used for DXF group code 370.
def linetypeObjectId(self) -> ObjectId:
If there is a line type referenced by this layer, then this function returns the
AcDbObjectId referenced by the LinetypeTableRecord. Otherwise, it will return
AcDbObjectId::kNull. The name string of the linetype with the returned objectId is used for
DXF group code 6.
def materialId(self) -> ObjectId:
This function returns the material that is assigned to the layer. The default value is the
id of the global material. Returns the object Id of the associated AcDbMaterial object.
def plotStyleName(self, vpid: PyDb.ObjectId) -> str:
This function returns a copy of the plotStyleName string of the layer table record. The
caller is responsible for deallocating the returned string. The plotStyleName value is used
for DXF group code 390.
def plotStyleNameId(self, vpid: PyDb.ObjectId) -> ObjectId:
This function returns a copy of the plotStyleName string of the layer table record. The
caller is responsible for deallocating the returned string. The plotStyleName value is used
for DXF group code 390.
def removeAllOverrides(self) -> None:
Removes all overrides associated with this layer, for all viewports. Returns Acad::eOk if
there is nothing to remove or if the remove is successful; otherwise, returns an AutoCAD
error status.
def removeColorOverride(self, id: PyDb.ObjectId) -> None:
Removes the color override associated with this layer and this viewport. Returns Acad::eOk
if there is nothing to remove or if the remove is successful; otherwise, returns an AutoCAD
error status.
def removeLineWeightOverride(self, id: PyDb.ObjectId) -> None:
Removes the line weight override associated with this layer and this viewport. Returns
Acad::eOk if there is nothing to remove or if the remove is successful; otherwise, returns
an AutoCAD error status.
def removeLinetypeOverride(self, id: PyDb.ObjectId) -> None:
Removes the linetype override associated with this layer and this viewport. Returns
Acad::eOk if there is nothing to remove or if the remove is successful; otherwise, returns
an AutoCAD error status.
def removePlotStyleOverride(self, id: PyDb.ObjectId) -> None:
Removes the plot style override associated with this layer and this viewport. Returns
Acad::eOk if there is nothing to remove or if the remove is successful; otherwise, returns
an AutoCAD error status.
def removeTransparencyOverride(self, id: PyDb.ObjectId) -> None:
Removes any transparency overrides for this layer on the given viewport.
def removeViewportOverrides(self, id: PyDb.ObjectId) -> None:
Removes all overrides associated with this layer and this viewport. Returns Acad::eOk if
there is nothing to remove or if the remove is successful; otherwise, returns an AutoCAD
error status.
def setColor(self, clr: PyDb.AcCmColor, vpid: PyDb.ObjectId) -> None:
This function sets the layer to use the color specified by color. The color value is used
for DXF group code 62.
def setDescription(self, val: str) -> None:
AcDbLayerTableRecord::setDescription
def setIsFrozen(self, frozen: bool) -> None:
If frozen == true, then this function sets the layer to be frozen. If frozen == false, then
the layer is set as thawed. The frozen value is for the first bit of DXF group code 70.
Returns Acad::eOk if successful, or Acad::eInvalidInput if the data passed in is not
acceptable.
def setIsHidden(self, val: bool) -> None:
Allows the layer to be hidden from the user interface of the host application (provided
that the host application honors this flag). AutoCAD, for instance, does not show layers
that are hidden. Hidden layers operate as follows: A hidden layer cannot be seen anywhere
in the AutoCAD user interface where layers can be chosen or inspected.An entity that is
already on a hidden layer cannot be assigned a new layer and entities that are on normal
layers cannot be assigned to a hidden layer via the UI.A hidden layer cannot be made
current.Hidden layers show up as regular layers when saved to pre-AutoCAD 2007 formats.
Hidden layers do not round-trip. This is to prevent users of older versions of AutoCAD from
putting data on layers that may become hidden in later versions. Hidden layer names are not
mangled during xref attach. They behave similarly to layer 0. Returns all the return values
of the getName() function. It also returns eInvalidInput if an attempt is made to hide
layer 0, the defpoints layer, or an xref-dependent layer.
def setIsLocked(self, locked: bool) -> None:
If locked == true, then this function sets the layer to be locked. If locked == false, then
the layer is unlocked. The locked value is used for the third bit of DXF group code 70.
def setIsOff(self, off: bool) -> None:
If off == true, then this function sets the layer to be off. If off == false, then the
layer will be turned on. The off value is represented as the positive or negative status of
the color index in DXF group code 62 (if off == true, then the layer is off and the color
is negative).
def setIsPlottable(self, val: bool) -> None:
If plot == true, then this function sets the layer to be plottable. If plot == false, then
the layer will not be plottable. The isPlottable value is used for DXF group code 290
(enumerated constant AcDbLayerTableRecord::kDxfLayerPlotBit). Returns Acad::eOk if
successful, or Acad::eInvalidInput if the layer can be made plottable.
def setLineWeight(self, weight: PyDb.LineWeight, vpid: PyDb.ObjectId) -> None:
Sets a layer line weight override for the supplied viewport. You cannot change the global
line weight through this method. Returns an error status if an illegal line weight value is
passed in.
def setLinetypeObjectId(self, id: PyDb.ObjectId) -> None:
Sets a layer linetype override for the supplied viewport. You cannot change the global
linetype through this method.
def setMaterialId(self, id: PyDb.ObjectId) -> None:
This function sets the referenced material. The provided Id must refer to an existing
AcDbMaterial. Returns Acad::eOk if successful.
def setPlotStyleName(self, val: str | PyDb.ObjectId, vpid: PyDb.ObjectId) -> None:
Sets a layer plot style override for the supplied viewport. You cannot change the global
plot style through this method. Returns an error status if the plot style cannot be found
in the current plot style table, or if the drawing's PlotStyleMode is set to use
color-based plot styles.
def setTransparency(self, clr: PyDb.Transparency, vpid: PyDb.ObjectId) -> None:
Defines a transparency value to override the layer transparency for the given viewport.
def setVPDFLT(self, frozen: bool) -> None:
If frozen == true, then the layer will be frozen by default in new viewports. If frozen ==
false, then the layer will be thawed by default in new viewports. The frozen value is used
for the second bit of DXF group code 70.
def transparency(self, vpid: PyDb.ObjectId) -> Transparency:
This function returns the transparency value of the layer table record.
class Layout Class
def __init__(self) -> None:
An AcDbLayout object stores characteristics of each paperspace layout. Layout objects are
stored in an AcDbDictionary object with an ACAD_LAYOUT key, allowing easy iteration and
indexing.
def __init__(self, id: PyDb.ObjectId) -> None:
An AcDbLayout object stores characteristics of each paperspace layout. Layout objects are
stored in an AcDbDictionary object with an ACAD_LAYOUT key, allowing easy iteration and
indexing.
def __init__(self, id: PyDb.ObjectId, mode: PyDb.OpenMode) -> None:
An AcDbLayout object stores characteristics of each paperspace layout. Layout objects are
stored in an AcDbDictionary object with an ACAD_LAYOUT key, allowing easy iteration and
indexing.
def __init__(self, id: PyDb.ObjectId, mode: PyDb.OpenMode, erased: bool) -> None:
An AcDbLayout object stores characteristics of each paperspace layout. Layout objects are
stored in an AcDbDictionary object with an ACAD_LAYOUT key, allowing easy iteration and
indexing.
def __init__(*args) -> None:
An AcDbLayout object stores characteristics of each paperspace layout. Layout objects are
stored in an AcDbDictionary object with an ACAD_LAYOUT key, allowing easy iteration and
indexing.
def __reduce__(self) -> Any:
def addToLayoutDict(self, db: PyDb.Database, id: PyDb.ObjectId) -> None:
def annoAllVisible(self) -> bool:
def cast(otherObject: PyRx.RxObject) -> Layout:
def className() -> str:
def cloneFrom(otherObject: PyRx.RxObject) -> Layout:
def desc() -> PyRx.RxClass:
Returns a pointer to the AcRxClass object representing the specific class, or most recent
parent class explicitly registered with ObjectARX of either the pointer type used to invoke
it or the class qualifier used with it. (Remember that when a static member function is
invoked via a pointer, the pointer type, not the object type, determines which
implementation of the function is invoked.) When working with a pointer to an object and
the proper AcRxClass object for the class of the object pointed to is desired, the
AcRxObject::isA() function should be used, since it is a virtual non-static method and is
therefore not pointer type dependent. Caching the value of the pointer returned by this
method is acceptable, provided the application knows that the AcRxClass object pointed to
by the returned pointer was created by an ObjectARX application that will not be unloaded.
def getBlockTableRecordId(self) -> ObjectId:
def getExtents(self) -> tuple[PyGe.Point2d, PyGe.Point2d]:
def getLayoutName(self) -> str:
def getLimits(self) -> tuple[PyGe.Point2d, PyGe.Point2d]:
def getTabOrder(self) -> int:
def getTabSelected(self) -> bool:
def getViewportArray(self) -> list[PyDb.ObjectId]:
def initialize(self, id: PyDb.ObjectId) -> None:
def setAnnoAllVisible(self, val: bool) -> None:
def setBlockTableRecordId(self, id: PyDb.ObjectId) -> None:
def setLayoutName(self, val: str) -> None:
def setTabOrder(self, val: int) -> None:
def setTabSelected(self, val: bool) -> None:
class LayoutManager Class
def __init__(self) -> None:
def __reduce__(self) -> Any:
def className() -> str:
def clearSetupForLayouts(handle: int) -> None:
def cloneLayout(self, layout: PyDb.Layout, newname: str, newTabOrder: int, db: PyDb.Database) -> None:
def copyLayout(self, name: str, newname: str, db: PyDb.Database) -> None:
def countLayouts(self, db: PyDb.Database) -> int:
def createLayout(self, name: str, db: PyDb.Database) -> tuple[PyDb.ObjectId, PyDb.ObjectId]:
def deleteLayout(self, name: str, db: PyDb.Database) -> None:
def desc() -> PyRx.RxClass:
Returns a pointer to the AcRxClass object representing the specific class, or most recent
parent class explicitly registered with ObjectARX of either the pointer type used to invoke
it or the class qualifier used with it. (Remember that when a static member function is
invoked via a pointer, the pointer type, not the object type, determines which
implementation of the function is invoked.) When working with a pointer to an object and
the proper AcRxClass object for the class of the object pointed to is desired, the
AcRxObject::isA() function should be used, since it is a virtual non-static method and is
therefore not pointer type dependent. Caching the value of the pointer returned by this
method is acceptable, provided the application knows that the AcRxClass object pointed to
by the returned pointer was created by an ObjectARX application that will not be unloaded.
def findLayoutNamed(self, name: str, db: PyDb.Database) -> ObjectId:
def getActiveLayoutBTRId(self, db: PyDb.Database) -> ObjectId:
def getActiveLayoutName(self, allowModel: bool, db: PyDb.Database) -> str:
def getLayouts(self, db: PyDb.Database) -> dict[str, PyDb.ObjectId]:
def getNonRectVPIdFromClipId(self, id: PyDb.ObjectId) -> ObjectId:
def isVpnumClipped(self, idx: int, db: PyDb.Database) -> bool:
def layoutExists(self, name: str, db: PyDb.Database) -> bool:
def renameLayout(self, name: str, newname: str, db: PyDb.Database) -> None:
def setCurrentLayout(self, name: str, db: PyDb.Database) -> None:
def setCurrentLayoutId(self, id: PyDb.ObjectId) -> None:
def setupForLayouts(db: PyDb.Database) -> int:
class Leader Class
def __init__(self) -> None:
The AcDbLeader class represents the LEADER entity within AutoCAD. Leaders are considered as
dimensions in AutoCAD, which means they are controlled by dimension variable settings and
dimension styles. This class contains a dynamic array of points that are the vertices for
the leader line. The first point in the array is the start of the leader. If the leader has
an arrowhead it is located here. If the length of the first segment of the leader is less
than twice the arrowhead size the arrowhead is suppressed. If the leader has an associated
annotation object the last point of the leader is placed near it. By default a leader has
straight line segments, but it may be set to fit a spline to the vertexes. Associativity
between a leader and another object may be controlled by the methods attachAnnotation() and
detachAnnotation(). Some editing methods will automatically break associativity, as
described below. To update the leader endpoint position relative to its associated
annotation use the evaluateLeader() method. The following persistent reactor notification
functions are overridden by AcDbLeader to receive notification of changes in the associated
annotation object, which has the leader object in its persistent reactor list:
AcDbLeader::copied()AcDbLeader::erased()AcDbLeader::goodbye()AcDbLeader::modified()
def __init__(self, id: PyDb.ObjectId) -> None:
The AcDbLeader class represents the LEADER entity within AutoCAD. Leaders are considered as
dimensions in AutoCAD, which means they are controlled by dimension variable settings and
dimension styles. This class contains a dynamic array of points that are the vertices for
the leader line. The first point in the array is the start of the leader. If the leader has
an arrowhead it is located here. If the length of the first segment of the leader is less
than twice the arrowhead size the arrowhead is suppressed. If the leader has an associated
annotation object the last point of the leader is placed near it. By default a leader has
straight line segments, but it may be set to fit a spline to the vertexes. Associativity
between a leader and another object may be controlled by the methods attachAnnotation() and
detachAnnotation(). Some editing methods will automatically break associativity, as
described below. To update the leader endpoint position relative to its associated
annotation use the evaluateLeader() method. The following persistent reactor notification
functions are overridden by AcDbLeader to receive notification of changes in the associated
annotation object, which has the leader object in its persistent reactor list:
AcDbLeader::copied()AcDbLeader::erased()AcDbLeader::goodbye()AcDbLeader::modified()
def __init__(self, id: PyDb.ObjectId, mode: PyDb.OpenMode) -> None:
The AcDbLeader class represents the LEADER entity within AutoCAD. Leaders are considered as
dimensions in AutoCAD, which means they are controlled by dimension variable settings and
dimension styles. This class contains a dynamic array of points that are the vertices for
the leader line. The first point in the array is the start of the leader. If the leader has
an arrowhead it is located here. If the length of the first segment of the leader is less
than twice the arrowhead size the arrowhead is suppressed. If the leader has an associated
annotation object the last point of the leader is placed near it. By default a leader has
straight line segments, but it may be set to fit a spline to the vertexes. Associativity
between a leader and another object may be controlled by the methods attachAnnotation() and
detachAnnotation(). Some editing methods will automatically break associativity, as
described below. To update the leader endpoint position relative to its associated
annotation use the evaluateLeader() method. The following persistent reactor notification
functions are overridden by AcDbLeader to receive notification of changes in the associated
annotation object, which has the leader object in its persistent reactor list:
AcDbLeader::copied()AcDbLeader::erased()AcDbLeader::goodbye()AcDbLeader::modified()
def __init__(self, id: PyDb.ObjectId, mode: PyDb.OpenMode, erased: bool) -> None:
The AcDbLeader class represents the LEADER entity within AutoCAD. Leaders are considered as
dimensions in AutoCAD, which means they are controlled by dimension variable settings and
dimension styles. This class contains a dynamic array of points that are the vertices for
the leader line. The first point in the array is the start of the leader. If the leader has
an arrowhead it is located here. If the length of the first segment of the leader is less
than twice the arrowhead size the arrowhead is suppressed. If the leader has an associated
annotation object the last point of the leader is placed near it. By default a leader has
straight line segments, but it may be set to fit a spline to the vertexes. Associativity
between a leader and another object may be controlled by the methods attachAnnotation() and
detachAnnotation(). Some editing methods will automatically break associativity, as
described below. To update the leader endpoint position relative to its associated
annotation use the evaluateLeader() method. The following persistent reactor notification
functions are overridden by AcDbLeader to receive notification of changes in the associated
annotation object, which has the leader object in its persistent reactor list:
AcDbLeader::copied()AcDbLeader::erased()AcDbLeader::goodbye()AcDbLeader::modified()
def __init__(*args) -> None:
The AcDbLeader class represents the LEADER entity within AutoCAD. Leaders are considered as
dimensions in AutoCAD, which means they are controlled by dimension variable settings and
dimension styles. This class contains a dynamic array of points that are the vertices for
the leader line. The first point in the array is the start of the leader. If the leader has
an arrowhead it is located here. If the length of the first segment of the leader is less
than twice the arrowhead size the arrowhead is suppressed. If the leader has an associated
annotation object the last point of the leader is placed near it. By default a leader has
straight line segments, but it may be set to fit a spline to the vertexes. Associativity
between a leader and another object may be controlled by the methods attachAnnotation() and
detachAnnotation(). Some editing methods will automatically break associativity, as
described below. To update the leader endpoint position relative to its associated
annotation use the evaluateLeader() method. The following persistent reactor notification
functions are overridden by AcDbLeader to receive notification of changes in the associated
annotation object, which has the leader object in its persistent reactor list:
AcDbLeader::copied()AcDbLeader::erased()AcDbLeader::goodbye()AcDbLeader::modified()
def __reduce__(self) -> Any:
def annoHeight(self) -> float:
def annoType(self) -> AnnoType:
def annoWidth(self) -> float:
def annotationObjId(self) -> ObjectId:
def annotationOffset(self) -> PyGe.Vector3d:
def appendVertex(self, pt: PyGe.Point3d) -> bool:
def attachAnnotation(self, id: PyDb.ObjectId) -> None:
def cast(otherObject: PyRx.RxObject) -> Leader:
def className() -> str:
def cloneFrom(otherObject: PyRx.RxObject) -> Leader:
def copied(self, obja: PyDb.DbObject, objb: PyDb.DbObject) -> None:
def desc() -> PyRx.RxClass:
Returns a pointer to the AcRxClass object representing the specific class, or most recent
parent class explicitly registered with ObjectARX of either the pointer type used to invoke
it or the class qualifier used with it. (Remember that when a static member function is
invoked via a pointer, the pointer type, not the object type, determines which
implementation of the function is invoked.) When working with a pointer to an object and
the proper AcRxClass object for the class of the object pointed to is desired, the
AcRxObject::isA() function should be used, since it is a virtual non-static method and is
therefore not pointer type dependent. Caching the value of the pointer returned by this
method is acceptable, provided the application knows that the AcRxClass object pointed to
by the returned pointer was created by an ObjectARX application that will not be unloaded.
def detachAnnotation(self) -> None:
def dimasz(self) -> float:
def dimclrd(self) -> Color:
def dimensionStyle(self) -> HardPointerId:
def dimgap(self) -> float:
def dimlwd(self) -> LineWeight:
def dimsah(self) -> bool:
def dimscale(self) -> float:
def dimtad(self) -> int:
def dimtxsty(self) -> ObjectId:
def dimtxt(self) -> float:
def disableArrowHead(self) -> None:
def erased(self, obj: PyDb.DbObject, val: bool) -> None:
def evaluateLeader(self) -> None:
def firstVertex(self) -> PyGe.Point3d:
def goodbye(self, obj: PyDb.DbObject) -> None:
def hasArrowHead(self) -> bool:
def hasHookLine(self) -> bool:
def isSplined(self) -> bool:
def lastVertex(self) -> PyGe.Point3d:
def modified(self, obj: PyDb.DbObject) -> None:
def normal(self) -> PyGe.Vector3d:
def numVertices(self) -> int:
def removeLastVertex(self) -> None:
def setAnnotationObjId(self, id: PyDb.ObjectId) -> None:
def setAnnotationOffset(self, vec: PyGe.Vector3d) -> None:
def setColorIndex(self, idx: int, dosubents: bool) -> None:
def setDimasz(self, val: float) -> None:
def setDimclrd(self, clr: PyDb.AcCmColor) -> None:
def setDimensionStyle(self, id: PyDb.ObjectId) -> None:
def setDimgap(self, val: float) -> None:
def setDimldrblk(self, id: str | PyDb.ObjectId) -> None:
def setDimlwd(self, val: PyDb.LineWeight) -> None:
def setDimsah(self, val: bool) -> None:
def setDimscale(self, val: float) -> None:
def setDimstyleData(self, id: PyDb.ObjectId) -> None:
def setDimtad(self, val: int) -> None:
def setDimtxsty(self, id: PyDb.ObjectId) -> None:
def setDimtxt(self, val: float) -> None:
def setHasArrowHead(self, val: bool) -> None:
def setPlane(self, val: PyGe.Plane) -> None:
def setSplined(self, val: bool) -> None:
def setToSplineLeader(self) -> None:
def setToStraightLeader(self) -> None:
def setVertexAt(self, val: int, pt: PyGe.Point3d) -> bool:
def vertexAt(self, val: int) -> PyGe.Point3d:
class Line Class
def __init__(self) -> None:
The [AcDbLine](https://cext-dan.github.io/CADPyRxDoc/PyDb.html#Line) class represents the
line entity in AutoCAD. A line object is a 3D object that is specified by its start point,
endpoint, and normal vector. In addition, the line object supports thickness along its
normal vector direction (that is, height or 'extrusion').
def __init__(self, start: PyGe.Point3d, end: PyGe.Point3d) -> None:
The [AcDbLine](https://cext-dan.github.io/CADPyRxDoc/PyDb.html#Line) class represents the
line entity in AutoCAD. A line object is a 3D object that is specified by its start point,
endpoint, and normal vector. In addition, the line object supports thickness along its
normal vector direction (that is, height or 'extrusion').
def __init__(self, id: PyDb.ObjectId) -> None:
The [AcDbLine](https://cext-dan.github.io/CADPyRxDoc/PyDb.html#Line) class represents the
line entity in AutoCAD. A line object is a 3D object that is specified by its start point,
endpoint, and normal vector. In addition, the line object supports thickness along its
normal vector direction (that is, height or 'extrusion').
def __init__(self, id: PyDb.ObjectId, mode: PyDb.OpenMode) -> None:
The [AcDbLine](https://cext-dan.github.io/CADPyRxDoc/PyDb.html#Line) class represents the
line entity in AutoCAD. A line object is a 3D object that is specified by its start point,
endpoint, and normal vector. In addition, the line object supports thickness along its
normal vector direction (that is, height or 'extrusion').
def __init__(self, id: PyDb.ObjectId, mode: PyDb.OpenMode, erased: bool) -> None:
The [AcDbLine](https://cext-dan.github.io/CADPyRxDoc/PyDb.html#Line) class represents the
line entity in AutoCAD. A line object is a 3D object that is specified by its start point,
endpoint, and normal vector. In addition, the line object supports thickness along its
normal vector direction (that is, height or 'extrusion').
def __init__(*args) -> None:
The [AcDbLine](https://cext-dan.github.io/CADPyRxDoc/PyDb.html#Line) class represents the
line entity in AutoCAD. A line object is a 3D object that is specified by its start point,
endpoint, and normal vector. In addition, the line object supports thickness along its
normal vector direction (that is, height or 'extrusion').
def __reduce__(self) -> Any:
def cast(otherObject: PyRx.RxObject) -> Line:
def className() -> str:
def cloneFrom(otherObject: PyRx.RxObject) -> Line:
def desc() -> PyRx.RxClass:
Returns a pointer to the AcRxClass object representing the specific class, or most recent
parent class explicitly registered with ObjectARX of either the pointer type used to invoke
it or the class qualifier used with it. (Remember that when a static member function is
invoked via a pointer, the pointer type, not the object type, determines which
implementation of the function is invoked.) When working with a pointer to an object and
the proper AcRxClass object for the class of the object pointed to is desired, the
AcRxObject::isA() function should be used, since it is a virtual non-static method and is
therefore not pointer type dependent. Caching the value of the pointer returned by this
method is acceptable, provided the application knows that the AcRxClass object pointed to
by the returned pointer was created by an ObjectARX application that will not be unloaded.
def direction(self) -> PyGe.Vector3d:
def endPoint(self) -> PyGe.Point3d:
This function returns the line's endpoint in WCS coordinates. The end point value is used
for DXF group code 11.
def getAcGeCurve(self, tol: PyGe.Tol) -> PyGe.LineSeg3d:
This is getAcGeCurve, a member of class AcDbCurve.
def getOffsetCurvesGivenPlaneNormal(self, val: PyGe.Vector3d, offset: float) -> list[PyDb.Curve]:
This function creates one or more entities that, together, make up the result of offsetting
the curve by the distance offsetDist in the plane with normal vector normal. For many
curves, the result will be a single new curve, which may not be of the same class as the
original curve. For example, offsetting an AcDbEllipse results in an AcDbSpline, since the
result of offsetting an ellipse does not fit the equation of an ellipse. However, in some
cases it might be necessary for the offset result to be several curves. To allow for this
possibility, a dynamic array of void pointers is used to hold pointers to the resulting
entity or entities. To use this array of pointers, the calling application must cast the
pointer(s) to the appropriate object type(s). If only a specific entity type or set of
types are to be handled, then using the cast method of the class(es) desired to see if each
pointer can be safely cast to that object type will work. If the actual object type is
desired, then each object's isA() method may be used to get a pointer to the object's
AcRxClass object, which has a name() method to get the classname of the object. If the
offsetDist value is negative this is usually interpreted as being an offset to make a
smaller curve (that is, for an arc it would offset to a radius that is offsetDist less than
the starting curve's radius). Or, if smaller has no meaning, then a negative offsetDist may
be interpreted as an offset in the direction of smaller X,Y,Z WCS coordinates. However,
this is not enforced, so custom entities can interpret the sign of the offsetDist value
however they wish. The entities returned in the offsetCurves arrays are dynamically
allocated, but have not been added to an AcDbDatabase yet. So, the application that calls
this function is responsible for their memory. If they are subsequently appended to a
database, then the database takes over responsibility for their memory. Otherwise, the
application is responsible for deleting them when they are no longer needed. Returns
Acad::eOk if offsetting is successfully completed. If the offset distance is invalid, or if
normal is a zero length vector or the entity is linear and normal is not perpendicular with
the entity, then Acad::eInvalidInput is returned. Other ErrorStatus return values are
implementation dependent. The default implementation returns Acad::eNotImplemented.
def midPoint(self) -> PyGe.Point3d:
def normal(self) -> PyGe.Vector3d:
This function returns the line's unit normal vector in WCS coordinates. The normal value is
used for DXF group code 210.
def setEndPoint(self, val: PyGe.Point3d) -> None:
Sets endPt to be the line's new endpoint. endPt must be in WCS coordinates. The end point
value is used for DXF group code 11. Returns Acad::eOk if successful or Acad::eInvalidInput
if the data passed in is not acceptable.
def setNormal(self, val: PyGe.Vector3d) -> None:
Sets normal to be the line's normal vector. normal must be in WCS coordinates. The normal
value is used for DXF group code 210. Returns Acad::eOk if successful or
Acad::eInvalidInput if the data passed in is not acceptable.
def setStartPoint(self, val: PyGe.Point3d) -> None:
Sets startPt to be the line's new start point. startPt must be in WCS coordinates. The
start point value is used for DXF group code 10. Returns Acad::eOk if successful or
Acad::eInvalidInput if the data passed in is not acceptable.
def setThickness(self, val: float) -> None:
Sets thickness to be the thickness value for the line. The thickness is the line's
dimension along its normal vector direction (sometimes called the extrusion direction). The
thickness value is used for DXF group code 39. Returns Acad::eOk if successful or
Acad::eInvalidInput if the data passed in is not acceptable.
def startPoint(self) -> PyGe.Point3d:
This function returns the line's start point in WCS coordinates. The start point value is
used for DXF group code 10.
def thickness(self) -> float:
This function returns the line's thickness value. The thickness is the line's dimension
along its normal vector direction (sometimes called the extrusion direction). The thickness
value is used for DXF group code 39.
class LineAngularDimension2 Class
def __init__(self) -> None:
The AcDb2LineAngularDimension class represents the angular dimension defined by two lines
(as opposed to three points) within AutoCAD.
def __init__(self, xL1Start: PyGe.Point3d, xL1End: PyGe.Point3d, xL2Start: PyGe.Point3d, xL2End: PyGe.Point3d, arcPnt: PyGe.Point3d) -> None:
The AcDb2LineAngularDimension class represents the angular dimension defined by two lines
(as opposed to three points) within AutoCAD.
def __init__(self, xL1Start: PyGe.Point3d, xL1End: PyGe.Point3d, xL2Start: PyGe.Point3d, xL2End: PyGe.Point3d, arcPnt: PyGe.Point3d, dimText: str) -> None:
The AcDb2LineAngularDimension class represents the angular dimension defined by two lines
(as opposed to three points) within AutoCAD.
def __init__(self, xL1Start: PyGe.Point3d, xL1End: PyGe.Point3d, xL2Start: PyGe.Point3d, xL2End: PyGe.Point3d, arcPnt: PyGe.Point3d, dimText: str, id: PyDb.ObjectId) -> None:
The AcDb2LineAngularDimension class represents the angular dimension defined by two lines
(as opposed to three points) within AutoCAD.
def __init__(self, id: PyDb.ObjectId) -> None:
The AcDb2LineAngularDimension class represents the angular dimension defined by two lines
(as opposed to three points) within AutoCAD.
def __init__(self, id: PyDb.ObjectId, mode: PyDb.OpenMode) -> None:
The AcDb2LineAngularDimension class represents the angular dimension defined by two lines
(as opposed to three points) within AutoCAD.
def __init__(self, id: PyDb.ObjectId, mode: PyDb.OpenMode, erased: bool) -> None:
The AcDb2LineAngularDimension class represents the angular dimension defined by two lines
(as opposed to three points) within AutoCAD.
def __init__(*args) -> None:
The AcDb2LineAngularDimension class represents the angular dimension defined by two lines
(as opposed to three points) within AutoCAD.
def __reduce__(self) -> Any:
def arcPoint(self) -> PyGe.Point3d:
This function returns the dimension definition point (in WCS coordinates) that is used to
determine the location of the arc of the dimension. The arc definition point is the WCS
equivalent of the DXF group code 16.
def cast(otherObject: PyRx.RxObject) -> LineAngularDimension2:
def className() -> str:
def cloneFrom(otherObject: PyRx.RxObject) -> LineAngularDimension2:
def desc() -> PyRx.RxClass:
Returns a pointer to the AcRxClass object representing the specific class, or most recent
parent class explicitly registered with ObjectARX of either the pointer type used to invoke
it or the class qualifier used with it. (Remember that when a static member function is
invoked via a pointer, the pointer type, not the object type, determines which
implementation of the function is invoked.) When working with a pointer to an object and
the proper AcRxClass object for the class of the object pointed to is desired, the
AcRxObject::isA() function should be used, since it is a virtual non-static method and is
therefore not pointer type dependent. Caching the value of the pointer returned by this
method is acceptable, provided the application knows that the AcRxClass object pointed to
by the returned pointer was created by an ObjectARX application that will not be unloaded.
def extArcOn(self) -> bool:
Returns true if extension arc is on. Otherwise, it returns false.
def setArcPoint(self, pt: PyGe.Point3d) -> None:
This function sets the dimension to use pt (in WCS coordinates) as the definition point
that is used to determine the location of the arc for the dimension. The arc definition
point is the WCS equivalent of the DXF group code 16. This function always returns
Acad::eOk.
def setExtArcOn(self, val: bool) -> None:
This function turns the extension arc flag on or off. Returns Acad::eOk if successful.
Otherwise, it returns Acad::eInvalidInput.
def setXLine1End(self, pt: PyGe.Point3d) -> None:
This function sets the dimension to use pt (in WCS coordinates) as the definition point for
the end point of the first extension line of the dimension. The first extension line
endpoint is used for DXF group code 14. This function always returns Acad::eOk.
def setXLine1Start(self, pt: PyGe.Point3d) -> None:
This function sets the dimension to use pt (in WCS coordinates) as the definition point for
the start point of the first extension line of the dimension. The AutoCAD DIMEXO dimension
variable will affect how the extension line is displayed relative to this point. The first
extension line start point is used for DXF group code 13. This function always returns
Acad::eOk.
def setXLine2End(self, pt: PyGe.Point3d) -> None:
This function sets the dimension to use pt (in WCS coordinates) as the definition point for
the end point of the second extension line of the dimension.
def setXLine2Start(self, pt: PyGe.Point3d) -> None:
This function sets the dimension to use pt (in WCS coordinates) as the definition point for
the start point of the second extension line of the dimension. The AutoCAD DIMEXO dimension
variable will affect how the extension line is displayed relative to this point. The second
extension line start point is used for DXF group code 15. This function always returns
Acad::eOk.
def xLine1End(self) -> PyGe.Point3d:
This function returns the dimension definition point (in WCS coordinates) that is used for
the end point of the first extension line of the dimension. The first extension line
endpoint is used for DXF group code 14.
def xLine1Start(self) -> PyGe.Point3d:
This function returns the dimension definition point (in WCS coordinates) that is used for
the start point of the first extension line of the dimension. The AutoCAD DIMEXO dimension
variable will affect how the extension line is displayed relative to this point. The first
extension line start point is used for DXF group code 13.
def xLine2End(self) -> PyGe.Point3d:
This function returns the dimension definition point (in WCS coordinates) that is used for
the end point of the second extension line of the dimension.
def xLine2Start(self) -> PyGe.Point3d:
This function sets the dimension to use pt (in WCS coordinates) as the definition point for
the start point of the second extension line of the dimension. The AutoCAD DIMEXO dimension
variable will affect how the extension line is displayed relative to this point. The second
extension line start point is used for DXF group code 15. This function always returns
Acad::eOk.
class LineSpacingStyle Class
kAtLeast: ClassVar[Self]
kExactly: ClassVar[Self]
class LineWeight Class
kLnWt000: ClassVar[Self]
kLnWt005: ClassVar[Self]
kLnWt009: ClassVar[Self]
kLnWt013: ClassVar[Self]
kLnWt015: ClassVar[Self]
kLnWt018: ClassVar[Self]
kLnWt020: ClassVar[Self]
kLnWt025: ClassVar[Self]
kLnWt030: ClassVar[Self]
kLnWt035: ClassVar[Self]
kLnWt040: ClassVar[Self]
kLnWt050: ClassVar[Self]
kLnWt053: ClassVar[Self]
kLnWt060: ClassVar[Self]
kLnWt070: ClassVar[Self]
kLnWt080: ClassVar[Self]
kLnWt090: ClassVar[Self]
kLnWt100: ClassVar[Self]
kLnWt106: ClassVar[Self]
kLnWt120: ClassVar[Self]
kLnWt140: ClassVar[Self]
kLnWt158: ClassVar[Self]
kLnWt200: ClassVar[Self]
kLnWt211: ClassVar[Self]
kLnWtByLayer: ClassVar[Self]
kLnWtByBlock: ClassVar[Self]
kLnWtByLwDefault: ClassVar[Self]
class LinetypeTable Class
def __init__(self, id: PyDb.ObjectId, mode: PyDb.OpenMode, erased: bool) -> None:
def __reduce__(self) -> Any:
def add(self, val: PyDb.LinetypeTableRecord) -> ObjectId:
This function adds the record pointed to by pRecord to both the database containing the
table and the table itself. If the addition succeeds, recordId is set to the AcDbObjectId
of the pRecord once it's been added to the database. Possible return ErrorStatus codes are:
Acad::eOk, Acad::eOutOfMemory, Acad::eDuplicateRecordName, Acad::eNoDatabase (if the
LinetypeTable is not in a database).
def cast(otherObject: PyRx.RxObject) -> LinetypeTable:
def className() -> str:
def cloneFrom(otherObject: PyRx.RxObject) -> LinetypeTable:
def desc() -> PyRx.RxClass:
Returns a pointer to the AcRxClass object representing the specific class, or most recent
parent class explicitly registered with ObjectARX of either the pointer type used to invoke
it or the class qualifier used with it. (Remember that when a static member function is
invoked via a pointer, the pointer type, not the object type, determines which
implementation of the function is invoked.) When working with a pointer to an object and
the proper AcRxClass object for the class of the object pointed to is desired, the
AcRxObject::isA() function should be used, since it is a virtual non-static method and is
therefore not pointer type dependent. Caching the value of the pointer returned by this
method is acceptable, provided the application knows that the AcRxClass object pointed to
by the returned pointer was created by an ObjectARX application that will not be unloaded.
class LinetypeTableRecord Class
def __init__(self) -> None:
Objects of this class represent records in the AcDbLinetypeTable. Each of these records
contains the information about a linetype in the drawing database. Within the
LinetypeTableRecord, the dashes (line segments that make up characteristics of the
linetype) are stored in a list with an index that is zero based. If the linetype is
complex, then embedded shapes or text strings are stored in the list at the same index as
the dash that preceded them in the linetype definition. So there will always be a
dashLength for any valid index in the list, even if there is a shape or text string sharing
the same index. When the linetype is elaborated, a shape's insertion point will coincide
with the end of the dash that it shares an index with.
def __init__(self, id: PyDb.ObjectId) -> None:
Objects of this class represent records in the AcDbLinetypeTable. Each of these records
contains the information about a linetype in the drawing database. Within the
LinetypeTableRecord, the dashes (line segments that make up characteristics of the
linetype) are stored in a list with an index that is zero based. If the linetype is
complex, then embedded shapes or text strings are stored in the list at the same index as
the dash that preceded them in the linetype definition. So there will always be a
dashLength for any valid index in the list, even if there is a shape or text string sharing
the same index. When the linetype is elaborated, a shape's insertion point will coincide
with the end of the dash that it shares an index with.
def __init__(self, id: PyDb.ObjectId, mode: PyDb.OpenMode) -> None:
Objects of this class represent records in the AcDbLinetypeTable. Each of these records
contains the information about a linetype in the drawing database. Within the
LinetypeTableRecord, the dashes (line segments that make up characteristics of the
linetype) are stored in a list with an index that is zero based. If the linetype is
complex, then embedded shapes or text strings are stored in the list at the same index as
the dash that preceded them in the linetype definition. So there will always be a
dashLength for any valid index in the list, even if there is a shape or text string sharing
the same index. When the linetype is elaborated, a shape's insertion point will coincide
with the end of the dash that it shares an index with.
def __init__(self, id: PyDb.ObjectId, mode: PyDb.OpenMode, erased: bool) -> None:
Objects of this class represent records in the AcDbLinetypeTable. Each of these records
contains the information about a linetype in the drawing database. Within the
LinetypeTableRecord, the dashes (line segments that make up characteristics of the
linetype) are stored in a list with an index that is zero based. If the linetype is
complex, then embedded shapes or text strings are stored in the list at the same index as
the dash that preceded them in the linetype definition. So there will always be a
dashLength for any valid index in the list, even if there is a shape or text string sharing
the same index. When the linetype is elaborated, a shape's insertion point will coincide
with the end of the dash that it shares an index with.
def __init__(*args) -> None:
Objects of this class represent records in the AcDbLinetypeTable. Each of these records
contains the information about a linetype in the drawing database. Within the
LinetypeTableRecord, the dashes (line segments that make up characteristics of the
linetype) are stored in a list with an index that is zero based. If the linetype is
complex, then embedded shapes or text strings are stored in the list at the same index as
the dash that preceded them in the linetype definition. So there will always be a
dashLength for any valid index in the list, even if there is a shape or text string sharing
the same index. When the linetype is elaborated, a shape's insertion point will coincide
with the end of the dash that it shares an index with.
def __reduce__(self) -> Any:
def cast(otherObject: PyRx.RxObject) -> LinetypeTableRecord:
def className() -> str:
def cloneFrom(otherObject: PyRx.RxObject) -> LinetypeTableRecord:
def comments(self) -> str:
def dashLengthAt(self, idx: int) -> float:
def desc() -> PyRx.RxClass:
Returns a pointer to the AcRxClass object representing the specific class, or most recent
parent class explicitly registered with ObjectARX of either the pointer type used to invoke
it or the class qualifier used with it. (Remember that when a static member function is
invoked via a pointer, the pointer type, not the object type, determines which
implementation of the function is invoked.) When working with a pointer to an object and
the proper AcRxClass object for the class of the object pointed to is desired, the
AcRxObject::isA() function should be used, since it is a virtual non-static method and is
therefore not pointer type dependent. Caching the value of the pointer returned by this
method is acceptable, provided the application knows that the AcRxClass object pointed to
by the returned pointer was created by an ObjectARX application that will not be unloaded.
def isScaledToFit(self) -> bool:
def numDashes(self) -> int:
def patternLength(self) -> float:
def setComments(self, val: str) -> None:
def setDashLengthAt(self, idx: int, val: float) -> None:
def setIsScaledToFit(self, val: bool) -> None:
def setNumDashes(self, val: int) -> None:
def setPatternLength(self, val: float) -> None:
def setShapeIsUcsOrientedAt(self, idx: int, isUcsOriented: bool) -> None:
def setShapeIsUprightAt(self, idx: int, isUpright: bool) -> None:
def setShapeNumberAt(self, idx: int, val: int) -> None:
def setShapeOffsetAt(self, idx: int, vec: PyGe.Vector2d) -> None:
def setShapeRotationAt(self, idx: int, val: float) -> None:
def setShapeScaleAt(self, idx: int, scale: float) -> None:
def setShapeStyleAt(self, idx: int, id: PyDb.ObjectId) -> None:
def setTextAt(self, idx: int, val: str) -> None:
def shapeIsUcsOrientedAt(self, idx: int) -> bool:
def shapeIsUprightAt(self, idx: int) -> bool:
def shapeNumberAt(self, idx: int) -> int:
def shapeOffsetAt(self, idx: int) -> PyGe.Vector2d:
def shapeRotationAt(self, idx: int) -> float:
def shapeScaleAt(self, idx: int) -> float:
def shapeStyleAt(self, idx: int) -> ObjectId:
def textAt(self, idx: int) -> str:
class LoftedSurface Class
def __init__(self, id: PyDb.ObjectId, mode: PyDb.OpenMode, erased: bool) -> None:
def __reduce__(self) -> Any:
def cast(otherObject: PyRx.RxObject) -> LoftedSurface:
def className() -> str:
def cloneFrom(otherObject: PyRx.RxObject) -> LoftedSurface:
def desc() -> PyRx.RxClass:
Returns a pointer to the AcRxClass object representing the specific class, or most recent
parent class explicitly registered with ObjectARX of either the pointer type used to invoke
it or the class qualifier used with it. (Remember that when a static member function is
invoked via a pointer, the pointer type, not the object type, determines which
implementation of the function is invoked.) When working with a pointer to an object and
the proper AcRxClass object for the class of the object pointed to is desired, the
AcRxObject::isA() function should be used, since it is a virtual non-static method and is
therefore not pointer type dependent. Caching the value of the pointer returned by this
method is acceptable, provided the application knows that the AcRxClass object pointed to
by the returned pointer was created by an ObjectARX application that will not be unloaded.
class MInsertBlock Class
def __init__(self) -> None:
The AcDbMInsertBlock class represents a special form of the INSERT entity in which an array
of duplicate images of the entities within the referenced AcDbBlockTableRecord is
displayed. Creating an AcDbMInsertBlock with a definition of rows = 1 and columns = 1 will
create a AcDbBlockReference instead.
def __init__(self, position: PyGe.Point3d, blockTableRec: PyDb.ObjectId, columns: int, rows: int, colSpacing: float, rowSpacing: float) -> None:
The AcDbMInsertBlock class represents a special form of the INSERT entity in which an array
of duplicate images of the entities within the referenced AcDbBlockTableRecord is
displayed. Creating an AcDbMInsertBlock with a definition of rows = 1 and columns = 1 will
create a AcDbBlockReference instead.
def __init__(self, id: PyDb.ObjectId) -> None:
The AcDbMInsertBlock class represents a special form of the INSERT entity in which an array
of duplicate images of the entities within the referenced AcDbBlockTableRecord is
displayed. Creating an AcDbMInsertBlock with a definition of rows = 1 and columns = 1 will
create a AcDbBlockReference instead.
def __init__(self, id: PyDb.ObjectId, mode: PyDb.OpenMode) -> None:
The AcDbMInsertBlock class represents a special form of the INSERT entity in which an array
of duplicate images of the entities within the referenced AcDbBlockTableRecord is
displayed. Creating an AcDbMInsertBlock with a definition of rows = 1 and columns = 1 will
create a AcDbBlockReference instead.
def __init__(self, id: PyDb.ObjectId, mode: PyDb.OpenMode, erased: bool) -> None:
The AcDbMInsertBlock class represents a special form of the INSERT entity in which an array
of duplicate images of the entities within the referenced AcDbBlockTableRecord is
displayed. Creating an AcDbMInsertBlock with a definition of rows = 1 and columns = 1 will
create a AcDbBlockReference instead.
def __init__(*args) -> None:
The AcDbMInsertBlock class represents a special form of the INSERT entity in which an array
of duplicate images of the entities within the referenced AcDbBlockTableRecord is
displayed. Creating an AcDbMInsertBlock with a definition of rows = 1 and columns = 1 will
create a AcDbBlockReference instead.
def __reduce__(self) -> Any:
def cast(otherObject: PyRx.RxObject) -> MInsertBlock:
def className() -> str:
def cloneFrom(otherObject: PyRx.RxObject) -> MInsertBlock:
def columnSpacing(self) -> float:
This function returns the spacing between the columns of the BlockTableRecord image that
will be displayed by the MInsert object. The column spacing value is used for DXF group
code 44.
def columns(self) -> int:
This function returns the number of columns of the AcDbBlockTableRecord image that will be
displayed by the MInsertBlock object. The column value is used for DXF group code 70.
def desc() -> PyRx.RxClass:
Returns a pointer to the AcRxClass object representing the specific class, or most recent
parent class explicitly registered with ObjectARX of either the pointer type used to invoke
it or the class qualifier used with it. (Remember that when a static member function is
invoked via a pointer, the pointer type, not the object type, determines which
implementation of the function is invoked.) When working with a pointer to an object and
the proper AcRxClass object for the class of the object pointed to is desired, the
AcRxObject::isA() function should be used, since it is a virtual non-static method and is
therefore not pointer type dependent. Caching the value of the pointer returned by this
method is acceptable, provided the application knows that the AcRxClass object pointed to
by the returned pointer was created by an ObjectARX application that will not be unloaded.
def rowSpacing(self) -> float:
This function returns the spacing between the rows of the BlockTableRecord image that will
be displayed by the MInsert object. The row spacing value is used for DXF group code 45.
def rows(self) -> int:
This function returns the number of rows of the BlockTableRecord image that will be
displayed by the MInsert object. The row value is used for DXF group code 71.
def setColumnSpacing(self, val: float) -> None:
This function sets cSpacing to be the spacing between the columns of the BlockTableRecord
image that will be displayed by the MInsert object. The column spacing value is used for
DXF group code 44. Returns Acad::eOk if successful or Acad::eInvalidInput if the data
passed in is not acceptable.
def setColumns(self, val: int) -> None:
This function sets cCount to be the number of columns of the BlockTableRecord image that
will be displayed by the MInsert object. The column value is used for DXF group code 70.
Returns Acad::eOk if successful or Acad::eInvalidInput if the data passed in is not
acceptable.
def setRowSpacing(self, val: float) -> None:
This function sets rSpacing to be the spacing between the rows of the BlockTableRecord
image that will be displayed by the MInsert object. The row spacing value is used for DXF
group code 45. Returns Acad::eOk if successful or Acad::eInvalidInput if the data passed in
is not acceptable.
def setRows(self, val: int) -> None:
This function sets rCount to be the number of rows of the BlockTableRecord image that will
be displayed by the MInsert object. The row value is used for DXF group code 71. Returns
Acad::eOk if successful or Acad::eInvalidInput if the data passed in is not acceptable.
class MLeader Class
def MLeaderStyle(self) -> ObjectId:
def __init__(self) -> None:
def __init__(self, id: PyDb.ObjectId) -> None:
def __init__(self, id: PyDb.ObjectId, mode: PyDb.OpenMode) -> None:
def __init__(self, id: PyDb.ObjectId, mode: PyDb.OpenMode, erased: bool) -> None:
def __init__(*args) -> None:
def __reduce__(self) -> Any:
def addFirstVertex(self, leaderLineIndex: int, pt: PyGe.Point3d) -> None:
def addLastVertex(self, leaderLineIndex: int, pt: PyGe.Point3d) -> None:
def addLeader(self) -> int:
def addLeaderLine(self, val: int | PyGe.Point3d) -> int:
def arrowSize(self) -> float:
def arrowSymbolId(self) -> ObjectId:
def blockColor(self) -> Color:
def blockConnectionType(self) -> MLeaderBlockConnectionType:
def blockContentId(self) -> ObjectId:
def blockRotation(self) -> float:
def blockScale(self) -> PyGe.Scale3d:
def cast(otherObject: PyRx.RxObject) -> MLeader:
def className() -> str:
def cloneFrom(otherObject: PyRx.RxObject) -> MLeader:
def connectionPoint(self, vec: PyGe.Vector3d) -> PyGe.Point3d:
def connectionPoint(self, vec: PyGe.Vector3d, textAttachmentDirection: PyDb.MLeaderTextAttachmentDirection) -> PyGe.Point3d:
def connectionPoint(*args) -> PyGe.Point3d:
def contentType(self) -> MLeaderContentType:
def desc() -> PyRx.RxClass:
Returns a pointer to the AcRxClass object representing the specific class, or most recent
parent class explicitly registered with ObjectARX of either the pointer type used to invoke
it or the class qualifier used with it. (Remember that when a static member function is
invoked via a pointer, the pointer type, not the object type, determines which
implementation of the function is invoked.) When working with a pointer to an object and
the proper AcRxClass object for the class of the object pointed to is desired, the
AcRxObject::isA() function should be used, since it is a virtual non-static method and is
therefore not pointer type dependent. Caching the value of the pointer returned by this
method is acceptable, provided the application knows that the AcRxClass object pointed to
by the returned pointer was created by an ObjectARX application that will not be unloaded.
def doglegLength(self) -> float:
def enableAnnotationScale(self) -> bool:
def enableDogleg(self) -> bool:
def enableFrameText(self) -> bool:
def enableLanding(self) -> bool:
def extendLeaderToText(self) -> bool:
def getArrowSize(self, leaderLineIndex: int) -> float:
def getArrowSymbolId(self, leaderLineIndex: int) -> ObjectId:
def getBlockAttribute(self, id: PyDb.ObjectId) -> AttributeReference:
def getBlockAttributeValue(self, id: PyDb.ObjectId) -> str:
def getBlockPosition(self) -> PyGe.Point3d:
def getContentGeomExtents(self) -> Extents:
def getDoglegDirection(self, leaderIndex: int) -> PyGe.Vector3d:
def getDoglegLength(self, leaderIndex: int) -> float:
def getFirstVertex(self, leaderLineIndex: int) -> PyGe.Point3d:
def getLastVertex(self, leaderLineIndex: int) -> PyGe.Point3d:
def getLeaderIndex(self, leaderLineIndex: int) -> int:
def getLeaderIndexes(self) -> list[int]:
def getLeaderLineColor(self, leaderLineIndex: int) -> Color:
def getLeaderLineIndexes(self, leaderIndex: int) -> list[int]:
def getLeaderLineType(self, leaderLineIndex: int) -> MLeaderLeaderType:
def getLeaderLineTypeId(self, leaderLineIndex: int) -> ObjectId:
def getLeaderLineWeight(self, leaderLineIndex: int) -> LineWeight:
def getOverridedMLeaderStyle(self, outVal: PyDb.MLeaderStyle) -> None:
def getTextLocation(self) -> PyGe.Point3d:
def getToleranceLocation(self) -> PyGe.Point3d:
def getVertex(self, leaderLineIndex: int, idx: int) -> PyGe.Point3d:
def hasContent(self) -> bool:
def isOverride(self, val: PyDb.MLeaderPropertyOverrideType) -> bool:
def landingGap(self) -> float:
def leaderLineColor(self) -> Color:
def leaderLineType(self) -> MLeaderLeaderType:
def leaderLineTypeId(self) -> ObjectId:
def leaderLineWeight(self) -> LineWeight:
def modified(self, id: PyDb.ObjectId) -> None:
def moveMLeader(self, vec: PyGe.Vector3d, moveType: PyDb.MLeaderMoveType, bAutoSwitchDogleg: bool) -> None:
def mtext(self) -> MText:
def normal(self) -> PyGe.Vector3d:
def numLeaderLines(self) -> int:
def numLeaders(self) -> int:
def numVertices(self, leaderLineIndex: int) -> int:
def objectClosed(self, id: PyDb.ObjectId) -> None:
def plane(self) -> PyGe.Plane:
def postMLeaderToDb(self, db: PyDb.Database) -> None:
def recomputeBreakPoints(self) -> None:
def removeFirstVertex(self, leaderLineIndex: int) -> None:
def removeLastVertex(self, leaderLineIndex: int) -> None:
def removeLeader(self, leaderIndex: int) -> None:
def removeLeaderLine(self, leaderLineIndex: int) -> None:
def removeLeaderLineRefAssoc(self, leaderLineIndex: int) -> None:
def scale(self) -> float:
def setArrowSize(self, val: float) -> None:
def setArrowSize(self, leaderLineIndex: int, val: float) -> None:
def setArrowSize(*args) -> None:
def setArrowSymbolId(self, arrowSymbolId: PyDb.ObjectId) -> None:
def setArrowSymbolId(self, leaderLineIndex: int, arrowSymbolId: PyDb.ObjectId) -> None:
def setArrowSymbolId(*args) -> None:
def setBlockAttribute(self, id: PyDb.ObjectId, attribute: PyDb.Attribute) -> None:
def setBlockAttributeValue(self, id: PyDb.ObjectId, val: str) -> None:
def setBlockColor(self, clr: PyDb.AcCmColor) -> None:
def setBlockConnectionType(self, val: PyDb.MLeaderBlockConnectionType) -> None:
def setBlockContentId(self, id: PyDb.ObjectId) -> None:
def setBlockPosition(self, pt: PyGe.Point3d) -> None:
def setBlockRotation(self, val: float) -> None:
def setBlockScale(self, val: PyGe.Scale3d) -> None:
def setContentType(self, val: PyDb.MLeaderContentType) -> None:
def setDoglegDirection(self, leaderIndex: int, vec: PyGe.Vector3d) -> None:
def setDoglegLength(self, val: float) -> None:
def setDoglegLength(self, leaderIndex: int, val: float) -> None:
def setDoglegLength(*args) -> None:
def setEnableAnnotationScale(self, val: bool) -> None:
def setEnableDogleg(self, val: bool) -> None:
def setEnableFrameText(self, val: bool) -> None:
def setEnableLanding(self, val: bool) -> None:
def setExtendLeaderToText(self, val: bool) -> None:
def setFirstVertex(self, leaderLineIndex: int, pt: PyGe.Point3d) -> None:
def setLandingGap(self, val: float) -> None:
def setLastVertex(self, leaderLineIndex: int, pt: PyGe.Point3d) -> None:
def setLeaderLineColor(self, clr: PyDb.AcCmColor) -> None:
def setLeaderLineColor(self, leaderLineIndex: int, clr: PyDb.AcCmColor) -> None:
def setLeaderLineColor(*args) -> None:
def setLeaderLineType(self, leaderLineType: PyDb.MLeaderLeaderType) -> None:
def setLeaderLineTypeId(self, id: PyDb.ObjectId) -> None:
def setLeaderLineTypeId(self, leaderLineIndex: int, id: PyDb.ObjectId) -> None:
def setLeaderLineTypeId(*args) -> None:
def setLeaderLineWeight(self, lw: PyDb.LineWeight) -> None:
def setLeaderLineWeight(self, leaderLineIndex: int, lw: PyDb.LineWeight) -> None:
def setLeaderLineWeight(*args) -> None:
def setMLeaderStyle(self, id: PyDb.ObjectId) -> None:
def setMText(self, val: PyDb.MText) -> None:
def setOverride(self, val: PyDb.MLeaderPropertyOverrideType, isOverride: bool) -> None:
def setPlane(self, val: PyGe.Plane) -> None:
def setScale(self, val: float) -> None:
def setTextAlignmentType(self, val: PyDb.MLeaderTextAlignmentType) -> None:
def setTextAngleType(self, val: PyDb.MLeaderTextAngleType) -> None:
def setTextAttachmentDirection(self, textAttachmentDirection: PyDb.MLeaderTextAttachmentDirection) -> None:
def setTextAttachmentType(self, textAttachmentType: PyDb.MLeaderTextAttachmentType) -> None:
def setTextAttachmentType(self, textAttachmentType: PyDb.MLeaderTextAttachmentType, val: PyDb.MLeaderLeaderDirectionType) -> None:
def setTextAttachmentType(*args) -> None:
def setTextColor(self, clr: PyDb.AcCmColor) -> None:
def setTextHeight(self, val: float) -> None:
def setTextLocation(self, pt: PyGe.Point3d) -> None:
def setTextStyleId(self, id: PyDb.ObjectId) -> None:
def setToleranceLocation(self, pt: PyGe.Point3d) -> None:
def setVertex(self, leaderLineIndex: int, idx: int, pt: PyGe.Point3d) -> None:
def textAlignmentType(self) -> MLeaderTextAlignmentType:
def textAngleType(self) -> MLeaderTextAngleType:
def textAttachmentDirection(self) -> MLeaderTextAttachmentDirection:
def textAttachmentType(self) -> MLeaderTextAttachmentType:
def textAttachmentType(self, val: PyDb.MLeaderLeaderDirectionType) -> MLeaderTextAttachmentType:
def textAttachmentType(*args) -> MLeaderTextAttachmentType:
def textColor(self) -> Color:
def textHeight(self) -> float:
def textStyleId(self) -> ObjectId:
def updateLeaderLinePosition(self) -> None:
class MLeaderBlockConnectionType Class
kConnectExtents: ClassVar[Self]
kConnectBase: ClassVar[Self]
class MLeaderContentType Class
kNoneContent: ClassVar[Self]
kBlockContent: ClassVar[Self]
kMTextContent: ClassVar[Self]
kToleranceContent: ClassVar[Self]
class MLeaderGsMarkType Class
kNone: ClassVar[Self]
kArrowMark: ClassVar[Self]
kLeaderLineMark: ClassVar[Self]
kDoglegMark: ClassVar[Self]
kMTextMark: ClassVar[Self]
kMTextUnderLineMark: ClassVar[Self]
kToleranceMark: ClassVar[Self]
kBlockMark: ClassVar[Self]
kBlockAttribute: ClassVar[Self]
class MLeaderLeaderDirectionType Class
kUnknownLeader: ClassVar[Self]
kLeftLeader: ClassVar[Self]
kRightLeader: ClassVar[Self]
kTopLeader: ClassVar[Self]
kBottomLeader: ClassVar[Self]
class MLeaderLeaderType Class
kInVisibleLeader: ClassVar[Self]
kStraightLeader: ClassVar[Self]
kSplineLeader: ClassVar[Self]
class MLeaderMoveType Class
kMoveAllPoints: ClassVar[Self]
kMoveAllExceptArrowHeaderPoints: ClassVar[Self]
kMoveContentAndDoglegPoints: ClassVar[Self]
class MLeaderPropertyOverrideType Class
kLeaderLineType: ClassVar[Self]
kLeaderLineColor: ClassVar[Self]
kLeaderLineTypeId: ClassVar[Self]
kLeaderLineWeight: ClassVar[Self]
kEnableLanding: ClassVar[Self]
kLandingGap: ClassVar[Self]
kEnableDogleg: ClassVar[Self]
kDoglegLength: ClassVar[Self]
kArrowSymbolId: ClassVar[Self]
kArrowSize: ClassVar[Self]
kContentType: ClassVar[Self]
kTextStyleId: ClassVar[Self]
kTextLeftAttachmentType: ClassVar[Self]
kTextAngleType: ClassVar[Self]
kTextAlignmentType: ClassVar[Self]
kTextColor: ClassVar[Self]
kTextHeight: ClassVar[Self]
kEnableFrameText: ClassVar[Self]
kDefaultMText: ClassVar[Self]
kBlockId: ClassVar[Self]
kBlockColor: ClassVar[Self]
kBlockScale: ClassVar[Self]
kBlockRotation: ClassVar[Self]
kBlockConnectionType: ClassVar[Self]
kScale: ClassVar[Self]
kTextRightAttachmentType: ClassVar[Self]
kTextSwitchAlignmentType: ClassVar[Self]
kTextAttachmentDirection: ClassVar[Self]
kTextTopAttachmentType: ClassVar[Self]
kTextBottomAttachmentType: ClassVar[Self]
kExtendLeaderToText: ClassVar[Self]
kSize: ClassVar[Self]
class MLeaderSegmentAngleType Class
kAny: ClassVar[Self]
k15: ClassVar[Self]
k30: ClassVar[Self]
k45: ClassVar[Self]
k60: ClassVar[Self]
k90: ClassVar[Self]
kHorz: ClassVar[Self]
class MLeaderStyle Class
def __init__(self) -> None:
def __init__(self, id: PyDb.ObjectId) -> None:
def __init__(self, id: PyDb.ObjectId, mode: PyDb.OpenMode) -> None:
def __init__(self, id: PyDb.ObjectId, mode: PyDb.OpenMode, erased: bool) -> None:
def __init__(*args) -> None:
def __reduce__(self) -> Any:
def alignSpace(self) -> float:
def annotative(self) -> bool:
def arrowSize(self) -> float:
def arrowSymbolId(self) -> ObjectId:
def bitFlags(self) -> int:
def blockColor(self) -> Color:
def blockConnectionType(self) -> MLeaderBlockConnectionType:
def blockId(self) -> ObjectId:
def blockRotation(self) -> float:
def blockScale(self) -> PyGe.Scale3d:
def breakSize(self) -> float:
def className() -> str:
def contentType(self) -> MLeaderContentType:
def defaultMText(self) -> MText:
def desc() -> PyRx.RxClass:
Returns a pointer to the AcRxClass object representing the specific class, or most recent
parent class explicitly registered with ObjectARX of either the pointer type used to invoke
it or the class qualifier used with it. (Remember that when a static member function is
invoked via a pointer, the pointer type, not the object type, determines which
implementation of the function is invoked.) When working with a pointer to an object and
the proper AcRxClass object for the class of the object pointed to is desired, the
AcRxObject::isA() function should be used, since it is a virtual non-static method and is
therefore not pointer type dependent. Caching the value of the pointer returned by this
method is acceptable, provided the application knows that the AcRxClass object pointed to
by the returned pointer was created by an ObjectARX application that will not be unloaded.
def description(self) -> str:
def doglegLength(self) -> float:
def drawLeaderOrderType(self) -> DrawLeaderOrderType:
def drawMLeaderOrderType(self) -> DrawMLeaderOrderType:
def enableBlockRotation(self) -> bool:
def enableBlockScale(self) -> bool:
def enableDogleg(self) -> bool:
def enableFrameText(self) -> bool:
def enableLanding(self) -> bool:
def extendLeaderToText(self) -> bool:
def firstSegmentAngleConstraint(self) -> MLeaderSegmentAngleType:
def getName(self) -> str:
def isRenamable(self) -> bool:
def landingGap(self) -> float:
def leaderLineColor(self) -> Color:
def leaderLineType(self) -> MLeaderLeaderType:
def leaderLineTypeId(self) -> ObjectId:
def leaderLineWeight(self) -> LineWeight:
def maxLeaderSegmentsPoints(self) -> int:
def overwritePropChanged(self) -> bool:
def postMLeaderStyleToDb(self, db: PyDb.Database, name: str) -> ObjectId:
def scale(self) -> float:
def secondSegmentAngleConstraint(self) -> MLeaderSegmentAngleType:
def setAlignSpace(self, val: float) -> None:
def setAnnotative(self, val: bool) -> None:
def setArrowSize(self, val: float) -> None:
def setArrowSymbolId(self, val: str | PyDb.ObjectId) -> None:
def setBitFlags(self, val: int) -> None:
def setBlockColor(self, clr: PyDb.AcCmColor) -> None:
def setBlockConnectionType(self, val: PyDb.MLeaderBlockConnectionType) -> None:
def setBlockId(self, id: str | PyDb.ObjectId) -> None:
def setBlockRotation(self, val: float) -> None:
def setBlockScale(self, pt: PyGe.Scale3d) -> None:
def setBreakSize(self, val: float) -> None:
def setContentType(self, val: PyDb.MLeaderContentType) -> None:
def setDefaultMText(self, mt: PyDb.MText) -> None:
def setDescription(self, val: str) -> None:
def setDoglegLength(self, val: float) -> None:
def setDrawLeaderOrderType(self, val: PyDb.DrawLeaderOrderType) -> None:
def setDrawMLeaderOrderType(self, val: PyDb.DrawMLeaderOrderType) -> None:
def setEnableBlockRotation(self, val: bool) -> None:
def setEnableBlockScale(self, val: bool) -> None:
def setEnableDogleg(self, val: bool) -> None:
def setEnableFrameText(self, val: bool) -> None:
def setEnableLanding(self, val: bool) -> None:
def setExtendLeaderToText(self, val: bool) -> None:
def setFirstSegmentAngleConstraint(self, val: PyDb.MLeaderSegmentAngleType) -> None:
def setLandingGap(self, val: float) -> None:
def setLeaderLineColor(self, clr: PyDb.AcCmColor) -> None:
def setLeaderLineType(self, val: PyDb.MLeaderLeaderType) -> None:
def setLeaderLineTypeId(self, id: PyDb.ObjectId) -> None:
def setLeaderLineWeight(self, val: PyDb.LineWeight) -> None:
def setMaxLeaderSegmentsPoints(self, maxLeaderSegmentsPoints: int) -> None:
def setName(self, val: str) -> None:
def setScale(self, val: float) -> None:
def setSecondSegmentAngleConstraint(self, val: PyDb.MLeaderSegmentAngleType) -> None:
def setTextAlignAlwaysLeft(self, val: bool) -> None:
def setTextAlignmentType(self, val: PyDb.MLeaderTextAlignmentType) -> None:
def setTextAngleType(self, val: PyDb.MLeaderTextAngleType) -> None:
def setTextAttachmentDirection(self, val: PyDb.MLeaderTextAttachmentDirection) -> None:
def setTextAttachmentType(self, textAttachmentType: PyDb.MLeaderTextAttachmentType) -> None:
def setTextAttachmentType(self, textAttachmentType: PyDb.MLeaderTextAttachmentType, val: PyDb.MLeaderLeaderDirectionType) -> None:
def setTextAttachmentType(*args) -> None:
def setTextColor(self, clr: PyDb.AcCmColor) -> None:
def setTextHeight(self, val: float) -> None:
def setTextStyleId(self, id: PyDb.ObjectId) -> None:
def textAlignAlwaysLeft(self) -> bool:
def textAlignmentType(self) -> MLeaderTextAlignmentType:
def textAngleType(self) -> MLeaderTextAngleType:
def textAttachmentDirection(self) -> MLeaderTextAttachmentDirection:
def textAttachmentType(self) -> MLeaderTextAttachmentType:
def textAttachmentType(self, val: PyDb.MLeaderLeaderDirectionType) -> MLeaderTextAttachmentType:
def textAttachmentType(*args) -> MLeaderTextAttachmentType:
def textColor(self) -> Color:
def textHeight(self) -> float:
def textStyleId(self) -> ObjectId:
class MLeaderTextAlignmentType Class
kLeftAlignment: ClassVar[Self]
kCenterAlignment: ClassVar[Self]
kRightAlignment: ClassVar[Self]
class MLeaderTextAngleType Class
kInsertAngle: ClassVar[Self]
kHorizontalAngle: ClassVar[Self]
kAlwaysRightReadingAngle: ClassVar[Self]
class MLeaderTextAttachmentDirection Class
kAttachmentHorizontal: ClassVar[Self]
kAttachmentVertical: ClassVar[Self]
class MLeaderTextAttachmentType Class
kAttachmentTopOfTop: ClassVar[Self]
kAttachmentMiddleOfTop: ClassVar[Self]
kAttachmentMiddle: ClassVar[Self]
kAttachmentMiddleOfBottom: ClassVar[Self]
kAttachmentBottomOfBottom: ClassVar[Self]
kAttachmentBottomLine: ClassVar[Self]
kAttachmentBottomOfTopLine: ClassVar[Self]
kAttachmentBottomOfTop: ClassVar[Self]
kAttachmentAllLine: ClassVar[Self]
kAttachmentCenter: ClassVar[Self]
kAttachmentLinedCenter: ClassVar[Self]
class MPolygon Class
def __init__(self) -> None:
def __init__(self, id: PyDb.ObjectId) -> None:
def __init__(self, id: PyDb.ObjectId, mode: PyDb.OpenMode) -> None:
def __init__(self, id: PyDb.ObjectId, mode: PyDb.OpenMode, erased: bool) -> None:
def __init__(*args) -> None:
def __reduce__(self) -> Any:
def appendLoopFromBoundary(self, circle: PyDb.Circle, excludeCrossing: bool, tol: float) -> None:
def appendLoopFromBoundary(self, pline: PyDb.Polyline, excludeCrossing: bool, tol: float) -> None:
def appendLoopFromBoundary(self, pline2d: PyDb.Polyline2d, excludeCrossing: bool, tol: float) -> None:
def appendLoopFromBoundary(*args) -> None:
def appendMPolygonLoop(self, vertices: list[PyGe.Point2d], bulges: list[float], excludeCrossing: bool, tol: float) -> None:
def balanceDisplay(self) -> None:
def balanceTree(self) -> None:
def cast(otherObject: PyRx.RxObject) -> MPolygon:
def className() -> str:
def cloneFrom(otherObject: PyRx.RxObject) -> MPolygon:
def createLoopsFromBoundaries(self, ids: list[PyDb.ObjectId], excludeCrossing: bool, tol: float) -> list[int]:
def desc() -> PyRx.RxClass:
Returns a pointer to the AcRxClass object representing the specific class, or most recent
parent class explicitly registered with ObjectARX of either the pointer type used to invoke
it or the class qualifier used with it. (Remember that when a static member function is
invoked via a pointer, the pointer type, not the object type, determines which
implementation of the function is invoked.) When working with a pointer to an object and
the proper AcRxClass object for the class of the object pointed to is desired, the
AcRxObject::isA() function should be used, since it is a virtual non-static method and is
therefore not pointer type dependent. Caching the value of the pointer returned by this
method is acceptable, provided the application knows that the AcRxClass object pointed to
by the returned pointer was created by an ObjectARX application that will not be unloaded.
def elevation(self) -> float:
def evaluateHatch(self, val: bool) -> None:
def getArea(self) -> float:
def getChildLoops(self, curLoop: int) -> list[int]:
def getClosestLoopTo(self, val: PyGe.Point3d) -> int:
def getLoopAtGsMarker(self, gsMark: int) -> int:
def getLoopDirection(self, val: int) -> MPolygonloopDir:
def getMPolygonLoopAt(self, loopIndex: int) -> tuple[list[PyGe.Point2d], list[float]]:
def getOffsetVector(self) -> PyGe.Vector2d:
def getParentLoop(self, curLoop: int) -> int:
def getPatternDefinitionAt(self, val: int) -> tuple:
def getPerimeter(self) -> float:
def hatch(self) -> Hatch:
def includesTouchingLoops(self, val: float) -> bool:
def insertMPolygonLoopAt(self, loopIndex: int, vertices: list[PyGe.Point2d], bulges: list[float], excludeCrossing: bool, tol: float) -> None:
def isBalanced(self) -> bool:
def isPointInsideMPolygon(self, val: PyGe.Point3d, tol: float) -> list[int]:
def isPointOnLoopBoundary(self, val: PyGe.Point3d, loop: int, tol: float) -> bool:
def loopCrossesItself(self, vertices: list[PyGe.Point2d], bulges: list[float], tol: float) -> bool:
def normal(self) -> PyGe.Vector3d:
def numMPolygonLoops(self) -> int:
def numPatternDefinitions(self) -> int:
def patternAngle(self) -> float:
def patternColor(self) -> Color:
def patternDouble(self) -> bool:
def patternName(self) -> str:
def patternScale(self) -> float:
def patternSpace(self) -> float:
def patternType(self) -> HatchPatternType:
def removeMPolygonLoopAt(self, val: int) -> None:
def selfCrosses(self, vertices: list[PyGe.Point2d], bulges: list[float], tol: float) -> bool:
def setElevation(self, val: float) -> None:
def setGradient(self, val: PyDb.HatchGradientPatternType, name: str) -> None:
def setGradientAngle(self, val: float) -> None:
def setGradientColors(self, colors: list[PyDb.AcCmColor], values: list[float]) -> None:
def setGradientOneColorMode(self, val: bool) -> None:
def setGradientShift(self, val: float) -> None:
def setLoopDirection(self, lindex: int, dir: PyDb.MPolygonloopDir) -> None:
def setNormal(self, val: PyGe.Vector3d) -> None:
def setPattern(self, val: PyDb.HatchPatternType, name: str) -> None:
def setPatternAngle(self, val: float) -> None:
def setPatternColor(self, clr: PyDb.AcCmColor) -> None:
def setPatternDouble(self, val: float) -> None:
def setPatternScale(self, val: float) -> None:
def setPatternSpace(self, val: float) -> None:
class MPolygonloopDir Class
kExterior: ClassVar[Self]
kInterior: ClassVar[Self]
kAnnotation: ClassVar[Self]
class MText Class
def __init__(self) -> None:
The AcDbMText class is the representation for the MTEXT (multiline text) entity within
AutoCAD.
def __init__(self, id: PyDb.ObjectId) -> None:
The AcDbMText class is the representation for the MTEXT (multiline text) entity within
AutoCAD.
def __init__(self, id: PyDb.ObjectId, mode: PyDb.OpenMode) -> None:
The AcDbMText class is the representation for the MTEXT (multiline text) entity within
AutoCAD.
def __init__(self, id: PyDb.ObjectId, mode: PyDb.OpenMode, erased: bool) -> None:
The AcDbMText class is the representation for the MTEXT (multiline text) entity within
AutoCAD.
def __init__(*args) -> None:
The AcDbMText class is the representation for the MTEXT (multiline text) entity within
AutoCAD.
def __reduce__(self) -> Any:
def actualHeight(self) -> float:
Returns the overall height of the bounding rectangle that surrounds the formatted text. If
the default of NULL is used for the ctxt argument, the current AcGiWorldDraw object is
used.
def actualWidth(self) -> float:
Returns the overall width of the bounding rectangle that surrounds the formatted text.
def ascent(self) -> float:
This function returns the height of the maximum ascender for the first line of the text.
This value can be used with the AcDbMText::descent() function to help align multiple
AcDbMText objects in a table or grid.
def attachment(self) -> MTextAttachmentPoint:
Returns a value describing the attachment point for the MText object. The attachment point
value determines how the text will be oriented around the insertion point of the MText
object. For example, if the attachment point is AcDbMText ::kMiddleCenter, then the text
body will be displayed such that the insertion point appears at the geometric center of the
text body. The AttachmentPoint enumerated type has the following possible
values:AcDbMText::kTopLeftAcDbMText::kTopCenterAcDbMText::kTopRightAcDbMText::kMiddleLeftAcDbMText::kMiddleCenterAcDbMText::kMiddleRightAcDbMText::kBottomLeftAcDbMText::kBottomCenterAcDbMText::kBottomRight
def backgroundFillOn(self) -> bool:
Returns a Boolean value indicating whether background fill is on.
def cast(otherObject: PyRx.RxObject) -> MText:
def className() -> str:
def cloneFrom(otherObject: PyRx.RxObject) -> MText:
def contents(self) -> str:
Returns a pointer to a dynamically allocated buffer containing a copy of the character
contents of the MText object. Formatting data used for word wrap calculations is removed
before the string is copied.
def contentsRTF(self) -> str:
Returns an RTF encoded string that is a translated version of the contents of the AcDbMText
object. MText codes are translated to RTF codes. Fonts, colors, tabs, and indents are
preserved. The conversion uses 24 as the default point size. That is, text with no height
override will have a point size of 24 and text with a height override will have a point
size of the height override multiplied by 24. The caller is responsible for freeing the
memory used by the returned string (preferably by using acutDelString().
def convertFieldToText(self) -> None:
If the contents of MText contains fields, this function converts them to text and removes
the fields. It does not evaluate the fields before converting them. Returns Acad::eOk if
successful. Returns Acad::eNotApplicable if there is no field. Otherwise, returns an
AutoCAD error status.
def correctSpelling(self) -> int:
This function is intended to be used internally, and requires that additional speller
initialization be performed before calling. It cannot be used from within ObjectARX
applications.
def desc() -> PyRx.RxClass:
Returns a pointer to the AcRxClass object representing the specific class, or most recent
parent class explicitly registered with ObjectARX of either the pointer type used to invoke
it or the class qualifier used with it. (Remember that when a static member function is
invoked via a pointer, the pointer type, not the object type, determines which
implementation of the function is invoked.) When working with a pointer to an object and
the proper AcRxClass object for the class of the object pointed to is desired, the
AcRxObject::isA() function should be used, since it is a virtual non-static method and is
therefore not pointer type dependent. Caching the value of the pointer returned by this
method is acceptable, provided the application knows that the AcRxClass object pointed to
by the returned pointer was created by an ObjectARX application that will not be unloaded.
def descent(self) -> float:
This function returns the height of the maximum descender for the last line of the text.
This value can be used with the AcDbMText::ascent() function to help align multiple
AcDbMText objects in a table or grid.
def direction(self) -> PyGe.Vector3d:
Returns an AcGeVector3d (in WCS) representing the X axis ('horizontal') for the text. This
direction vector is used to determine the text flow direction.
def flowDirection(self) -> MTextFlowDirection:
Returns the direction that the text string follows from its start to its finish. Possible
values for FlowDirection are: AcDbMText::kLtoR Left to right AcDbMText::kTtoB Top to bottom
AcDbMText::kByStyle Inherited from the text style at run-time
def getBackgroundFillColor(self) -> Color:
If background fill is defined for this object, this function returns the current background
fill color in the color output parameter. Returns Acad::eOk if successful. Returns
Acad::eNotApplicable if background fill is not defined.
def getBackgroundScaleFactor(self) -> float:
If background fill is defined for this object, this function returns the background scale
factor in the scale output parameter. Returns Acad::eOk if successful. Returns
Acad::eNotApplicable if background fill is not defined.
def getBackgroundTransparency(self) -> Transparency:
If background fill is defined for this object, this function returns the background fill
transparency value in the transp output parameter. Returns Acad::eOk if successful. Returns
Acad::eNotApplicable if background fill is not defined.
def getBoundingPoints(self) -> list[PyGe.Point3d]:
Appends 4 points to the array as follows: [0] == top left corner of text area[1] == top
right corner of text area[2] == bottom left corner of text area[3] == bottom right corner
of text area All points are in WCS coordinates.
def getBoundingPointsByLine(self) -> list[PyGe.Point3d]:
Returns a multidimensional array of AcGePoint3d objects that represents the four corners of
the boundary box for each line of text in the MText object.
def getColumnAutoHeight(self) -> bool:
Gets the auto height setting, which specifies whether dynamic columns use the MText height
or a per-column user-defined height. Returns Acad::eOk if successful; otherwise, returns an
AutoCAD error status. Only valid for dynamic columns.
def getColumnCount(self) -> int:
Sets whether heights for each dynamic column is equal to the MText height (auto-height), or
user-controlled for each dynamic column (manual-height). Returns Acad::eOk if successful;
otherwise, returns an AutoCAD error status. Only valid for dynamic columns.
def getColumnFlowReversed(self) -> bool:
Gets the flow reversed setting, which determines how columns are added. Returns Acad::eOk
if successful; otherwise, returns an AutoCAD error status.
def getColumnGutterWidth(self) -> float:
Gets the column gutter width. Returns Acad::eOk if successful; otherwise, returns an
AutoCAD error status.
def getColumnHeight(self, idx: int) -> float:
Gets the height of the specified column. Returns Acad::eOk if successful; otherwise,
returns an AutoCAD error status. Only valid for dynamic, manual height columns.
def getColumnType(self) -> MTextColumnType:
Gets AcDbMText entity column type (one of the following):
AcDbMText::kNoColumnsAcDbMText::kStaticColumnsAcDbMText::kDynamicColumns Returns Acad::eOk
if successful; otherwise, returns an AutoCAD error status.
def getColumnWidth(self) -> float:
Gets the width of each column. Returns Acad::eOk if successful; otherwise, returns an
AutoCAD error status.
def getFragments(self) -> list:
This function runs through the MText object's text string breaking it up into fragments,
calling the fragment elaboration function func for each fragment. If the default of NULL is
used for the ctxt argument, the current AcGiWorldDraw object is used. The fragment
elaboration function's prototype is: int (*AcDbMTextEnum)(AcDbMTextFragment *frag, void
*param) The elaboration function is called once for each fragment. frag points to an
AcDbMTextFragment structure that's passed into the elaboration function. frag provides all
the information about the text fragment for which the elaboration function is being called.
param contains the value (which is just a void* address) of the param argument passed into
the explodeFragments() member function. param can point to anything desired--it is only
passed on to the elaboration function func. param provides a means to pass
application-specific data into the elaboration function. The elaboration function should
return 1 to continue the elaboration operation, or 0 to terminate the operation. In the
context of this function, a fragment is a piece of text that lies on the same
'word-wrapped' line and has a specific set of characteristics (that is, font, color,
height, width, etc.). So, each word-wrap newline and each change in text characteristics
starts a new fragment.
def height(self) -> float:
Returns the height of this object.
def hitTest(self, val: PyGe.Point3d) -> bool:
This function tests for the existence of an AcDbMText object in a specified location when
the TEXTGAPSELECTION system variable is enabled.
def lineSpacingFactor(self) -> float:
Returns the line spacing factor (a value between 0.25 and 4.00). See AcDb::LineSpacingStyle
for more information and examples.
def lineSpacingStyle(self) -> LineSpacingStyle:
Returns the line spacing style, either kAtLeast (the line spacing is a minimum value) or
kExactly (the line spacing is absolute). See AcDb::LineSpacingStyle for more information
and examples.
def location(self) -> PyGe.Point3d:
Returns an AcGePoint3d (in WCS coordinates) containing the insertion point of the MText
object.
def normal(self) -> PyGe.Vector3d:
Returns an AcGeVector3d (in WCS) containing the unit normal vector of the MText object.
def rotation(self) -> float:
Returns the angle between the X axis of the OCS for the normal vector of the current
AutoCAD editor's UCS and the projection of the MText object's direction vector onto the
plane of the AutoCAD editor's current UCS. The rotation value is in radians, with positive
angles as counterclockwise when looking down the UCS normal towards the UCS origin.
def setAttachment(self, val: PyDb.MTextAttachmentPoint) -> None:
This function sets type to be the AttachmentPoint type for the MText object. The
AttachmentPoint value determines how the text will be oriented around the initial insertion
point of the MText object. For example, if the AttachmentPoint is
AttachmentPoint::kMiddleCenter, then the text body will be displayed such that the MText
insertion point is in the middle (both width and height directions) of the text body. The
AttachmentPoint enumerated type has the following possible values:
AttachmentPoint::kTopLeft AttachmentPoint::kTopCenter AttachmentPoint::kTopRight
AttachmentPoint::kMiddleLeft AttachmentPoint::kMiddleCenter AttachmentPoint::kMiddleRight
AttachmentPoint::kBottomLeft AttachmentPoint::kBottomCenter AttachmentPoint::kBottomRight
Returns Acad::eOk if successful or Acad::eInvalidInput if the data passed in is not
acceptable.
def setAttachmentMovingLocation(self, val: PyDb.MTextAttachmentPoint) -> None:
This member function changes the attachment of the MTEXT object, just as setAttachment
does, however it also moves the location (as per setLocation) in order to keep the current
extent unchanged. This differs from setAttachment, which keeps the setLocation constant,
thus moving the extent relative to that location. The AttachmentPoint enumerated type has
the following possible
values:AttachmentPoint::kTopLeftAttachmentPoint::kTopCenterAttachmentPoint::kTopRightAttachmentPoint::kMiddleLeftAttachmentPoint::kMiddleCenterAttachmentPoint::kMiddleRightAttachmentPoint::kBottomLeftAttachmentPoint::kBottomCenterAttachmentPoint::kBottomRight
Returns Acad::eOk if successful or Acad::eInvalidInput if the data passed in is not
acceptable. Example: Changing attachment point from Top Left to Bottom Right. (* is
attachment Location) | | | --+--+--+--*--+--+--+-- |ABC : |XYZ : |- - - - + using
setAttachment: + - - - -| : ABC| : XYZ| --+--+--+--*--+--+--+-- | | | using
setAttachmentMovingLocation: | | | --+--+--+--+--+--+--+-- | ABC: | XYZ: |- - - - *
def setBackgroundFill(self, val: bool) -> None:
Toggles the background fill on or off, as indicated by the value of enable. If enable is
true, background color is turned off, and no background fill color has been specified, this
function sets the background fill color to an RGB value of 200,200,200. This function
always returns Acad::eOk.
def setBackgroundFillColor(self, val: PyDb.AcCmColor) -> None:
Sets this object's background fill color to color. Returns Acad::eOk if successful.
def setBackgroundScaleFactor(self, val: float) -> None:
Sets the background scale factor for this object to scale. Returns Acad::eOk if successful.
def setBackgroundTransparency(self, val: PyDb.AcCmTransparency) -> None:
Sets the background transparency for this object to transp. Returns Acad::eOk if
successful.
def setColumnAutoHeight(self, val: bool) -> None:
Sets whether heights for each dynamic column is equal to the MText height (auto-height), or
user-controlled for each dynamic column (manual-height). Returns Acad::eOk if successful;
otherwise, returns an AutoCAD error status. Only valid for dynamic columns.
def setColumnCount(self, val: int) -> None:
Sets the number of columns. Returns Acad::eOk if successful; otherwise, returns an AutoCAD
error status.
def setColumnFlowReversed(self, val: bool) -> None:
Sets whether columns are added 'reversed' from the flow of the MText. If true, columns are
added to the left for right-to-left flowing MText, or above for top-to-bottom flowing
MText. If false, columns are added to the right and below (respectively) Returns if
successful; otherwise, returns an AutoCAD error status.
def setColumnGutterWidth(self, val: float) -> None:
Sets the column gutter width. Returns Acad::eOk if successful; otherwise, returns an
AutoCAD error status. Must be positive or zero.
def setColumnHeight(self, idx: int, val: float) -> None:
Sets the height of the specified column. Returns Acad::eOk if successful; otherwise,
returns an AutoCAD error status. Only valid for dynamic, manual height columns.
def setColumnType(self, val: PyDb.MTextColumnType) -> None:
Sets the column type to be one of the following: AcDbMText::kNoColumns
AcDbMText::kStaticColumns AcDbMText::kDynamicColumns Returns Acad::eOk if successful;
otherwise, returns an AutoCAD error status.
def setColumnWidth(self, val: float) -> None:
Sets the width of each column. Returns Acad::eOk if successful; otherwise, returns an
AutoCAD error status. Must be a positive value. Applies to every column.
def setContents(self, val: str) -> int:
A copy of text is stored in the MText object to be used as the text contents for the MText
object.
def setContentsRTF(self, val: str) -> int:
This method sets the contents of the AcDbMText object from the RTF-encoded text string
pointed to by unnamed. RTF codes are translated to MText codes. Fonts, colors, tabs, and
indents are preserved. Bullets and numbered lists are mapped to hanging paragraphs using
the implied setting for tabs and indents. Returns 0 if successful.
def setDirection(self, val: PyGe.Vector3d) -> None:
Sets dir as the direction that the MText object will consider to be its 'horizontal' axis.
The direction vector dir should be in the WCS coordinates. Returns Acad::eOk if successful
or Acad::eInvalidInput if the data passed in is not acceptable.
def setDynamicColumns(self, width: float, gutter: float, autoHeight: bool) -> None:
Sets column type to AcDbMText::kDynamicColumns with specified width, gutter, and auto
height setting Returns Acad::eOk if successful; otherwise, returns an AutoCAD error status.
def setFlowDirection(self, val: PyDb.MTextFlowDirection) -> None:
Sets flow to be the FlowDirection for the MText object (see AcDbMText::flowDirection() for
details of the FlowDirection enumerated type). Returns Acad::eOk if successful or
Acad::eInvalidInput if the data passed in is not acceptable.
def setHeight(self, val: float) -> None:
Sets the height of this object.
def setLineSpacingFactor(self, val: float) -> None:
Sets dFactor to be the line spacing factor where a value of 1.0 is single-spaced, 2.0 is
double-spaced, and so on. The spacing factor must be between 0.25 and 4.00, inclusive. The
method returns Acad::eOk if successful, or Acad::eInvalidInput if dFactor is not within the
valid range. See AcDb::LineSpacingStyle for more information and examples.
def setLineSpacingStyle(self, val: PyDb.LineSpacingStyle) -> None:
Sets the line spacing style to be either kAtLeast (the line spacing is a minimum value) or
kExactly (the line spacing is absolute). See AcDb::LineSpacingStyle for more information
and examples. The method returns Acad::eOk if successful, or Acad::eInvalidInput if eStyle
is not a valid value.
def setLocation(self, val: PyGe.Point3d) -> None:
Sets loc to be the insertion point for the MText object. loc should be in WCS coordinates.
Returns Acad::eOk if successful or Acad::eInvalidInput if the data passed in is not
acceptable.
def setNormal(self, val: PyGe.Vector3d) -> None:
Sets normal to be the normal vector for the MText object. normal should be in WCS
coordinates. When this function is used to change the normal, the direction value of the
MText object is set to (1.0, 0.0, 0.0) in the Entity Coordinate System associated with the
normal of the UCS current in the AutoCAD editor.
def setRotation(self, val: float) -> None:
Sets the direction value for the MText object. To obtain the new direction vector from
angle, ObjectARX first obtains the normal vector of the current User Coordinate System
(UCS) in the AutoCAD editor. Next, it calculates the Entity Coordinate System (OCS) for the
normal vector just obtained. Finally, it rotates the X axis vector of this OCS around the
normal vector by angle. Positive angles are counterclockwise when looking down the UCS
normal towards the UCS origin (right-hand rule).
def setStaticColumns(self, width: float, gutter: float, count: int) -> None:
Sets column type to AcDbMText::kStaticColumns with specified width, gutter, and number of
columns. Returns Acad::eOk if successful; otherwise, returns an AutoCAD error status.
def setTextHeight(self, val: float) -> None:
Sets the MText object's text height to height. Returns Acad::eOk if successful or
Acad::eInvalidInput if the data passed in is not acceptable.
def setTextStyle(self, val: PyDb.ObjectId) -> None:
Sets the MText object to use the AcDbTextStyle specified by Id. Returns Acad::eOk if
successful or Acad::eInvalidInput if the data passed in is not acceptable.
def setUseBackgroundColor(self, val: bool) -> None:
If enable is true, this function sets a flag that indicates that background color should be
used for this object. Otherwise, it turns off the background color flag. This function
always returns Acad::eOk.
def setWidth(self, val: float) -> None:
Sets width to be the maximum width allowed for any line of text. This value is used during
word wrap calculations as a maximum. It is possible that none of the lines resulting from
word wrap formatting will reach this width value, but no lines will ever go past it. If
width is 0.0, word wrap is disabled. Returns Acad::eOk if successful or Acad::eInvalidInput
if the data passed in is not acceptable.
def text(self) -> str:
text() returns an allocated pointer to MText contents with formatting removed. The caller
is responsible for freeing returned pointer.
def textHeight(self) -> float:
Returns the nominal text height of the MText object. This value is the initial height used
to display the object, but may be overridden by Hvalue; inline sequences.
def textStyle(self) -> ObjectId:
Returns the objectId of the textStyle currently referenced by the MText object.
def useBackgroundColorOn(self) -> bool:
Returns true if background color is in use for this object. Otherwise, returns false.
def width(self) -> float:
Returns the maximum width setting used by the MText object for word wrap formatting. It is
possible that none of the lines resulting from word wrap formatting will reach this width
value. Words which exceed this width value will not be broken, but will extend beyond the
given width. The AcDbMText::actualWidth() member function returns the actual width of the
text, regardless of the maximum width setting. If the return value is 0.0, then word wrap
is currently disabled.
class MTextAttachmentPoint Class
kTopLeft: ClassVar[Self]
kTopCenter: ClassVar[Self]
kTopRight: ClassVar[Self]
kMiddleLeft: ClassVar[Self]
kMiddleCenter: ClassVar[Self]
kMiddleRight: ClassVar[Self]
kBottomLeft: ClassVar[Self]
kBottomCenter: ClassVar[Self]
kBottomRight: ClassVar[Self]
kBaseLeft: ClassVar[Self]
kBaseCenter: ClassVar[Self]
kBaseRight: ClassVar[Self]
kBaseAlign: ClassVar[Self]
kBottomAlign: ClassVar[Self]
kMiddleAlign: ClassVar[Self]
kTopAlign: ClassVar[Self]
kBaseFit: ClassVar[Self]
kBottomFit: ClassVar[Self]
kMiddleFit: ClassVar[Self]
kTopFit: ClassVar[Self]
kBaseMid: ClassVar[Self]
kBottomMid: ClassVar[Self]
kMiddleMid: ClassVar[Self]
kTopMid: ClassVar[Self]
class MTextColumnType Class
kNoColumns: ClassVar[Self]
kStaticColumns: ClassVar[Self]
kDynamicColumns: ClassVar[Self]
class MTextFlowDirection Class
kLtoR: ClassVar[Self]
kRtoL: ClassVar[Self]
kTtoB: ClassVar[Self]
kBtoT: ClassVar[Self]
kByStyle: ClassVar[Self]
class MTextFragmentType Class
kLocation: ClassVar[Self]
kNormal: ClassVar[Self]
kDirection: ClassVar[Self]
kTextValue: ClassVar[Self]
kFont: ClassVar[Self]
kBigFont: ClassVar[Self]
kExtents: ClassVar[Self]
kCapsHeight: ClassVar[Self]
kWidthFactor: ClassVar[Self]
kObliqueAngle: ClassVar[Self]
kTrackingFactor: ClassVar[Self]
kColor: ClassVar[Self]
kStackTop: ClassVar[Self]
kStackBottom: ClassVar[Self]
kUnderlined: ClassVar[Self]
kOverlined: ClassVar[Self]
kStrikethrough: ClassVar[Self]
kUnderPoints: ClassVar[Self]
kOverPoints: ClassVar[Self]
kStrikePoints: ClassVar[Self]
kFontname: ClassVar[Self]
kBold: ClassVar[Self]
kItalic: ClassVar[Self]
kEndFragmentTypes: ClassVar[Self]
class MeasurementValue Class
kEnglish: ClassVar[Self]
kMetric: ClassVar[Self]
class MergeCellStyleOption Class
kMergeCellStyleNone: ClassVar[Self]
kMergeCellStyleCopyDuplicates: ClassVar[Self]
kMergeCellStyleOverwriteDuplicates: ClassVar[Self]
kMergeCellStyleConvertDuplicatesToOverrides: ClassVar[Self]
kMergeCellStyleIgnoreNewStyles: ClassVar[Self]
class Mline Class
def __init__(self) -> None:
The AcDbMline class represents the AutoCAD MLINE entity. This multi-line entity allows the
user to create a complex line with multiple parallel line parts, each with its own
linetype. The space between these parallel lines can be filled if desired.
def __init__(self, id: PyDb.ObjectId) -> None:
The AcDbMline class represents the AutoCAD MLINE entity. This multi-line entity allows the
user to create a complex line with multiple parallel line parts, each with its own
linetype. The space between these parallel lines can be filled if desired.
def __init__(self, id: PyDb.ObjectId, mode: PyDb.OpenMode) -> None:
The AcDbMline class represents the AutoCAD MLINE entity. This multi-line entity allows the
user to create a complex line with multiple parallel line parts, each with its own
linetype. The space between these parallel lines can be filled if desired.
def __init__(self, id: PyDb.ObjectId, mode: PyDb.OpenMode, erased: bool) -> None:
The AcDbMline class represents the AutoCAD MLINE entity. This multi-line entity allows the
user to create a complex line with multiple parallel line parts, each with its own
linetype. The space between these parallel lines can be filled if desired.
def __init__(*args) -> None:
The AcDbMline class represents the AutoCAD MLINE entity. This multi-line entity allows the
user to create a complex line with multiple parallel line parts, each with its own
linetype. The space between these parallel lines can be filled if desired.
def __reduce__(self) -> Any:
def appendSeg(self, val: PyGe.Point3d) -> None:
def axisAt(self, val: int) -> PyGe.Vector3d:
def cast(otherObject: PyRx.RxObject) -> Mline:
def className() -> str:
def cloneFrom(otherObject: PyRx.RxObject) -> Mline:
def closedMline(self) -> bool:
def desc() -> PyRx.RxClass:
Returns a pointer to the AcRxClass object representing the specific class, or most recent
parent class explicitly registered with ObjectARX of either the pointer type used to invoke
it or the class qualifier used with it. (Remember that when a static member function is
invoked via a pointer, the pointer type, not the object type, determines which
implementation of the function is invoked.) When working with a pointer to an object and
the proper AcRxClass object for the class of the object pointed to is desired, the
AcRxObject::isA() function should be used, since it is a virtual non-static method and is
therefore not pointer type dependent. Caching the value of the pointer returned by this
method is acceptable, provided the application knows that the AcRxClass object pointed to
by the returned pointer was created by an ObjectARX application that will not be unloaded.
def element(self, val: PyGe.Point3d) -> int:
def getClosestPointTo(self, givenPoint: PyGe.Point3d, extend: bool) -> PyGe.Point3d:
def getClosestPointTo(self, givenPoint: PyGe.Point3d, extend: bool, excludeCaps: bool) -> PyGe.Point3d:
def getClosestPointTo(self, givenPoint: PyGe.Point3d, normal: PyGe.Vector3d, extend: bool) -> PyGe.Point3d:
def getClosestPointTo(self, givenPoint: PyGe.Point3d, normal: PyGe.Vector3d, extend: bool, excludeCaps: bool) -> PyGe.Point3d:
def getClosestPointTo(*args) -> PyGe.Point3d:
def getPlane(self) -> PyGe.Plane:
def justification(self) -> int:
def miterAt(self, val: int) -> PyGe.Vector3d:
def moveVertexAt(self, index: int, val: PyGe.Point3d) -> None:
def normal(self) -> PyGe.Vector3d:
def numVertices(self) -> int:
def removeLastSeg(self, val: PyGe.Point3d) -> None:
def scale(self) -> float:
def setClosedMline(self, val: bool) -> None:
def setJustification(self, val: MlineJustification) -> None:
def setNormal(self, val: PyGe.Vector3d) -> None:
def setScale(self, val: float) -> None:
def setStyle(self, val: PyDb.ObjectId) -> None:
def setSupressEndCaps(self, val: bool) -> None:
def setSupressStartCaps(self, val: bool) -> None:
def style(self) -> ObjectId:
def supressEndCaps(self) -> bool:
def supressStartCaps(self) -> bool:
def vertexAt(self, val: int) -> PyGe.Point3d:
class MlineJustification Class
kTop: ClassVar[Self]
kZero: ClassVar[Self]
kBottom: ClassVar[Self]
kOpen: ClassVar[Self]
kClosed: ClassVar[Self]
kMerged: ClassVar[Self]
class MlineStyle Class
def __init__(self, id: PyDb.ObjectId, mode: PyDb.OpenMode, erased: bool) -> None:
def __reduce__(self) -> Any:
def addElement(self, offset: float, clr: PyDb.AcCmColor, ltid: PyDb.ObjectId, checkIfReferenced: bool) -> int:
def cast(otherObject: PyRx.RxObject) -> MlineStyle:
def className() -> str:
def cloneFrom(otherObject: PyRx.RxObject) -> MlineStyle:
def desc() -> PyRx.RxClass:
Returns a pointer to the AcRxClass object representing the specific class, or most recent
parent class explicitly registered with ObjectARX of either the pointer type used to invoke
it or the class qualifier used with it. (Remember that when a static member function is
invoked via a pointer, the pointer type, not the object type, determines which
implementation of the function is invoked.) When working with a pointer to an object and
the proper AcRxClass object for the class of the object pointed to is desired, the
AcRxObject::isA() function should be used, since it is a virtual non-static method and is
therefore not pointer type dependent. Caching the value of the pointer returned by this
method is acceptable, provided the application knows that the AcRxClass object pointed to
by the returned pointer was created by an ObjectARX application that will not be unloaded.
def description(self) -> str:
def endAngle(self) -> float:
def endInnerArcs(self) -> bool:
def endRoundCap(self) -> bool:
def endSquareCap(self) -> bool:
def fillColor(self) -> Color:
def filled(self) -> bool:
def getElementAt(self, val: int) -> tuple[float, PyDb.Color, PyDb.ObjectId]:
def initMlineStyle(self) -> None:
def name(self) -> str:
def numElements(self) -> int:
def removeElementAt(self, val: int) -> None:
def set(self, src: PyDb.MlineStyle, checkIfReferenced: bool) -> None:
def setDescription(self, val: str) -> None:
def setElement(self, offset: float, clr: PyDb.AcCmColor, ltid: PyDb.ObjectId) -> int:
def setEndAngle(self, val: float) -> None:
def setEndInnerArcs(self, val: bool) -> None:
def setEndRoundCap(self, val: bool) -> None:
def setEndSquareCap(self, val: bool) -> None:
def setFillColor(self, clr: PyDb.AcCmColor) -> None:
def setFilled(self, val: bool) -> None:
def setName(self, val: str) -> None:
def setShowMiters(self, val: bool) -> None:
def setStartAngle(self, val: float) -> None:
def setStartInnerArcs(self, val: bool) -> None:
def setStartRoundCap(self, val: bool) -> None:
def setStartSquareCap(self, val: bool) -> None:
def showMiters(self) -> bool:
def startAngle(self) -> float:
def startInnerArcs(self) -> bool:
def startRoundCap(self) -> bool:
def startSquareCap(self) -> bool:
class NurbSurface Class
def __init__(self, id: PyDb.ObjectId, mode: PyDb.OpenMode, erased: bool) -> None:
def __reduce__(self) -> Any:
def cast(otherObject: PyRx.RxObject) -> NurbSurface:
def className() -> str:
def cloneFrom(otherObject: PyRx.RxObject) -> NurbSurface:
def desc() -> PyRx.RxClass:
Returns a pointer to the AcRxClass object representing the specific class, or most recent
parent class explicitly registered with ObjectARX of either the pointer type used to invoke
it or the class qualifier used with it. (Remember that when a static member function is
invoked via a pointer, the pointer type, not the object type, determines which
implementation of the function is invoked.) When working with a pointer to an object and
the proper AcRxClass object for the class of the object pointed to is desired, the
AcRxObject::isA() function should be used, since it is a virtual non-static method and is
therefore not pointer type dependent. Caching the value of the pointer returned by this
method is acceptable, provided the application knows that the AcRxClass object pointed to
by the returned pointer was created by an ObjectARX application that will not be unloaded.
class ObjectContext Class
def __init__() -> None:
Raises an exception.
This class cannot be instantiated from Python.
def __reduce__(self) -> Any:
def className() -> str:
def collectionName(self) -> str:
def desc() -> PyRx.RxClass:
Returns a pointer to the AcRxClass object representing the specific class, or most recent
parent class explicitly registered with ObjectARX of either the pointer type used to invoke
it or the class qualifier used with it. (Remember that when a static member function is
invoked via a pointer, the pointer type, not the object type, determines which
implementation of the function is invoked.) When working with a pointer to an object and
the proper AcRxClass object for the class of the object pointed to is desired, the
AcRxObject::isA() function should be used, since it is a virtual non-static method and is
therefore not pointer type dependent. Caching the value of the pointer returned by this
method is acceptable, provided the application knows that the AcRxClass object pointed to
by the returned pointer was created by an ObjectARX application that will not be unloaded.
def getName(self) -> str:
def setName(self, name: str) -> None:
def uniqueIdentifier(self) -> int:
class ObjectContextCollection Class
def __init__() -> None:
Raises an exception.
This class cannot be instantiated from Python.
def __reduce__(self) -> Any:
def addContext(self, obj: PyDb.ObjectContext) -> None:
def className() -> str:
def currentContext(self, obj: PyDb.Object) -> ObjectContext:
def desc() -> PyRx.RxClass:
Returns a pointer to the AcRxClass object representing the specific class, or most recent
parent class explicitly registered with ObjectARX of either the pointer type used to invoke
it or the class qualifier used with it. (Remember that when a static member function is
invoked via a pointer, the pointer type, not the object type, determines which
implementation of the function is invoked.) When working with a pointer to an object and
the proper AcRxClass object for the class of the object pointed to is desired, the
AcRxObject::isA() function should be used, since it is a virtual non-static method and is
therefore not pointer type dependent. Caching the value of the pointer returned by this
method is acceptable, provided the application knows that the AcRxClass object pointed to
by the returned pointer was created by an ObjectARX application that will not be unloaded.
def getContext(self, name: str) -> ObjectContext:
def hasContext(self, name: str) -> bool:
def lockContext(self, obj: PyDb.ObjectContext) -> None:
def locked(self) -> bool:
def name(self) -> str:
def removeContext(self, name: str) -> None:
def setCurrentContext(self, obj: PyDb.ObjectContext) -> None:
def toList(self, desc: PyRx.RxClass) -> list[PyDb.ObjectContext]:
def unlockContext(self) -> None:
class ObjectContextManager Class
def __init__() -> None:
Raises an exception.
This class cannot be instantiated from Python.
def __reduce__(self) -> Any:
def className() -> str:
def contextCollection(self, name: str) -> ObjectContextCollection:
def desc() -> PyRx.RxClass:
Returns a pointer to the AcRxClass object representing the specific class, or most recent
parent class explicitly registered with ObjectARX of either the pointer type used to invoke
it or the class qualifier used with it. (Remember that when a static member function is
invoked via a pointer, the pointer type, not the object type, determines which
implementation of the function is invoked.) When working with a pointer to an object and
the proper AcRxClass object for the class of the object pointed to is desired, the
AcRxObject::isA() function should be used, since it is a virtual non-static method and is
therefore not pointer type dependent. Caching the value of the pointer returned by this
method is acceptable, provided the application knows that the AcRxClass object pointed to
by the returned pointer was created by an ObjectARX application that will not be unloaded.
def registerContextCollection(self, name: str, collection: PyDb.ObjectContextCollection) -> None:
def unregisterContextCollection(self, name: str) -> None:
class ObjectId Class
def __ge__(self) -> bool:
def __gt__(self) -> bool:
def __hash__(self) -> int:
def __init__(self) -> None:
Since the Release of AutoCAD R13, there has been a mechanism for dealing with
database-resident objects in memory. The scheme has two parts for each object. First there
is the database-resident object itself, which resides in memory and can be paged out to
disk if memory needs to be freed up. The second part is a 'stub' object (class AcDbStub)
that always resides in memory and acts as the access point for the database-resident
object. When an object or entity is first added to the database, a new stub object is
created and set to point to the object or entity being added to the database. The address
of this stub in memory is used as the ads_name and the AcDbObjectId value for the object or
entity added to the database. The same mechanism applies when a database is read into
memory from disk. When a database-resident object is opened, the ObjectARX application sees
that the database-resident object's objectId is passed into the open call and a pointer to
the actual database-resident object is returned. What's actually going on is that the
objectId is the address of the stub in memory, so the stub is accessed to get a pointer to
the actual database-resident object. If the database-resident object is paged out, it is
paged in and its new address is returned. So, an AcDbObjectId object is a container for the
address of a database-resident object's stub. As such, it is an extremely important object
because it contains the only session-persistent locator for the database-resident object.
def __le__(self) -> bool:
def __lt__(self) -> bool:
def __ne__(self) -> bool:
def __reduce__(self) -> Any:
def acadObject(self) -> PyAx.AcadObject:
def asOldId(self) -> int:
Returns the objectId value as a long, which is the old ads_name format (an ads_name is an
array of two longs, the first element of which contains the same value as that in an
objectId).
def convertToRedirectedId(self) -> bool:
This function will take the object ID for this object if it has been redirected from
another database, and convert it to the actual object ID for the other database (for
example: the object ID from an xref database). If this object ID is not redirected or if it
has a value of AcDbObjectId::kNull, the function will do nothing.
def database(self) -> Database:
This function returns a pointer to the database in which the object ID is resident. If the
object ID is NULL, then NULL is returned.
def fromOldId(oldId: int) -> ObjectId:
This function allows the passing of unsigned 64-bit data.
def handle(self) -> Handle:
This function returns the handle of the object associated with the object ID.
def isDerivedFrom(self, desc: PyRx.RxClass) -> bool:
Static method for checking if first (left) class arg is derived from second (right) one.
def isEffectivelyErased(self) -> bool:
Returns true if the object associated with this object ID is erased or if any of the owners
in the ownership hierarchy for the object (in other words, the object's owner, the object's
owner's owner, etc.) are erased.
def isErased(self) -> bool:
This function returns true if the object associated with this object ID is erased.
Otherwise, false is returned.
def isNull(self) -> bool:
This function returns true if the object ID has a null value.
def isResident(self) -> bool:
This function returns true if the object associated with this objectId is resident in
memory.
def isValid(self) -> bool:
This function returns true if the object ID is associated with a database that is currently
in memory. If the object ID is associated with a database that is no longer available (in
other words, has been deleted), then false is returned.
def isWellBehaved(self) -> bool:
Checks, in a safe way (using an exception handler), whether this AcDbObjectId is 'well
behaved'. Well-behaved ids may be null, valid or 'stale', or they may be a garbage value,
which happens to fail gracefully (without crashing) when operated on.
def nonForwardedHandle(self) -> Handle:
If this object ID is in an xref database and the object associated with this object ID has
been redirected to the host database, then this method will return the handle in the xref
database. If the object associated with this objectId is not from an xref database or is
not redirected, then this method is the same as AcDbObjectId::handle().
def objectClass(self) -> PyRx.RxClass:
Returns the class of the object that is associated with the object id, or
AcRxObject::desc() if there is no associated object, or if the object id is NULL, thus
guaranteeing that the result can be safely de-referenced and correctly compared against any
class derived from AcDbObject. This is done because the entire purpose of this function is
to streamline code being written; having to always compare the result against NULL would
partially defeat the purpose of the function.
def objectLeftOnDisk(self) -> bool:
def originalDatabase(self) -> Database:
If this object ID is in an xref database and the object associated with this object ID has
been redirected to the host database, then this method will return a pointer to the xref
database. If the object associated with this object ID is not from an xref database or is
not redirected, then this method is the same as AcDbObjectId::database().
def setFromOldId(self, oldId: int) -> None:
This function allows the passing of unsigned 64-bit data.
class ObjectIdArray Class
def __contains__(self) -> bool:
def __delitem__(self) -> None:
def __getitem__(self) -> object:
def __init__(self) -> None:
def __iter__(self) -> object:
def __len__(self) -> int:
def __reduce__(self) -> Any:
def __setitem__(self) -> None:
def append(self) -> None:
def clear(self) -> None:
def extend(self) -> None:
def getIdsOfType(self, desc: PyRx.RxClass) -> ObjectIdArray:
def getIdsOfType(self, descList: list[PyRx.RxClass]) -> ObjectIdArray:
def getIdsOfType(*args) -> ObjectIdArray:
def removeErased(self) -> None:
class ObjectIdGraph Class
def __init__(self) -> None:
AcDbObjectIdGraph is derived from AcDbGraph and is used to represent the relationship of
object IDs to one another. This class is used by the one pass purge method
(AcDbDatabase::purge(AcDbObjectIdGraph& idGraph)) to represent the references from one
object ID to another.
def __reduce__(self) -> Any:
def addNode(self, val: PyDb.ObjectIdGraphNode) -> None:
def className() -> str:
def delNode(self, val: PyDb.ObjectIdGraphNode) -> None:
def findNode(self, val: PyDb.ObjectId) -> ObjectIdGraphNode:
def idNode(self, val: int) -> ObjectIdGraphNode:
class ObjectIdGraphNode Class
def __init__(self, val: PyDb.ObjectId) -> None:
AcDbObjectIdGraphNode is derived from AcDbGraphNode and is used for representing an object
ID in a database.
def __reduce__(self) -> Any:
def className() -> str:
def id(self) -> ObjectId:
class OpenMode Class
ForRead: ClassVar[Self]
ForWrite: ClassVar[Self]
ForNotify: ClassVar[Self]
kForRead: ClassVar[Self]
kForWrite: ClassVar[Self]
kForNotify: ClassVar[Self]
class OrdinateDimension Class
def __init__(self) -> None:
The AcDbOrdinateDimension class represents the ordinate dimension type within AutoCAD.
Ordinate dimensions measure the 'horizontal' (X axis) or 'vertical' (Y axis) distance from
a specified origin point to some other specified point. AcDbOrdinateDimensions measure the
distance from the their origin point to their definingPoint along the X or Y axis (as
specified by the appropriate member function). They display a leader line from the
definingPoint to the leaderEndPoint, with the annotation text located appropriately near
the end of the leader.
def __init__(self, useXAxis: bool, definingPoint: PyGe.Point3d, leaderEndPoint: PyGe.Point3d) -> None:
The AcDbOrdinateDimension class represents the ordinate dimension type within AutoCAD.
Ordinate dimensions measure the 'horizontal' (X axis) or 'vertical' (Y axis) distance from
a specified origin point to some other specified point. AcDbOrdinateDimensions measure the
distance from the their origin point to their definingPoint along the X or Y axis (as
specified by the appropriate member function). They display a leader line from the
definingPoint to the leaderEndPoint, with the annotation text located appropriately near
the end of the leader.
def __init__(self, useXAxis: bool, definingPoint: PyGe.Point3d, leaderEndPoint: PyGe.Point3d, dimText: str) -> None:
The AcDbOrdinateDimension class represents the ordinate dimension type within AutoCAD.
Ordinate dimensions measure the 'horizontal' (X axis) or 'vertical' (Y axis) distance from
a specified origin point to some other specified point. AcDbOrdinateDimensions measure the
distance from the their origin point to their definingPoint along the X or Y axis (as
specified by the appropriate member function). They display a leader line from the
definingPoint to the leaderEndPoint, with the annotation text located appropriately near
the end of the leader.
def __init__(self, useXAxis: bool, definingPoint: PyGe.Point3d, leaderEndPoint: PyGe.Point3d, dimText: str, id: PyDb.ObjectId) -> None:
The AcDbOrdinateDimension class represents the ordinate dimension type within AutoCAD.
Ordinate dimensions measure the 'horizontal' (X axis) or 'vertical' (Y axis) distance from
a specified origin point to some other specified point. AcDbOrdinateDimensions measure the
distance from the their origin point to their definingPoint along the X or Y axis (as
specified by the appropriate member function). They display a leader line from the
definingPoint to the leaderEndPoint, with the annotation text located appropriately near
the end of the leader.
def __init__(self, id: PyDb.ObjectId) -> None:
The AcDbOrdinateDimension class represents the ordinate dimension type within AutoCAD.
Ordinate dimensions measure the 'horizontal' (X axis) or 'vertical' (Y axis) distance from
a specified origin point to some other specified point. AcDbOrdinateDimensions measure the
distance from the their origin point to their definingPoint along the X or Y axis (as
specified by the appropriate member function). They display a leader line from the
definingPoint to the leaderEndPoint, with the annotation text located appropriately near
the end of the leader.
def __init__(self, id: PyDb.ObjectId, mode: PyDb.OpenMode) -> None:
The AcDbOrdinateDimension class represents the ordinate dimension type within AutoCAD.
Ordinate dimensions measure the 'horizontal' (X axis) or 'vertical' (Y axis) distance from
a specified origin point to some other specified point. AcDbOrdinateDimensions measure the
distance from the their origin point to their definingPoint along the X or Y axis (as
specified by the appropriate member function). They display a leader line from the
definingPoint to the leaderEndPoint, with the annotation text located appropriately near
the end of the leader.
def __init__(self, id: PyDb.ObjectId, mode: PyDb.OpenMode, erased: bool) -> None:
The AcDbOrdinateDimension class represents the ordinate dimension type within AutoCAD.
Ordinate dimensions measure the 'horizontal' (X axis) or 'vertical' (Y axis) distance from
a specified origin point to some other specified point. AcDbOrdinateDimensions measure the
distance from the their origin point to their definingPoint along the X or Y axis (as
specified by the appropriate member function). They display a leader line from the
definingPoint to the leaderEndPoint, with the annotation text located appropriately near
the end of the leader.
def __init__(*args) -> None:
The AcDbOrdinateDimension class represents the ordinate dimension type within AutoCAD.
Ordinate dimensions measure the 'horizontal' (X axis) or 'vertical' (Y axis) distance from
a specified origin point to some other specified point. AcDbOrdinateDimensions measure the
distance from the their origin point to their definingPoint along the X or Y axis (as
specified by the appropriate member function). They display a leader line from the
definingPoint to the leaderEndPoint, with the annotation text located appropriately near
the end of the leader.
def __reduce__(self) -> Any:
def cast(otherObject: PyRx.RxObject) -> OrdinateDimension:
def className() -> str:
def cloneFrom(otherObject: PyRx.RxObject) -> OrdinateDimension:
def definingPoint(self) -> PyGe.Point3d:
This function returns the ordinate point (in WCS coordinates) to be measured. The dimension
measures the X or Y distance between this point and the dimension's origin point. The
defining point is used for DXF group code 13.
def desc() -> PyRx.RxClass:
Returns a pointer to the AcRxClass object representing the specific class, or most recent
parent class explicitly registered with ObjectARX of either the pointer type used to invoke
it or the class qualifier used with it. (Remember that when a static member function is
invoked via a pointer, the pointer type, not the object type, determines which
implementation of the function is invoked.) When working with a pointer to an object and
the proper AcRxClass object for the class of the object pointed to is desired, the
AcRxObject::isA() function should be used, since it is a virtual non-static method and is
therefore not pointer type dependent. Caching the value of the pointer returned by this
method is acceptable, provided the application knows that the AcRxClass object pointed to
by the returned pointer was created by an ObjectARX application that will not be unloaded.
def isUsingXAxis(self) -> bool:
This function returns Adesk::kTrue if the dimension measures the X axis distance between
the dimension's origin point and the definingPoint, otherwise it returns Adesk::kFalse.
isUsingXAxis is reflected in bit 7 of DXF group code 70 (if bit 7 is set then isUsingXAxis
is Adesk::kTrue).
def isUsingYAxis(self) -> bool:
This function returns Adesk::kTrue if the dimension measures the Y axis distance between
the dimension's origin point and the definingPoint, otherwise it returns Adesk::kFalse.
isUsingYAxis is reflected in bit 7 of DXF group code 70 (if bit 7 is not set then
isUsingYAxis is Adesk::kTrue).
def leaderEndPoint(self) -> PyGe.Point3d:
This function returns the point that is used as the dimension leader's endpoint and is used
in the text position calculations. The leaderEndPoint is used for DXF group code 14.
def origin(self) -> PyGe.Point3d:
This function returns the point (in WCS coordinates) that the dimension treats as (0,0,0)
for distance calculations.
def setDefiningPoint(self, pt: PyGe.Point3d) -> None:
This function sets the dimension to use pt (in WCS coordinates) as the ordinate point to be
measured. The dimension measures the X or Y distance between this point and the dimension's
origin point. The defining point is used for DXF group code 13. This function always
returns Acad::eOk.
def setLeaderEndPoint(self, pt: PyGe.Point3d) -> None:
This function sets the dimension to use pt (in WCS coordinates) as the dimension leader's
endpoint. This point is also used in the text position calculations. The leaderEndPoint is
used for DXF group code 14. This function always returns Acad::eOk.
def setOrigin(self, pt: PyGe.Point3d) -> None:
This function sets the dimension to use pt (in WCS coordinates) as the point that the
dimension treats as (0,0,0) for distance calculations.
def setUsingXAxis(self, val: bool) -> None:
This is setUsingXAxis, a member of class AcDbOrdinateDimension.
def setUsingYAxis(self, val: bool) -> None:
This is setUsingYAxis, a member of class AcDbOrdinateDimension.
def useXAxis(self) -> None:
This function sets the dimension to measure the X axis distance between the dimension's
origin point and the definingPoint. Setting the dimension to measure along the X axis sets
bit 7 of DXF group code 70. This function always returns Acad::eOk.
def useYAxis(self) -> None:
This function sets the dimension to measure the Y axis distance between the dimension's
origin point and the definingPoint. Setting the dimension to measure along the Y axis
clears bit 7 of DXF group code 70. This function always returns Acad::eOk.
class OrthographicView Class
kNonOrthoView: ClassVar[Self]
kTopView: ClassVar[Self]
kBottomView: ClassVar[Self]
kFrontView: ClassVar[Self]
kBackView: ClassVar[Self]
kLeftView: ClassVar[Self]
kRightView: ClassVar[Self]
class OsnapMask Class
kOsMaskEnd: ClassVar[Self]
kOsMaskMid: ClassVar[Self]
kOsMaskCen: ClassVar[Self]
kOsMaskNode: ClassVar[Self]
kOsMaskQuad: ClassVar[Self]
kOsMaskInt: ClassVar[Self]
kOsMaskIns: ClassVar[Self]
kOsMaskPerp: ClassVar[Self]
kOsMaskTan: ClassVar[Self]
kOsMaskNear: ClassVar[Self]
kOsMaskQuick: ClassVar[Self]
kOsMaskCentroid: ClassVar[Self]
kOsMaskApint: ClassVar[Self]
kOsMaskImmediate: ClassVar[Self]
kOsMaskAllowTan: ClassVar[Self]
kOsMaskDisablePerp: ClassVar[Self]
kOsMaskRelCartesian: ClassVar[Self]
kOsMaskRelPolar: ClassVar[Self]
kOsMaskNoneOverride: ClassVar[Self]
class OsnapMode Class
kOsModeEnd: ClassVar[Self]
kOsModeMid: ClassVar[Self]
kOsModeCen: ClassVar[Self]
kOsModeNode: ClassVar[Self]
kOsModeQuad: ClassVar[Self]
kOsModeIns: ClassVar[Self]
kOsModePerp: ClassVar[Self]
kOsModeTan: ClassVar[Self]
kOsModeNear: ClassVar[Self]
kOsModeCentroid: ClassVar[Self]
class OsnapOverrule Class
def __init__(self) -> None:
def __reduce__(self) -> Any:
def baseGetOsnapPoints(self, pSubject: PyDb.Entity, osMode: PyDb.OsnapMode, gsMark: int, pickPnt: PyGe.Point3d, lastPnt: PyGe.Point3d, viewXform: PyGe.Matrix3d) -> tuple[int, list[PyGe.Point3d]]:
def baseGetOsnapPointsX(self, pSubject: PyDb.Entity, osMode: PyDb.OsnapMode, gsMark: int, pickPnt: PyGe.Point3d, lastPnt: PyGe.Point3d, viewXform: PyGe.Matrix3d, insertionMat: PyGe.Matrix3d) -> tuple[int, list[PyGe.Point3d]]:
def baseIsContentSnappable(self, object: PyDb.Entity) -> bool:
def className() -> str:
def desc() -> PyRx.RxClass:
Returns a pointer to the AcRxClass object representing the specific class, or most recent
parent class explicitly registered with ObjectARX of either the pointer type used to invoke
it or the class qualifier used with it. (Remember that when a static member function is
invoked via a pointer, the pointer type, not the object type, determines which
implementation of the function is invoked.) When working with a pointer to an object and
the proper AcRxClass object for the class of the object pointed to is desired, the
AcRxObject::isA() function should be used, since it is a virtual non-static method and is
therefore not pointer type dependent. Caching the value of the pointer returned by this
method is acceptable, provided the application knows that the AcRxClass object pointed to
by the returned pointer was created by an ObjectARX application that will not be unloaded.
def getOsnapPoints(self, pSubject: PyDb.Entity, osMode: PyDb.OsnapMode, gsMark: int, pickPnt: PyGe.Point3d, lastPnt: PyGe.Point3d, viewXform: PyGe.Matrix3d) -> tuple[int, list[PyGe.Point3d]]:
def getOsnapPointsX(self, pSubject: PyDb.Entity, osMode: PyDb.OsnapMode, gsMark: int, pickPnt: PyGe.Point3d, lastPnt: PyGe.Point3d, viewXform: PyGe.Matrix3d, insertionMat: PyGe.Matrix3d) -> tuple[int, list[PyGe.Point3d]]:
def isApplicable(self, object: PyRx.RxObject) -> bool:
def isContentSnappable(self, object: PyDb.Entity) -> bool:
class OsnapPointRef Class
def __init__(self) -> None:
This class is used to capture the Osnap based reference between a dimension and the
geometry it is associated with.
def __init__(self, refPt: PyGe.Point3d) -> None:
This class is used to capture the Osnap based reference between a dimension and the
geometry it is associated with.
def __init__(*args) -> None:
This class is used to capture the Osnap based reference between a dimension and the
geometry it is associated with.
def __reduce__(self) -> Any:
def className() -> str:
def desc() -> PyRx.RxClass:
Returns a pointer to the AcRxClass object representing the specific class, or most recent
parent class explicitly registered with ObjectARX of either the pointer type used to invoke
it or the class qualifier used with it. (Remember that when a static member function is
invoked via a pointer, the pointer type, not the object type, determines which
implementation of the function is invoked.) When working with a pointer to an object and
the proper AcRxClass object for the class of the object pointed to is desired, the
AcRxObject::isA() function should be used, since it is a virtual non-static method and is
therefore not pointer type dependent. Caching the value of the pointer returned by this
method is acceptable, provided the application knows that the AcRxClass object pointed to
by the returned pointer was created by an ObjectARX application that will not be unloaded.
def nearPointParam(self) -> float:
This function returns the nearest point parameter. For internal use.
def osnapType(self) -> OsnapType:
This function returns the Osnap type of the associative geometry.
def point(self) -> PyGe.Point3d:
This function returns the single point geometry.
def setIdPath(self, id: PyDb.ObjectId, sub: PyDb.SubentType, gsMarker: int) -> None:
This function sets the object ID path of the main associative geometry. Returns Acad::eOk
if successful.
def setIntIdPath(self, id: PyDb.ObjectId, sub: PyDb.SubentType, gsMarker: int) -> None:
This function sets the object ID path of the main associative geometry. Returns Acad::eOk
if successful.
def setNearPointParam(self, val: float) -> None:
def setOsnapType(self, val: PyDb.OsnapType) -> None:
This function sets the osnap type of the associative geometry. Returns Acad::eOk if
successful.
def setPoint(self, pt: PyGe.Point3d) -> None:
This function set a single point for a non-associative geometry. Returns Acad::eOk if
successful.
class OsnapType Class
kOsnapNone: ClassVar[Self]
kOsnapEnd: ClassVar[Self]
kOsnapMid: ClassVar[Self]
kOsnapCen: ClassVar[Self]
kOsnapNode: ClassVar[Self]
kOsnapQuad: ClassVar[Self]
kOsnapInt: ClassVar[Self]
kOsnapIns: ClassVar[Self]
kOsnapPerp: ClassVar[Self]
kOsnapTan: ClassVar[Self]
kOsnapNear: ClassVar[Self]
kOsnapApint: ClassVar[Self]
kOsnapStart: ClassVar[Self]
kOsnapCentroid: ClassVar[Self]
class OutputDisplayService Class
def __init__(self) -> None:
def __reduce__(self) -> Any:
def className() -> str:
def getMuteCmdLine(self) -> bool:
def output(self) -> str:
def setMuteCmdLine(self, forward: bool) -> None:
class PdfDefinition Class
def __init__(self, id: PyDb.ObjectId, mode: PyDb.OpenMode) -> None:
Represents PDF underlays in the drawing. Underlays are similar to raster images but their
content is snappable. .
def __reduce__(self) -> Any:
def cast(otherObject: PyRx.RxObject) -> PdfDefinition:
def className() -> str:
def cloneFrom(otherObject: PyRx.RxObject) -> PdfDefinition:
def desc() -> PyRx.RxClass:
Returns a pointer to the AcRxClass object representing the specific class, or most recent
parent class explicitly registered with ObjectARX of either the pointer type used to invoke
it or the class qualifier used with it. (Remember that when a static member function is
invoked via a pointer, the pointer type, not the object type, determines which
implementation of the function is invoked.) When working with a pointer to an object and
the proper AcRxClass object for the class of the object pointed to is desired, the
AcRxObject::isA() function should be used, since it is a virtual non-static method and is
therefore not pointer type dependent. Caching the value of the pointer returned by this
method is acceptable, provided the application knows that the AcRxClass object pointed to
by the returned pointer was created by an ObjectARX application that will not be unloaded.
class PdfReference Class
def __init__(self, id: PyDb.ObjectId, mode: PyDb.OpenMode) -> None:
Represents PDF underlays in the drawing. Underlays are similar to raster images but their
content is snappable.
def __reduce__(self) -> Any:
def cast(otherObject: PyRx.RxObject) -> PdfReference:
def className() -> str:
def cloneFrom(otherObject: PyRx.RxObject) -> PdfReference:
def desc() -> PyRx.RxClass:
Returns a pointer to the AcRxClass object representing the specific class, or most recent
parent class explicitly registered with ObjectARX of either the pointer type used to invoke
it or the class qualifier used with it. (Remember that when a static member function is
invoked via a pointer, the pointer type, not the object type, determines which
implementation of the function is invoked.) When working with a pointer to an object and
the proper AcRxClass object for the class of the object pointed to is desired, the
AcRxObject::isA() function should be used, since it is a virtual non-static method and is
therefore not pointer type dependent. Caching the value of the pointer returned by this
method is acceptable, provided the application knows that the AcRxClass object pointed to
by the returned pointer was created by an ObjectARX application that will not be unloaded.
class Planarity Class
kNonPlanar: ClassVar[Self]
kPlanar: ClassVar[Self]
kLinear: ClassVar[Self]
class PlaneSurface Class
def __init__(self, id: PyDb.ObjectId, mode: PyDb.OpenMode, erased: bool) -> None:
def __reduce__(self) -> Any:
def cast(otherObject: PyRx.RxObject) -> PlaneSurface:
def className() -> str:
def cloneFrom(otherObject: PyRx.RxObject) -> PlaneSurface:
def desc() -> PyRx.RxClass:
Returns a pointer to the AcRxClass object representing the specific class, or most recent
parent class explicitly registered with ObjectARX of either the pointer type used to invoke
it or the class qualifier used with it. (Remember that when a static member function is
invoked via a pointer, the pointer type, not the object type, determines which
implementation of the function is invoked.) When working with a pointer to an object and
the proper AcRxClass object for the class of the object pointed to is desired, the
AcRxObject::isA() function should be used, since it is a virtual non-static method and is
therefore not pointer type dependent. Caching the value of the pointer returned by this
method is acceptable, provided the application knows that the AcRxClass object pointed to
by the returned pointer was created by an ObjectARX application that will not be unloaded.
class PlotPaperUnits Class
kInches: ClassVar[Self]
kMillimeters: ClassVar[Self]
kPixels: ClassVar[Self]
class PlotRotation Class
k0degrees: ClassVar[Self]
k90degrees: ClassVar[Self]
k180degrees: ClassVar[Self]
k270degrees: ClassVar[Self]
class PlotSettings Class
def __init__(self) -> None:
The AcDbPlotSettings object stores 'what-to-plot' settings as a named plot setup
description. The plot settings objects are stored in an AcDbPlotSettingsDictionary.
def __init__(self, ModelType: bool) -> None:
The AcDbPlotSettings object stores 'what-to-plot' settings as a named plot setup
description. The plot settings objects are stored in an AcDbPlotSettingsDictionary.
def __init__(self, id: PyDb.ObjectId) -> None:
The AcDbPlotSettings object stores 'what-to-plot' settings as a named plot setup
description. The plot settings objects are stored in an AcDbPlotSettingsDictionary.
def __init__(self, id: PyDb.ObjectId, mode: PyDb.OpenMode) -> None:
The AcDbPlotSettings object stores 'what-to-plot' settings as a named plot setup
description. The plot settings objects are stored in an AcDbPlotSettingsDictionary.
def __init__(self, id: PyDb.ObjectId, mode: PyDb.OpenMode, erased: bool) -> None:
The AcDbPlotSettings object stores 'what-to-plot' settings as a named plot setup
description. The plot settings objects are stored in an AcDbPlotSettingsDictionary.
def __init__(*args) -> None:
The AcDbPlotSettings object stores 'what-to-plot' settings as a named plot setup
description. The plot settings objects are stored in an AcDbPlotSettingsDictionary.
def __reduce__(self) -> Any:
def addToPlotSettingsDict(self, db: PyDb.Database) -> None:
def cast(otherObject: PyRx.RxObject) -> PlotSettings:
def className() -> str:
def cloneFrom(otherObject: PyRx.RxObject) -> PlotSettings:
def desc() -> PyRx.RxClass:
Returns a pointer to the AcRxClass object representing the specific class, or most recent
parent class explicitly registered with ObjectARX of either the pointer type used to invoke
it or the class qualifier used with it. (Remember that when a static member function is
invoked via a pointer, the pointer type, not the object type, determines which
implementation of the function is invoked.) When working with a pointer to an object and
the proper AcRxClass object for the class of the object pointed to is desired, the
AcRxObject::isA() function should be used, since it is a virtual non-static method and is
therefore not pointer type dependent. Caching the value of the pointer returned by this
method is acceptable, provided the application knows that the AcRxClass object pointed to
by the returned pointer was created by an ObjectARX application that will not be unloaded.
def drawViewportsFirst(self) -> bool:
def getCanonicalMediaName(self) -> str:
def getCurrentStyleSheet(self) -> str:
def getCustomPrintScale(self) -> tuple[float, float]:
def getPlotCfgName(self) -> str:
def getPlotOrigin(self) -> tuple[float, float]:
def getPlotPaperMargins(self) -> tuple[float, float, float, float]:
def getPlotPaperSize(self) -> tuple[float, float]:
def getPlotSettingsName(self) -> str:
def getPlotViewName(self) -> str:
def getPlotWindowArea(self) -> tuple[float, float, float, float]:
def getStdScale(self) -> float:
def modelType(self) -> bool:
def plotAsRaster(self) -> bool:
def plotCentered(self) -> bool:
def plotHidden(self) -> bool:
def plotPaperUnits(self) -> PlotPaperUnits:
def plotPlotStyles(self) -> bool:
def plotRotation(self) -> PlotRotation:
def plotTransparency(self) -> bool:
def plotType(self) -> PlotType:
def plotViewportBorders(self) -> bool:
def plotWireframe(self) -> bool:
def printLineweights(self) -> bool:
def scaleLineweights(self) -> bool:
def setDrawViewportsFirst(self, val: bool) -> None:
def setPlotHidden(self, val: bool) -> None:
def setPlotPlotStyles(self, val: bool) -> None:
def setPlotSettingsName(self, val: str) -> None:
def setPlotTransparency(self, val: bool) -> None:
def setPlotViewportBorders(self, val: bool) -> None:
def setPrintLineweights(self, val: bool) -> None:
def setScaleLineweights(self, val: bool) -> None:
def setShadePlot(self, givenPoint) -> None:
def setShadePlot(self, val: PyDb.ShadePlotType, id: PyDb.ObjectId) -> None:
def setShadePlot(*args) -> None:
def setShadePlotCustomDPI(self, val: int) -> None:
def setShadePlotResLevel(self, val: PyDb.ShadePlotResLevel) -> None:
def setShowPlotStyles(self, val: bool) -> None:
def shadePlot(self) -> ShadePlotType:
def shadePlotCustomDPI(self) -> int:
def shadePlotId(self) -> ObjectId:
def shadePlotResLevel(self) -> ShadePlotResLevel:
def showPlotStyles(self) -> bool:
def stdScaleType(self) -> StdScaleType:
def useStandardScale(self) -> bool:
class PlotSettingsValidator Class
def __init__(self) -> None:
def __reduce__(self) -> Any:
def canonicalMediaNameList(self, settings: PyDb.PlotSettings) -> list[str]:
def className() -> str:
def getLocaleMediaName(self, settings: PyDb.PlotSettings, canonicalName: str) -> str:
def getLocaleMediaName(self, settings: PyDb.PlotSettings, idx: int) -> str:
def getLocaleMediaName(*args) -> str:
def plotDeviceList(self) -> list[str]:
def plotStyleSheetList(self) -> list[str]:
def refreshLists(self, settings: PyDb.PlotSettings) -> None:
def setCanonicalMediaName(self, settings: PyDb.PlotSettings, mediaName: str) -> None:
def setClosestMediaName(self, settings: PyDb.PlotSettings, paperWidth: float, paperHeight: float, units: PyDb.PlotPaperUnits, matchPrintableArea: bool) -> None:
def setCurrentStyleSheet(self, settings: PyDb.PlotSettings, styleSheetName: str) -> None:
def setCustomPrintScale(self, settings: PyDb.PlotSettings, numerator: float, denominator: float) -> None:
def setDefaultPlotConfig(self, settings: PyDb.PlotSettings) -> None:
def setPlotCentered(self, settings: PyDb.PlotSettings, isCentered: bool) -> None:
def setPlotCfgName(self, settings: PyDb.PlotSettings, plotDeviceName: str) -> None:
def setPlotCfgName(self, settings: PyDb.PlotSettings, plotDeviceName: str, mediaName: str) -> None:
def setPlotCfgName(*args) -> None:
def setPlotOrigin(self, settings: PyDb.PlotSettings, xCoordinate: float, yCoordinate: float) -> None:
def setPlotPaperUnits(self, settings: PyDb.PlotSettings, units: PyDb.PlotPaperUnits) -> None:
def setPlotRotation(self, settings: PyDb.PlotSettings, rotationType: PyDb.PlotRotation) -> None:
def setPlotType(self, settings: PyDb.PlotSettings, plotAreaType: PyDb.PlotType) -> None:
def setPlotViewName(self, settings: PyDb.PlotSettings, viewName: str) -> None:
def setPlotWindowArea(self, settings: PyDb.PlotSettings, ex: PyDb.Extents2d) -> None:
def setPlotWindowArea(self, settings: PyDb.PlotSettings, xmin: float, ymin: float, xmax: float, ymax: float) -> None:
def setPlotWindowArea(*args) -> None:
def setStdScale(self, settings: PyDb.PlotSettings, scale: float) -> None:
def setStdScaleType(self, settings: PyDb.PlotSettings, scaleType: PyDb.StdScaleType) -> None:
def setUseStandardScale(self, settings: PyDb.PlotSettings, useStandard: bool) -> None:
def setZoomToPaperOnUpdate(self, settings: PyDb.PlotSettings, doZoom: bool) -> None:
class PlotStyleNameType Class
kPlotStyleNameByLayer: ClassVar[Self]
kPlotStyleNameByBlock: ClassVar[Self]
kPlotStyleNameIsDictDefault: ClassVar[Self]
kPlotStyleNameById: ClassVar[Self]
class PlotType Class
kDisplay: ClassVar[Self]
kExtents: ClassVar[Self]
kLimits: ClassVar[Self]
kView: ClassVar[Self]
kWindow: ClassVar[Self]
kLayout: ClassVar[Self]
class Point Class
def __init__(self) -> None:
The AcDbPoint class represents the point entity within AutoCAD. A point entity has a
position value to locate it in space. It also has a normal vector, which is used to
determine its extrusion direction and to determine the plane on which to display the
point's graphics if they are something other than a '.' (the PDMODE system variable
controls this display). The point entity has a thickness that is its 'length' in the
direction of its normal vector (that is, its extrusion length).
def __init__(self, pos: PyGe.Point3d) -> None:
The AcDbPoint class represents the point entity within AutoCAD. A point entity has a
position value to locate it in space. It also has a normal vector, which is used to
determine its extrusion direction and to determine the plane on which to display the
point's graphics if they are something other than a '.' (the PDMODE system variable
controls this display). The point entity has a thickness that is its 'length' in the
direction of its normal vector (that is, its extrusion length).
def __init__(self, id: PyDb.ObjectId) -> None:
The AcDbPoint class represents the point entity within AutoCAD. A point entity has a
position value to locate it in space. It also has a normal vector, which is used to
determine its extrusion direction and to determine the plane on which to display the
point's graphics if they are something other than a '.' (the PDMODE system variable
controls this display). The point entity has a thickness that is its 'length' in the
direction of its normal vector (that is, its extrusion length).
def __init__(self, id: PyDb.ObjectId, mode: PyDb.OpenMode) -> None:
The AcDbPoint class represents the point entity within AutoCAD. A point entity has a
position value to locate it in space. It also has a normal vector, which is used to
determine its extrusion direction and to determine the plane on which to display the
point's graphics if they are something other than a '.' (the PDMODE system variable
controls this display). The point entity has a thickness that is its 'length' in the
direction of its normal vector (that is, its extrusion length).
def __init__(self, id: PyDb.ObjectId, mode: PyDb.OpenMode, erased: bool) -> None:
The AcDbPoint class represents the point entity within AutoCAD. A point entity has a
position value to locate it in space. It also has a normal vector, which is used to
determine its extrusion direction and to determine the plane on which to display the
point's graphics if they are something other than a '.' (the PDMODE system variable
controls this display). The point entity has a thickness that is its 'length' in the
direction of its normal vector (that is, its extrusion length).
def __init__(*args) -> None:
The AcDbPoint class represents the point entity within AutoCAD. A point entity has a
position value to locate it in space. It also has a normal vector, which is used to
determine its extrusion direction and to determine the plane on which to display the
point's graphics if they are something other than a '.' (the PDMODE system variable
controls this display). The point entity has a thickness that is its 'length' in the
direction of its normal vector (that is, its extrusion length).
def __reduce__(self) -> Any:
def cast(otherObject: PyRx.RxObject) -> Point:
def className() -> str:
def cloneFrom(otherObject: PyRx.RxObject) -> Point:
def desc() -> PyRx.RxClass:
Returns a pointer to the AcRxClass object representing the specific class, or most recent
parent class explicitly registered with ObjectARX of either the pointer type used to invoke
it or the class qualifier used with it. (Remember that when a static member function is
invoked via a pointer, the pointer type, not the object type, determines which
implementation of the function is invoked.) When working with a pointer to an object and
the proper AcRxClass object for the class of the object pointed to is desired, the
AcRxObject::isA() function should be used, since it is a virtual non-static method and is
therefore not pointer type dependent. Caching the value of the pointer returned by this
method is acceptable, provided the application knows that the AcRxClass object pointed to
by the returned pointer was created by an ObjectARX application that will not be unloaded.
def ecsRotation(self) -> float:
Returns the angle (in radians) between the OCS (formerly ECS) X axis for the point (based
on the point's normal vector) and the X axis that will be used when displaying the point.
This is used when PDMODE is set to display the point as something other than a '.'. The OCS
Rotation is used for DXF group code 50.
def normal(self) -> PyGe.Vector3d:
Returns the unit normal vector for the point in WCS coordinates. The normal is used as the
extrusion direction when the point has non-zero thickness. The normal also determines the
plane used to display the point when PDMODE is set to display the point as something other
than a '.'. The normal value is used for DXF group code 210.
def position(self) -> PyGe.Point3d:
Returns the points position value in WCS coordinates. The position value is used for DXF
group code 10.
def setEcsRotation(self, val: float) -> None:
Sets newVal to be the angle (in radians) between the OCS (formerly ECS) X axis for the
point (based on the point's normal vector) and the X axis that will be used when displaying
the point. This is used when PDMODE is set to display the point as something other than a
'.'. The OCS Rotation is used for DXF group code 50. Returns Acad::eOk if successful or
Acad::eInvalidInput if the data passed in is not acceptable.
def setNormal(self, val: PyGe.Vector3d) -> None:
Sets newVal to be the normal vector for the point. newVal must be in WCS coordinates. The
normal is used as the extrusion direction when the point has non-zero thickness. The normal
also determines the plane used to display the point when PDMODE is set to display the point
as something other than a '.'. The normal value is used for DXF group code 210. Returns
Acad::eOk if successful or Acad::eInvalidInput if the data passed in is not acceptable.
def setPosition(self, val: PyGe.Point3d) -> None:
Sets pt to be the points position value. pt must be in WCS coordinates. The position value
is used for DXF group code 10. Returns Acad::eOk if successful or Acad::eInvalidInput if
the data passed in is not acceptable.
def setThickness(self, val: float) -> None:
Sets thickness to be the thickness value for the point. The thickness is the point's
dimension along its normal vector direction (sometimes called the extrusion direction). The
thickness value is used for DXF group code 39. Returns Acad::eOk if successful or
Acad::eInvalidInput if the data passed in is not acceptable.
def thickness(self) -> float:
This function returns the point's thickness value. The thickness is the point's dimension
along its normal vector direction (sometimes called the extrusion direction). The thickness
value is used for DXF group code 39.
class Point3AngularDimension Class
def __init__(self) -> None:
The AcDb3PointAngularDimension class represents the angular dimension defined by three
points (as opposed to two lines) within AutoCAD.
def __init__(self, centerPoint: PyGe.Point3d, xL1Start: PyGe.Point3d, xL1End: PyGe.Point3d, arcPnt: PyGe.Point3d) -> None:
The AcDb3PointAngularDimension class represents the angular dimension defined by three
points (as opposed to two lines) within AutoCAD.
def __init__(self, centerPoint: PyGe.Point3d, xL1Start: PyGe.Point3d, xL1End: PyGe.Point3d, arcPnt: PyGe.Point3d, dimText: str) -> None:
The AcDb3PointAngularDimension class represents the angular dimension defined by three
points (as opposed to two lines) within AutoCAD.
def __init__(self, centerPoint: PyGe.Point3d, xL1Start: PyGe.Point3d, xL1End: PyGe.Point3d, arcPnt: PyGe.Point3d, dimText: str, id: PyDb.ObjectId) -> None:
The AcDb3PointAngularDimension class represents the angular dimension defined by three
points (as opposed to two lines) within AutoCAD.
def __init__(self, id: PyDb.ObjectId) -> None:
The AcDb3PointAngularDimension class represents the angular dimension defined by three
points (as opposed to two lines) within AutoCAD.
def __init__(self, id: PyDb.ObjectId, mode: PyDb.OpenMode) -> None:
The AcDb3PointAngularDimension class represents the angular dimension defined by three
points (as opposed to two lines) within AutoCAD.
def __init__(self, id: PyDb.ObjectId, mode: PyDb.OpenMode, erased: bool) -> None:
The AcDb3PointAngularDimension class represents the angular dimension defined by three
points (as opposed to two lines) within AutoCAD.
def __init__(*args) -> None:
The AcDb3PointAngularDimension class represents the angular dimension defined by three
points (as opposed to two lines) within AutoCAD.
def __reduce__(self) -> Any:
def arcPoint(self) -> PyGe.Point3d:
This function returns the dimension definition point (in WCS coordinates) that is used to
determine the location of the arc of the dimension. The arc definition point is used for
DXF group code 10.
def cast(otherObject: PyRx.RxObject) -> Point3AngularDimension:
def centerPoint(self) -> PyGe.Point3d:
This function returns the dimension definition point (in WCS coordinates) that is located
at the vertex of the angle being dimensioned. The vertex definition point is used for DXF
group code 15.
def className() -> str:
def cloneFrom(otherObject: PyRx.RxObject) -> Point3AngularDimension:
def desc() -> PyRx.RxClass:
Returns a pointer to the AcRxClass object representing the specific class, or most recent
parent class explicitly registered with ObjectARX of either the pointer type used to invoke
it or the class qualifier used with it. (Remember that when a static member function is
invoked via a pointer, the pointer type, not the object type, determines which
implementation of the function is invoked.) When working with a pointer to an object and
the proper AcRxClass object for the class of the object pointed to is desired, the
AcRxObject::isA() function should be used, since it is a virtual non-static method and is
therefore not pointer type dependent. Caching the value of the pointer returned by this
method is acceptable, provided the application knows that the AcRxClass object pointed to
by the returned pointer was created by an ObjectARX application that will not be unloaded.
def extArcOn(self) -> bool:
Returns true if extension arc is on. Otherwise, it returns false.
def setArcPoint(self, pt: PyGe.Point3d) -> None:
This function sets the dimension to use pt (in WCS coordinates) as the definition point
that is used to determine the location of the arc for the dimension.
def setCenterPoint(self, pt: PyGe.Point3d) -> None:
This function sets the dimension to use pt (in WCS coordinates) as the definition point
that is used for the vertex of the angle being dimensioned. The vertex definition point is
used for DXF group code 15. This function always returns Acad::eOk.
def setExtArcOn(self, val: bool) -> None:
This function turns the extension arc flag on or off. Returns Acad::eOk if successful.
Otherwise, it returns Acad::eInvalidInput.
def setXLine1Point(self, pt: PyGe.Point3d) -> None:
This function sets the dimension to use pt (in WCS coordinates) as the definition point
that is used for the start point of the first extension line of the dimension. This point
and the dimension's center point (which is located at the angle's vertex) define one side
of the angle being dimensioned. The AutoCAD DIMEXO dimension variable will affect how the
extension line is displayed relative to this point. The first extension line start point is
used for DXF group code 13. This function always returns Acad::eOk.
def setXLine2Point(self, pt: PyGe.Point3d) -> None:
This function sets the dimension to use pt (in WCS coordinates) as the definition point
that is used for the start point of the second extension line of the dimension. This point
and the dimension's center point (which is located at the angle's vertex) define one side
of the angle being dimensioned. The AutoCAD DIMEXO dimension variable will affect how the
extension line is displayed relative to this point. The first extension line start point is
used for DXF group code 14. This function always returns Acad::eOk.
def xLine1Point(self) -> PyGe.Point3d:
This function returns the dimension definition point (in WCS coordinates) that is used for
the start point of the first extension line of the dimension. This point and the
dimension's center point (which is located at the angle's vertex) define one side of the
angle being dimensioned. The AutoCAD DIMEXO dimension variable will affect how the
extension line is displayed relative to this point. The first extension line start point is
used for DXF group code 13.
def xLine2Point(self) -> PyGe.Point3d:
This function returns the dimension definition point (in WCS coordinates) that is used for
the start point of the second extension line of the dimension. This point and the
dimension's center point (which is located at the angle's vertex) define one side of the
angle being dimensioned. The AutoCAD DIMEXO dimension variable will affect how the
extension line is displayed relative to this point. The first extension line start point is
used for DXF group code 14.
class PointCloudClassificationColorRamp Class
def __init__(self) -> None:
The AcDbPointCloudClassificationColorRamp object is the color ramp instance which
represents a classification color ramp
def __reduce__(self) -> Any:
def className() -> str:
def color(self, val: int) -> EntityColor:
def name(self) -> str:
def numColors(self) -> int:
def setColor(self, val: int, clr: PyDb.EntityColor) -> None:
def setFrom(self, val: PyDb.PointCloudClassificationColorRamp) -> None:
def setName(self, val: str) -> None:
def setVisibility(self, val: int, visibility: bool) -> None:
def visibility(self, val: int) -> bool:
class PointCloudColorMap Class
def __init__(self, id: PyDb.ObjectId, mode: PyDb.OpenMode, erased: bool) -> None:
The AcDbPointCloudColorMap class stores all color map ramp definitions. There is only one
AcDbPointCloudColorMap object per database. The user can use getColorMap() to retrieve the
AcDbPointCloudColorMap object. There are two kinds of color ramps:intensity or elevation
color ramps (which are used when the point cloud is stylized by intensity or
elevation)classification color ramps (which are used when the point cloud is stylized by
classification).The color ramps are indexed by GUIDs inside the AcDbPointCloudColorMap
object and point clouds reference these ramps by GUIDs.
def __reduce__(self) -> Any:
def cast(otherObject: PyRx.RxObject) -> PointCloudColorMap:
def className() -> str:
def classificationScheme(self, guid: str) -> tuple[bool, PyDb.PointCloudClassificationColorRamp]:
def classificationSchemeGUIDs(self) -> list[str]:
def cloneFrom(otherObject: PyRx.RxObject) -> PointCloudColorMap:
def colorScheme(self, guid: str) -> tuple[bool, PyDb.PointCloudColorRamp]:
def colorSchemeGUIDs(self) -> list[str]:
def defaultClassificationColorScheme(self) -> str:
def defaultElevationColorScheme(self) -> str:
def defaultIntensityColorScheme(self) -> str:
def deleteClassificationScheme(self, guid: str) -> bool:
def deleteColorScheme(self, guid: str) -> bool:
def desc() -> PyRx.RxClass:
Returns a pointer to the AcRxClass object representing the specific class, or most recent
parent class explicitly registered with ObjectARX of either the pointer type used to invoke
it or the class qualifier used with it. (Remember that when a static member function is
invoked via a pointer, the pointer type, not the object type, determines which
implementation of the function is invoked.) When working with a pointer to an object and
the proper AcRxClass object for the class of the object pointed to is desired, the
AcRxObject::isA() function should be used, since it is a virtual non-static method and is
therefore not pointer type dependent. Caching the value of the pointer returned by this
method is acceptable, provided the application knows that the AcRxClass object pointed to
by the returned pointer was created by an ObjectARX application that will not be unloaded.
def getClassificationColorSchemeInUse(self) -> list[str]:
def getColorMap(val: PyDb.Database) -> ObjectId:
def getColorSchemeInUse(self) -> list[str]:
def hasClassificationScheme(self, guid: str) -> bool:
def hasColorScheme(self, guid: str) -> bool:
def setClassificationScheme(self, guid: str, val: PyDb.PointCloudClassificationColorRamp) -> bool:
def setColorScheme(self, guid: str, val: PyDb.PointCloudColorRamp) -> bool:
def setDefaultClassificationColorScheme(self, guid: str) -> bool:
def setDefaultElevationColorScheme(self, guid: str) -> bool:
def setDefaultIntensityColorScheme(self, guid: str) -> bool:
class PointCloudColorRamp Class
def __init__(self) -> None:
The AcDbPointCloudColorRamp object is the color ramp instance which represents an intensity
color ramp or elevation color ramp
def __reduce__(self) -> Any:
def className() -> str:
def color(self, val: int) -> EntityColor:
def name(self) -> str:
def numColors(self) -> int:
def setColor(self, val: int, clr: PyDb.EntityColor) -> None:
def setFrom(self, val: PyDb.PointCloudColorRamp) -> None:
def setName(self, val: str) -> None:
def setNumColors(self, val: int) -> None:
def setVisibility(self, val: int, visibility: bool) -> None:
def visibility(self, val: int) -> bool:
class PointCloudCrop Class
def __init__(self) -> None:
This class defines a cropping boundary for the AcDbPointCloudEx entity. Each cropping
boundary contains a plane which locates the boundary, a cropping type, a flag indicating
whether we want what is inside or outside the region, another flag indicating whether the
results of this cropping boundary should be inverted.
def __reduce__(self) -> Any:
def className() -> str:
def clear(self) -> None:
def get(self) -> list[PyGe.Point3d]:
def getCropPlane(self) -> tuple[bool, PyGe.Plane]:
def isInside(self) -> bool:
def isInverted(self) -> bool:
def isValid(self) -> bool:
def length(self) -> int:
def set(self, pts: list[PyGe.Point3d]) -> None:
def setCropPlane(self, plane: PyGe.Plane) -> None:
def setCropType(self, val: PointCloudCropType) -> None:
def setInside(self, val: bool) -> None:
def setInvert(self, val: bool) -> None:
def type(self) -> PointCloudCropType:
class PointCloudCropType Class
kInvalid: ClassVar[Self]
kRectangular: ClassVar[Self]
kPolygonal: ClassVar[Self]
kCircular: ClassVar[Self]
class PointCloudDefEx Class
def __init__(self, id: PyDb.ObjectId, mode: PyDb.OpenMode, erased: bool) -> None:
The AcDbPointCloudDefEx object (or 'point cloud extension definition object') controls the
actual point cloud data associated with one or more AcDbPointCloudEx entities (or 'point
cloud extension entity'). These objects link the .rcp/.rcs file to the dwg file, similar to
how Xrefs work. The relationship between the AcDbPointCloudDefEx and AcDbPointCloudEx
classes is much like the relationship between an AutoCAD block definition object and a
block reference entity. AcDbPointCloudDefEx objects are stored in a special AcDbDictionary
named 'ACAD_POINTCLOUD_EX_DICT'. These objects are not AutoCAD entities, so they can't be
displayed or selected by the end user.
def __reduce__(self) -> Any:
def activeFileName(self) -> str:
def cast(otherObject: PyRx.RxObject) -> PointCloudDefEx:
def className() -> str:
def classVersion() -> int:
def cloneFrom(otherObject: PyRx.RxObject) -> PointCloudDefEx:
def coordinateSystemName(self) -> str:
def createPointCloudExDictionary(val: PyDb.Database, id: PyDb.ObjectId) -> None:
def defaultHeight(self) -> float:
def defaultLength(self) -> float:
def defaultWidth(self) -> float:
def desc() -> PyRx.RxClass:
Returns a pointer to the AcRxClass object representing the specific class, or most recent
parent class explicitly registered with ObjectARX of either the pointer type used to invoke
it or the class qualifier used with it. (Remember that when a static member function is
invoked via a pointer, the pointer type, not the object type, determines which
implementation of the function is invoked.) When working with a pointer to an object and
the proper AcRxClass object for the class of the object pointed to is desired, the
AcRxObject::isA() function should be used, since it is a virtual non-static method and is
therefore not pointer type dependent. Caching the value of the pointer returned by this
method is acceptable, provided the application knows that the AcRxClass object pointed to
by the returned pointer was created by an ObjectARX application that will not be unloaded.
def entityCount(self) -> tuple[int, bool]:
def extents(self) -> Extents:
def fileType(self) -> str:
def getAllRcsFilePaths(self) -> list[str]:
def getRcsFilePath(self, guid: str) -> str:
def hasProperty(self, prop: PyDb.PointCloudProperty) -> PointCloudPropertyState:
def isLoaded(self) -> bool:
def load(self) -> None:
def pointCloudExDictionary(val: PyDb.Database) -> ObjectId:
def setActiveFileName(self, path: str) -> None:
def setSourceFileName(self, path: str) -> None:
def sourceFileName(self) -> str:
def totalPointsCount(self) -> int:
def totalRegionsCount(self) -> int:
def totalScansCount(self) -> int:
def unload(self) -> None:
class PointCloudDispOptionOutOfRange Class
kUseMinMaxColors: ClassVar[Self]
kUseRGBScanColors: ClassVar[Self]
kHidePoints: ClassVar[Self]
class PointCloudEx Class
def __init__(self, id: PyDb.ObjectId, mode: PyDb.OpenMode, erased: bool) -> None:
The AcDbPointCloudEx entity (or 'point cloud extension entity') works with the
AcDbPointCloudDefEx object (or 'point cloud extension definition object') to manage point
cloud data inside AutoCAD. The relationship between these two classes is much like the
relationship between an AutoCAD block definition object and a block reference entity. The
AcDbPointCloudEx entity is a drawable, selectable AutoCAD entity that places point cloud
data in model or paper space at a particular location and orientation, and with a
particular scale. It also contains crop boundaries, scan and region visibilities,
stylization types, color mapping schemes, a limit box, and other typical AcDbEntity
properties, like layer. The AcDbPointCloudEx entity cannot be used by itself. It must be
linked to an AcDbPointCloudDefEx object by calling
AcDbPointCloudEx::setPointCloudDefExId(). Furthermore, an AcDbPointCloudDefReactorEx must
be constructed and linked to each AcDbPointCloudEx entity and AcDbPointCloudDefEx object.
def __reduce__(self) -> Any:
def addCroppingBoundary(self, val: PyDb.PointCloudCrop) -> None:
def applyGeoLocation(self) -> None:
def applyGeoLocation(self, useDrawingGeo: bool, geoCS: str) -> None:
def applyGeoLocation(*args) -> None:
def attachPointCloud(path: str, pos: PyGe.Point3d, scale: float, rotation: float, db: PyDb.Database) -> ObjectId:
def cast(otherObject: PyRx.RxObject) -> PointCloudEx:
def className() -> str:
def clearAttributeFilters(self) -> None:
def clearCropping(self) -> None:
def clearSpatialFilters(self) -> None:
def cloneFrom(otherObject: PyRx.RxObject) -> PointCloudEx:
def desc() -> PyRx.RxClass:
Returns a pointer to the AcRxClass object representing the specific class, or most recent
parent class explicitly registered with ObjectARX of either the pointer type used to invoke
it or the class qualifier used with it. (Remember that when a static member function is
invoked via a pointer, the pointer type, not the object type, determines which
implementation of the function is invoked.) When working with a pointer to an object and
the proper AcRxClass object for the class of the object pointed to is desired, the
AcRxObject::isA() function should be used, since it is a virtual non-static method and is
therefore not pointer type dependent. Caching the value of the pointer returned by this
method is acceptable, provided the application knows that the AcRxClass object pointed to
by the returned pointer was created by an ObjectARX application that will not be unloaded.
def detectPointBelonger(self, ptWCS: PyGe.Point3d) -> tuple[str, int]:
def elevationApplyToFixedRange(self) -> bool:
def elevationOutOfRangeBehavior(self) -> PointCloudDispOptionOutOfRange:
def geolocate(self) -> bool:
def getActiveFileName(self) -> tuple[bool, str]:
def getCandidatePlane(self, x: int, y: int) -> tuple:
def getColorSchemeForStylization(self, val: PyDb.PointCloudStylizationType) -> str:
def getCroppingCount(self) -> int:
def getCroppingInvert(self) -> bool:
def getCurrentColorScheme(self) -> str:
def getCustomOsnapInfo(self, snapMode: PyDb.PointCloudOSnapMode, pickPoint: PyGe.Point3d, lastPoint: PyGe.Point3d, viewXform: PyGe.Matrix3d) -> list[PyGe.Point3d]:
def getCylinderAt(self, xform: PyGe.Matrix3d, pt: PyGe.Point3d) -> tuple[PyGe.Point3d, PyGe.Vector3d, float, float]:
def getDisplayedVisiblePointCount(self) -> int:
def getLoadedVisiblePointCount(self) -> int:
def getMinDistPrecision(self) -> float:
def getNativeCloudExtent(self) -> Extents:
def getPlaneBoundaryAt(self, xform: PyGe.Matrix3d, pt: PyGe.Point3d) -> tuple[bool, list[PyGe.Point3d]]:
def getPlaneOrPointAt(self, xform: PyGe.Matrix3d, pt: PyGe.Point3d) -> tuple[bool, list[PyGe.Point3d]]:
def getPointCloudCropping(self, index: int) -> PointCloudCrop:
def getPointCloudName(self) -> str:
def getScanViewInfo(self, scanGuid: str) -> tuple[bool, str, PyGe.Point3d, PyDb.Extents]:
def getVisiblePointCount(self) -> int:
def intensityOutOfRangeBehavior(self) -> PointCloudDispOptionOutOfRange:
def location(self) -> PyGe.Point3d:
def locked(self) -> bool:
def maxElevation(self) -> float:
def maxIntensity(self) -> int:
def minElevation(self) -> float:
def minIntensity(self) -> int:
def objectToWorldMatrix(self) -> PyGe.Matrix3d:
def pointCloudDefExId(self) -> ObjectId:
def reactorId(self) -> ObjectId:
def removeLastCropping(self) -> None:
def resetLimitBox(self) -> None:
def resetScanRegionVisibility(self) -> None:
def rotation(self) -> float:
def scale(self) -> float:
def setActiveFileName(self, val: str) -> bool:
def setAllRegionHighlight(self, bHighlight: bool, includeUnassigned: bool) -> None:
def setAllRegionsVisibility(self, bVisible: bool, includeUnassigned: bool) -> None:
def setAllScanHighlight(self, val: bool) -> None:
def setAllScansVisibility(self, bVisible: bool) -> None:
def setAllScansVisibilityByRegion(self, regionId: int, bVisible: bool) -> None:
def setColorSchemeForStylization(self, guid: str, val: PyDb.PointCloudStylizationType) -> None:
def setCroppingInvert(self, val: bool) -> None:
def setCurrentColorScheme(self, guid: str) -> None:
def setElevationApplyToFixedRange(self) -> None:
def setElevationOutOfRangeBehavior(self, val: PyDb.PointCloudDispOptionOutOfRange) -> None:
def setHighlightLimitboxBoundary(self, val: bool) -> None:
def setInCreatingCroppingMode(self, val: bool) -> None:
def setIntensityOutOfRangeBehavior(self, val: PyDb.PointCloudDispOptionOutOfRange) -> None:
def setLocation(self, pt: PyGe.Point3d) -> None:
def setLocked(self, val: bool) -> None:
def setMinMaxElevation(self, min: float, max: float) -> None:
def setMinMaxIntensity(self, min: int, max: int) -> None:
def setPointCloudDefExId(self, val: PyDb.ObjectId) -> None:
def setPointCloudName(self, val: str) -> None:
def setReactorId(self, val: PyDb.ObjectId) -> None:
def setRegionVisibility(self, regionId: int, bVisible: bool) -> None:
def setRotation(self, val: float) -> None:
def setScale(self, val: float) -> None:
def setScanVisibility(self, scanGuid: str, bVisible: bool) -> None:
def setShowElevationAsGradient(self, val: bool) -> None:
def setShowIntensityAsGradient(self, val: bool) -> None:
def setStylizationType(self, val: PyDb.PointCloudStylizationType) -> None:
def showCropped(self) -> bool:
def showElevationAsGradient(self) -> bool:
def showIntensityAsGradient(self) -> bool:
def stylizationType(self) -> PointCloudStylizationType:
def updateGeoLocation(self) -> None:
class PointCloudOSnapMode Class
kOsModePNod: ClassVar[Self]
kOsModePNea: ClassVar[Self]
kOsModePPer: ClassVar[Self]
kOsModePEdgeNea: ClassVar[Self]
kOsModePEdgePer: ClassVar[Self]
kOsModePInt: ClassVar[Self]
kOsModePCL: ClassVar[Self]
kOsModePCorner: ClassVar[Self]
class PointCloudProperty Class
kColor: ClassVar[Self]
kIntensity: ClassVar[Self]
kClassification: ClassVar[Self]
kNormal: ClassVar[Self]
kSegmentation: ClassVar[Self]
kGeoGraphic: ClassVar[Self]
class PointCloudPropertyState Class
kNone: ClassVar[Self]
kSome: ClassVar[Self]
kAll: ClassVar[Self]
class PointCloudStylizationType Class
kTrueColor: ClassVar[Self]
kSingleColor: ClassVar[Self]
kNormalRamp: ClassVar[Self]
kHeightRamp: ClassVar[Self]
kIntensityRamp: ClassVar[Self]
kClassificationRamp: ClassVar[Self]
class PointRef Class
def __init__() -> None:
Raises an exception.
This class cannot be instantiated from Python.
def __reduce__(self) -> Any:
def className() -> str:
def desc() -> PyRx.RxClass:
Returns a pointer to the AcRxClass object representing the specific class, or most recent
parent class explicitly registered with ObjectARX of either the pointer type used to invoke
it or the class qualifier used with it. (Remember that when a static member function is
invoked via a pointer, the pointer type, not the object type, determines which
implementation of the function is invoked.) When working with a pointer to an object and
the proper AcRxClass object for the class of the object pointed to is desired, the
AcRxObject::isA() function should be used, since it is a virtual non-static method and is
therefore not pointer type dependent. Caching the value of the pointer returned by this
method is acceptable, provided the application knows that the AcRxClass object pointed to
by the returned pointer was created by an ObjectARX application that will not be unloaded.
class Poly2dType Class
k2dSimplePoly: ClassVar[Self]
k2dFitCurvePoly: ClassVar[Self]
k2dQuadSplinePoly: ClassVar[Self]
k2dCubicSplinePoly: ClassVar[Self]
class Poly3dType Class
k3dSimplePoly: ClassVar[Self]
k3dQuadSplinePoly: ClassVar[Self]
k3dCubicSplinePoly: ClassVar[Self]
class PolyFaceMeshVertex Class
def __init__(self) -> None:
The AcDbPolyFaceMeshVertex class represents the vertices within AcDbPolyFaceMesh entities
in AutoCAD drawings.
def __init__(self, pos: PyGe.Point3d) -> None:
The AcDbPolyFaceMeshVertex class represents the vertices within AcDbPolyFaceMesh entities
in AutoCAD drawings.
def __init__(self, id: PyDb.ObjectId) -> None:
The AcDbPolyFaceMeshVertex class represents the vertices within AcDbPolyFaceMesh entities
in AutoCAD drawings.
def __init__(self, id: PyDb.ObjectId, mode: PyDb.OpenMode) -> None:
The AcDbPolyFaceMeshVertex class represents the vertices within AcDbPolyFaceMesh entities
in AutoCAD drawings.
def __init__(self, id: PyDb.ObjectId, mode: PyDb.OpenMode, erased: bool) -> None:
The AcDbPolyFaceMeshVertex class represents the vertices within AcDbPolyFaceMesh entities
in AutoCAD drawings.
def __init__(*args) -> None:
The AcDbPolyFaceMeshVertex class represents the vertices within AcDbPolyFaceMesh entities
in AutoCAD drawings.
def __reduce__(self) -> Any:
def cast(otherObject: PyRx.RxObject) -> PolyFaceMeshVertex:
def className() -> str:
def cloneFrom(otherObject: PyRx.RxObject) -> PolyFaceMeshVertex:
def desc() -> PyRx.RxClass:
Returns a pointer to the AcRxClass object representing the specific class, or most recent
parent class explicitly registered with ObjectARX of either the pointer type used to invoke
it or the class qualifier used with it. (Remember that when a static member function is
invoked via a pointer, the pointer type, not the object type, determines which
implementation of the function is invoked.) When working with a pointer to an object and
the proper AcRxClass object for the class of the object pointed to is desired, the
AcRxObject::isA() function should be used, since it is a virtual non-static method and is
therefore not pointer type dependent. Caching the value of the pointer returned by this
method is acceptable, provided the application knows that the AcRxClass object pointed to
by the returned pointer was created by an ObjectARX application that will not be unloaded.
def position(self) -> PyGe.Point3d:
Returns the WCS point value of this vertex. The position value is used for the DXF group
code 10
def setPosition(self, val: PyGe.Point3d) -> None:
Sets the vertex to use pt as the position value. pt must be in WCS coordinates. The
position value is used for the DXF group code 10. Returns Acad::eOk if successful or
Acad::eInvalidInput if the data passed in is not acceptable.
class PolygonMeshVertex Class
def __init__(self) -> None:
The AcDbPolygonMeshVertex class represents vertices within polygon meshes in AutoCAD.
def __init__(self, pos: PyGe.Point3d) -> None:
The AcDbPolygonMeshVertex class represents vertices within polygon meshes in AutoCAD.
def __init__(self, id: PyDb.ObjectId) -> None:
The AcDbPolygonMeshVertex class represents vertices within polygon meshes in AutoCAD.
def __init__(self, id: PyDb.ObjectId, mode: PyDb.OpenMode) -> None:
The AcDbPolygonMeshVertex class represents vertices within polygon meshes in AutoCAD.
def __init__(self, id: PyDb.ObjectId, mode: PyDb.OpenMode, erased: bool) -> None:
The AcDbPolygonMeshVertex class represents vertices within polygon meshes in AutoCAD.
def __init__(*args) -> None:
The AcDbPolygonMeshVertex class represents vertices within polygon meshes in AutoCAD.
def __reduce__(self) -> Any:
def cast(otherObject: PyRx.RxObject) -> PolygonMeshVertex:
def className() -> str:
def cloneFrom(otherObject: PyRx.RxObject) -> PolygonMeshVertex:
def desc() -> PyRx.RxClass:
Returns a pointer to the AcRxClass object representing the specific class, or most recent
parent class explicitly registered with ObjectARX of either the pointer type used to invoke
it or the class qualifier used with it. (Remember that when a static member function is
invoked via a pointer, the pointer type, not the object type, determines which
implementation of the function is invoked.) When working with a pointer to an object and
the proper AcRxClass object for the class of the object pointed to is desired, the
AcRxObject::isA() function should be used, since it is a virtual non-static method and is
therefore not pointer type dependent. Caching the value of the pointer returned by this
method is acceptable, provided the application knows that the AcRxClass object pointed to
by the returned pointer was created by an ObjectARX application that will not be unloaded.
def position(self) -> PyGe.Point3d:
Returns the WCS point value of this vertex.
def setPosition(self, val: PyGe.Point3d) -> None:
Sets the vertex to use pt as the position value. pt must be in WCS coordinates Returns
Acad::eOk if successful or Acad::eInvalidInput if the data passed in is not acceptable.
def vertexType(self) -> object:
Returns the AcDb::Vertex3dType of this vertex. The possible AcDbVertex3dType values are:
AcDb::k3dSimpleVertex Standard vertex within the polyfacemesh. AcDb::k3dControlVertex
Control point for a spline or curve fit mesh. AcDb::k3dFitVertex Vertex that was
automatically generated as the result of a spline or curve fit operation. This type of
vertex can go away or change automatically during subsequent editing operations on the
mesh. The vertex type value is used to determine the value for the DXF group code 70 as
follows: Return values Group Code 70 (bit value) k3dSimpleVertex 64 k3dControlVertex 16
k3dFitVertex 8
class Polyline Class
def __init__(self) -> None:
AcDbPolyline is often called a lightweight polyline because of its efficient use of memory.
AcDbPolyline provides greater performance and reduced overhead compared to AcDb2dPolyline.
Its database representation is more efficient because it is stored as a single object with
a single name, handle, type, space, layer, and width. A lightweight polyline has:Straight
line segmentsBulge (arc segments)Constant and variable widthThickness Functionality and
command options not available in a lightweight polyline include:Arc Fit curve dataSpline
Fit dataCurve fit tangent direction data The lightweight polyline is created with the PLINE
command and edited with the PEDIT command. When creating or editing lightweight polylines,
the command options for PLINE and PEDIT remain the same as in previous releases. The PEDIT
command edits lightweight polylines in the same manner as AcDb2dPolyline in previous
releases. If the Spline or Fit option is entered, then the lightweight polyline is
converted to an AcDb2dPolyline for the duration of the edit. The handle is always
maintained; it does not change. The handle of the lightweight polyline becomes the handle
for the AcDb2dPolyline (the header entity for the old style polyline entity that contains
subentities). Grip behavior is identical to that of AcDb2dPolyline. Behavior with all
AutoCAD edit commands also remains the same. Lightweight polyline properties include color,
layer, linetype, ltype scale, width, and thickness. All properties apply to the entire
object and cannot vary between individual segments.
def __init__(self, num_verts: int) -> None:
AcDbPolyline is often called a lightweight polyline because of its efficient use of memory.
AcDbPolyline provides greater performance and reduced overhead compared to AcDb2dPolyline.
Its database representation is more efficient because it is stored as a single object with
a single name, handle, type, space, layer, and width. A lightweight polyline has:Straight
line segmentsBulge (arc segments)Constant and variable widthThickness Functionality and
command options not available in a lightweight polyline include:Arc Fit curve dataSpline
Fit dataCurve fit tangent direction data The lightweight polyline is created with the PLINE
command and edited with the PEDIT command. When creating or editing lightweight polylines,
the command options for PLINE and PEDIT remain the same as in previous releases. The PEDIT
command edits lightweight polylines in the same manner as AcDb2dPolyline in previous
releases. If the Spline or Fit option is entered, then the lightweight polyline is
converted to an AcDb2dPolyline for the duration of the edit. The handle is always
maintained; it does not change. The handle of the lightweight polyline becomes the handle
for the AcDb2dPolyline (the header entity for the old style polyline entity that contains
subentities). Grip behavior is identical to that of AcDb2dPolyline. Behavior with all
AutoCAD edit commands also remains the same. Lightweight polyline properties include color,
layer, linetype, ltype scale, width, and thickness. All properties apply to the entire
object and cannot vary between individual segments.
def __init__(self, pnts: list[PyGe.Point3d]) -> None:
AcDbPolyline is often called a lightweight polyline because of its efficient use of memory.
AcDbPolyline provides greater performance and reduced overhead compared to AcDb2dPolyline.
Its database representation is more efficient because it is stored as a single object with
a single name, handle, type, space, layer, and width. A lightweight polyline has:Straight
line segmentsBulge (arc segments)Constant and variable widthThickness Functionality and
command options not available in a lightweight polyline include:Arc Fit curve dataSpline
Fit dataCurve fit tangent direction data The lightweight polyline is created with the PLINE
command and edited with the PEDIT command. When creating or editing lightweight polylines,
the command options for PLINE and PEDIT remain the same as in previous releases. The PEDIT
command edits lightweight polylines in the same manner as AcDb2dPolyline in previous
releases. If the Spline or Fit option is entered, then the lightweight polyline is
converted to an AcDb2dPolyline for the duration of the edit. The handle is always
maintained; it does not change. The handle of the lightweight polyline becomes the handle
for the AcDb2dPolyline (the header entity for the old style polyline entity that contains
subentities). Grip behavior is identical to that of AcDb2dPolyline. Behavior with all
AutoCAD edit commands also remains the same. Lightweight polyline properties include color,
layer, linetype, ltype scale, width, and thickness. All properties apply to the entire
object and cannot vary between individual segments.
def __init__(self, pnts: PyGe.Point2dArray) -> None:
AcDbPolyline is often called a lightweight polyline because of its efficient use of memory.
AcDbPolyline provides greater performance and reduced overhead compared to AcDb2dPolyline.
Its database representation is more efficient because it is stored as a single object with
a single name, handle, type, space, layer, and width. A lightweight polyline has:Straight
line segmentsBulge (arc segments)Constant and variable widthThickness Functionality and
command options not available in a lightweight polyline include:Arc Fit curve dataSpline
Fit dataCurve fit tangent direction data The lightweight polyline is created with the PLINE
command and edited with the PEDIT command. When creating or editing lightweight polylines,
the command options for PLINE and PEDIT remain the same as in previous releases. The PEDIT
command edits lightweight polylines in the same manner as AcDb2dPolyline in previous
releases. If the Spline or Fit option is entered, then the lightweight polyline is
converted to an AcDb2dPolyline for the duration of the edit. The handle is always
maintained; it does not change. The handle of the lightweight polyline becomes the handle
for the AcDb2dPolyline (the header entity for the old style polyline entity that contains
subentities). Grip behavior is identical to that of AcDb2dPolyline. Behavior with all
AutoCAD edit commands also remains the same. Lightweight polyline properties include color,
layer, linetype, ltype scale, width, and thickness. All properties apply to the entire
object and cannot vary between individual segments.
def __init__(self, pnts: PyGe.Point3dArray) -> None:
AcDbPolyline is often called a lightweight polyline because of its efficient use of memory.
AcDbPolyline provides greater performance and reduced overhead compared to AcDb2dPolyline.
Its database representation is more efficient because it is stored as a single object with
a single name, handle, type, space, layer, and width. A lightweight polyline has:Straight
line segmentsBulge (arc segments)Constant and variable widthThickness Functionality and
command options not available in a lightweight polyline include:Arc Fit curve dataSpline
Fit dataCurve fit tangent direction data The lightweight polyline is created with the PLINE
command and edited with the PEDIT command. When creating or editing lightweight polylines,
the command options for PLINE and PEDIT remain the same as in previous releases. The PEDIT
command edits lightweight polylines in the same manner as AcDb2dPolyline in previous
releases. If the Spline or Fit option is entered, then the lightweight polyline is
converted to an AcDb2dPolyline for the duration of the edit. The handle is always
maintained; it does not change. The handle of the lightweight polyline becomes the handle
for the AcDb2dPolyline (the header entity for the old style polyline entity that contains
subentities). Grip behavior is identical to that of AcDb2dPolyline. Behavior with all
AutoCAD edit commands also remains the same. Lightweight polyline properties include color,
layer, linetype, ltype scale, width, and thickness. All properties apply to the entire
object and cannot vary between individual segments.
def __init__(self, id: PyDb.ObjectId) -> None:
AcDbPolyline is often called a lightweight polyline because of its efficient use of memory.
AcDbPolyline provides greater performance and reduced overhead compared to AcDb2dPolyline.
Its database representation is more efficient because it is stored as a single object with
a single name, handle, type, space, layer, and width. A lightweight polyline has:Straight
line segmentsBulge (arc segments)Constant and variable widthThickness Functionality and
command options not available in a lightweight polyline include:Arc Fit curve dataSpline
Fit dataCurve fit tangent direction data The lightweight polyline is created with the PLINE
command and edited with the PEDIT command. When creating or editing lightweight polylines,
the command options for PLINE and PEDIT remain the same as in previous releases. The PEDIT
command edits lightweight polylines in the same manner as AcDb2dPolyline in previous
releases. If the Spline or Fit option is entered, then the lightweight polyline is
converted to an AcDb2dPolyline for the duration of the edit. The handle is always
maintained; it does not change. The handle of the lightweight polyline becomes the handle
for the AcDb2dPolyline (the header entity for the old style polyline entity that contains
subentities). Grip behavior is identical to that of AcDb2dPolyline. Behavior with all
AutoCAD edit commands also remains the same. Lightweight polyline properties include color,
layer, linetype, ltype scale, width, and thickness. All properties apply to the entire
object and cannot vary between individual segments.
def __init__(self, id: PyDb.ObjectId, mode: PyDb.OpenMode) -> None:
AcDbPolyline is often called a lightweight polyline because of its efficient use of memory.
AcDbPolyline provides greater performance and reduced overhead compared to AcDb2dPolyline.
Its database representation is more efficient because it is stored as a single object with
a single name, handle, type, space, layer, and width. A lightweight polyline has:Straight
line segmentsBulge (arc segments)Constant and variable widthThickness Functionality and
command options not available in a lightweight polyline include:Arc Fit curve dataSpline
Fit dataCurve fit tangent direction data The lightweight polyline is created with the PLINE
command and edited with the PEDIT command. When creating or editing lightweight polylines,
the command options for PLINE and PEDIT remain the same as in previous releases. The PEDIT
command edits lightweight polylines in the same manner as AcDb2dPolyline in previous
releases. If the Spline or Fit option is entered, then the lightweight polyline is
converted to an AcDb2dPolyline for the duration of the edit. The handle is always
maintained; it does not change. The handle of the lightweight polyline becomes the handle
for the AcDb2dPolyline (the header entity for the old style polyline entity that contains
subentities). Grip behavior is identical to that of AcDb2dPolyline. Behavior with all
AutoCAD edit commands also remains the same. Lightweight polyline properties include color,
layer, linetype, ltype scale, width, and thickness. All properties apply to the entire
object and cannot vary between individual segments.
def __init__(self, id: PyDb.ObjectId, mode: PyDb.OpenMode, erased: bool) -> None:
AcDbPolyline is often called a lightweight polyline because of its efficient use of memory.
AcDbPolyline provides greater performance and reduced overhead compared to AcDb2dPolyline.
Its database representation is more efficient because it is stored as a single object with
a single name, handle, type, space, layer, and width. A lightweight polyline has:Straight
line segmentsBulge (arc segments)Constant and variable widthThickness Functionality and
command options not available in a lightweight polyline include:Arc Fit curve dataSpline
Fit dataCurve fit tangent direction data The lightweight polyline is created with the PLINE
command and edited with the PEDIT command. When creating or editing lightweight polylines,
the command options for PLINE and PEDIT remain the same as in previous releases. The PEDIT
command edits lightweight polylines in the same manner as AcDb2dPolyline in previous
releases. If the Spline or Fit option is entered, then the lightweight polyline is
converted to an AcDb2dPolyline for the duration of the edit. The handle is always
maintained; it does not change. The handle of the lightweight polyline becomes the handle
for the AcDb2dPolyline (the header entity for the old style polyline entity that contains
subentities). Grip behavior is identical to that of AcDb2dPolyline. Behavior with all
AutoCAD edit commands also remains the same. Lightweight polyline properties include color,
layer, linetype, ltype scale, width, and thickness. All properties apply to the entire
object and cannot vary between individual segments.
def __init__(*args) -> None:
AcDbPolyline is often called a lightweight polyline because of its efficient use of memory.
AcDbPolyline provides greater performance and reduced overhead compared to AcDb2dPolyline.
Its database representation is more efficient because it is stored as a single object with
a single name, handle, type, space, layer, and width. A lightweight polyline has:Straight
line segmentsBulge (arc segments)Constant and variable widthThickness Functionality and
command options not available in a lightweight polyline include:Arc Fit curve dataSpline
Fit dataCurve fit tangent direction data The lightweight polyline is created with the PLINE
command and edited with the PEDIT command. When creating or editing lightweight polylines,
the command options for PLINE and PEDIT remain the same as in previous releases. The PEDIT
command edits lightweight polylines in the same manner as AcDb2dPolyline in previous
releases. If the Spline or Fit option is entered, then the lightweight polyline is
converted to an AcDb2dPolyline for the duration of the edit. The handle is always
maintained; it does not change. The handle of the lightweight polyline becomes the handle
for the AcDb2dPolyline (the header entity for the old style polyline entity that contains
subentities). Grip behavior is identical to that of AcDb2dPolyline. Behavior with all
AutoCAD edit commands also remains the same. Lightweight polyline properties include color,
layer, linetype, ltype scale, width, and thickness. All properties apply to the entire
object and cannot vary between individual segments.
def __reduce__(self) -> Any:
def addVertexAt(self, idx: int, pt2d: PyGe.Point2d, bulge: float, startWidth: float, endWidth: float) -> None:
This function adds a vertex to the polyline. If index is 0, the vertex will become the
first vertex of the polyline. If index is the value returned by AcDbPolyline::numverts(),
then the vertex will become the last vertex of the polyline. Otherwise the vertex will be
added just before the index vertex.
def cast(otherObject: PyRx.RxObject) -> Polyline:
def className() -> str:
def cloneFrom(otherObject: PyRx.RxObject) -> Polyline:
def desc() -> PyRx.RxClass:
Returns a pointer to the AcRxClass object representing the specific class, or most recent
parent class explicitly registered with ObjectARX of either the pointer type used to invoke
it or the class qualifier used with it. (Remember that when a static member function is
invoked via a pointer, the pointer type, not the object type, determines which
implementation of the function is invoked.) When working with a pointer to an object and
the proper AcRxClass object for the class of the object pointed to is desired, the
AcRxObject::isA() function should be used, since it is a virtual non-static method and is
therefore not pointer type dependent. Caching the value of the pointer returned by this
method is acceptable, provided the application knows that the AcRxClass object pointed to
by the returned pointer was created by an ObjectARX application that will not be unloaded.
def elevation(self) -> float:
This returns the distance from the WCS origin to the plane of the polyline.
def getAcGeCurve(self, tol: PyGe.Tol) -> PyGe.CompositeCurve3d:
This is getAcGeCurve, a member of class AcDbCurve.
def getAcGeCurve2d(self) -> PyGe.CompositeCurve2d:
def getArcSeg2dAt(self, idx: int) -> PyGe.CircArc2d:
If the segment at vertex index is an arc, then this function will fill in arc with the 3D
arc information (radius, center, and so on) from the polyline in WCS. Returns Acad::eOk if
successful or Acad::eInvalidIndex if index is not valid for the polyline.
def getArcSeg3dAt(self, idx: int) -> PyGe.CircArc3d:
If the segment at vertex index is an arc, then this function will fill in arc with the 3D
arc information (radius, center, and so on) from the polyline in WCS. Returns Acad::eOk if
successful or Acad::eInvalidIndex if index is not valid for the polyline.
def getBulgeAt(self, idx: int) -> float:
This function gets the bulge factor value at the index vertex. The bulge factor is used to
indicate how much of an arc segment is present at this vertex. The bulge factor is the
tangent of one fourth the included angle for an arc segment, made negative if the arc goes
clockwise from the start point to the endpoint. A bulge of 0 indicates a straight segment,
and a bulge of 1 is a semicircle. Returns Acad::eOk if successful or Acad::eInvalidIndex if
index is not valid for the polyline.
def getConstantWidth(self) -> float:
If the polyline has constant width, then this method sets width to the polyline's width
value. Returns Acad::eOk if the polyline has constant width, and Acad::eInvalidInput if the
polyline doesn't have constant width.
def getEcs(self) -> PyGe.Matrix3d:
This function is intended to be overridden by derived classes that need to be able to
provide access to an object coordinate system for objects of the class. The intent is that
this function provide a transformation matrix that can be used to transform vectors or
points from the object's object coordinate system (OCS) to the World Coordinate System
(WCS). Default implementation: Return the identity matrix (ones along the diagonal, zeros
elsewhere) in retVal. We recommend that all data stored in custom classes be stored in WCS
coordinates. If this is done, then the object's OCS will be the WCS and the transformation
matrix will be the identity matrix. Then this function will not need to be overridden since
the identity matrix is this function's default return.
def getEndWidthAt(self, idx: int) -> float:
This returns with startWidth set to the start width and endWidth set to the end width at
the vertex index. Returns Acad::eOk if successful or Acad::eInvalidIndex if index is not
valid for the polyline.
def getLineSeg2dAt(self, idx: int) -> PyGe.LineSeg2d:
If the segment at vertex index is a line, then ln will be set to be a representative 3D
copy of that segment in World Coordinates. Returns Acad::eOk if successful, or
Acad::eInvalidIndex if index is not valid for the polyline.
def getLineSeg3dAt(self, idx: int) -> PyGe.LineSeg3d:
If the segment at vertex index is a line, then ln will be set to be a representative 3D
copy of that segment in World Coordinates. Returns Acad::eOk if successful, or
Acad::eInvalidIndex if index is not valid for the polyline.
def getPoint2dAt(self, idx: int) -> PyGe.Point2d:
This function sets pt to the 3D location of the vertex index in World Coordinates. Returns
Acad::eOk if successful, or Acad::eInvalidIndex if index is not valid for the polyline.
def getPoint3dAt(self, idx: int) -> PyGe.Point3d:
This function sets pt to the 3D location of the vertex index in World Coordinates. Returns
Acad::eOk if successful, or Acad::eInvalidIndex if index is not valid for the polyline.
def getStartWidthAt(self, idx: int) -> float:
This returns with startWidth set to the start width and endWidth set to the end width at
the vertex index. Returns Acad::eOk if successful or Acad::eInvalidIndex if index is not
valid for the polyline.
def hasBulges(self) -> bool:
This function returns Adesk::kTrue if the polyline has any bulge factors set for any of the
segments or Adesk::kFalse if not. Bulge factor values are required for arc segments within
the polyline. See the DXF Specification for more information on bulge factor values. If the
AcDbPolyline object has bulges, use the AcDbPolyline::getBulgeAt() method to acquire any
bulge factors which are set when hasBulges returns Adesk::kTrue.
def hasPlinegen(self) -> bool:
This function returns Adesk::kTrue if the polyline has PLINEGEN set or Adesk::kFalse if
not. PLINEGEN is the attribute that causes linetype generation to be patterned across the
entire polyline instead of done individually at each segment.
def hasVertexIdentifiers(self) -> bool:
def hasWidth(self) -> bool:
This function returns Adesk::kTrue if the polyline has any width values set for any of the
segments or Adesk::kFalse if not. Width values are required for varying width segments
within the polyline. If the AcDbPolyline object has width, use the
AcDbPolyline::getWidthsAt() method to acquire any width values which are set when hasWidth
returns Adesk::kTrue.
def isCCW(self) -> bool:
def isOnlyLines(self) -> bool:
This function returns Adesk::kTrue if there are only lines in the polyline or Adesk::kFalse
if not.
def isPointInside(self, pointWcs: PyGe.Point3d) -> bool:
def makeClosedIfStartAndEndVertexCoincide(self, distTol: float) -> None:
This is makeClosedIfStartAndEndVertexCoincide, a member of class AcDbPolyline.
def maximizeMemory(self) -> None:
This function 'decompresses' any memory compression that may currently be used by the
polyline. This enables faster access to the polyline for modification. This method always
returns Acad::eOk.
def minimizeMemory(self) -> None:
This function optimizes the memory usage of the polyline. This process takes time and
should not be used until all modifications in a session are complete. This method always
returns Acad::eOk.
def normal(self) -> PyGe.Vector3d:
This function returns the normal (in WCS coordinates) to the plane containing the polyline.
def numVerts(self) -> int:
This function returns the number of vertices in the polyline.
def onSegAt(self, idx: int, pt2d: PyGe.Point2d, param: float) -> bool:
This function determines whether or not pt2d (specified in the polyline's Entity Coordinate
System) is on the segment of the polyline starting at vertex index . If pt2d is on the
polyline's segment, then param is set to the location of the point on the segment. param
will be in the parametric form of the segment type (in other words, linear or arc). Returns
Adesk::kTrue if the point is on the polyline, or Adesk::kFalse if not.
def removeVertexAt(self, idx: int) -> None:
This function removes the vertex at index. Returns Acad::eOk if successful. Returns
Acad::eInvalidIndex if index is not valid for the polyline or eDegenerateGeometry if there
is only one vertex.
def reset(self, reuse: bool, numVerts: int) -> None:
This function resets the polyline's vertex data. If reuse is Adesk::kTrue, then the
numVerts number of vertices are left intact and all vertices beyond that number are
deleted. If reuse is Adesk::kFalse, then numVerts is ignored and all existing vertex
information will be deleted.
def segType(self, idx: int) -> SegType:
This function returns the type of segment (AcDbPolyline::SegType) that is headed by the
vertex index. If index is invalid, then this function will assume start and end vertex
values of 0.0 and will return a SegType of kCoincident.
def setBulgeAt(self, idx: int, bulge: float) -> None:
This function sets bulge to be the bulge value for the index vertex. This will determine
the bulge for the polyline segment which follows the index vertex. Returns Acad::eOk if
successful, or Acad::eInvalidIndex if index is not valid for the polyline.
def setClosed(self, val: bool) -> None:
If closed is Adesk::kTrue, this function sets the polyline to be closed (that is, there is
a segment drawn from the last vertex to the first). If closed is Adesk::kFalse, then the
polyline is open (no segment between the last and first vertices).
def setConstantWidth(self, width: float) -> None:
This function sets the polyline to a constant width of width, which must be greater than or
equal to zero. Returns Acad::eOk if successful or Acad::eInvalidIndex if width is less than
0.0.
def setElevation(self, elev: float) -> None:
This function sets elev , the distance of the polyline's plane from the WCS origin.
def setNormal(self, val: PyGe.Vector3d) -> None:
This function sets normal to be the normal vector (in WCS) for the plane containing the
polyline.
def setPlinegen(self, val: bool) -> None:
This function sets the polyline so it displays its linetype across vertices, if plineGen ==
Adesk::kTrue. If plineGen == Adesk::kFalse, the linetype generation starts over at each
vertex.
def setPointAt(self, idx: int, pt2d: PyGe.Point2d) -> None:
This sets pt (in polyline OCS coordinates) to be the location of the index vertex.
def setThickness(self, val: float) -> None:
This sets thickness to be the thickness (extrusion depth or height) of the polyline. If
thickness is greater than zero, then the extrusion is done with along the polyline's
normal. If thickness is less than zero, the extrusion is done along the direction opposite
the polyline's normal. Returns Acad::eOk if successful.
def setWidthsAt(self, idx: int, startWidth: float, endWidth: float) -> None:
This function sets startWidth to be the start width and endWidth to be the end width for
vertex index. Returns Acad::eOk if successful, or Acad::eInvalidIndex if index is not valid
for the polyline.
def simplify(self, dist: float) -> None:
def thickness(self) -> float:
This function returns the thickness of the polyline; this value can be negative. Thickness
is an extrusion relative to the normal of the polyline; if the thickness is negative, then
the extrusion is in the opposite sense of the normal.
def toList(self) -> list[tuple[float, float]]:
def toPoint2dList(self) -> list[PyGe.Point2d]:
def toPoint3dList(self) -> list[PyGe.Point3d]:
class Polyline2d Class
def __init__(self) -> None:
The AcDb2dPolyline class represents the 2D polyline entity within AutoCAD.
def __init__(self, ptype: PyDb.Poly2dType, points: list[PyGe.Point3d], closed: bool) -> None:
The AcDb2dPolyline class represents the 2D polyline entity within AutoCAD.
def __init__(self, ptype: PyDb.Poly2dType, points: PyGe.Point3dArray, closed: bool) -> None:
The AcDb2dPolyline class represents the 2D polyline entity within AutoCAD.
def __init__(self, id: PyDb.ObjectId) -> None:
The AcDb2dPolyline class represents the 2D polyline entity within AutoCAD.
def __init__(self, id: PyDb.ObjectId, mode: PyDb.OpenMode) -> None:
The AcDb2dPolyline class represents the 2D polyline entity within AutoCAD.
def __init__(self, id: PyDb.ObjectId, mode: PyDb.OpenMode, erased: bool) -> None:
The AcDb2dPolyline class represents the 2D polyline entity within AutoCAD.
def __init__(*args) -> None:
The AcDb2dPolyline class represents the 2D polyline entity within AutoCAD.
def __reduce__(self) -> Any:
def appendVertex(self, vertex: PyDb.Vertex2d) -> None:
This function appends the AcDb2dVertex object pointed to by pNewVert to the vertex list of
the polyline, establishes the polyline as the vertex's owner, and adds the vertex the
AcDbDatabase that contains the polyline (the polyline must be database-resident for this
function to succeed). The appended vertex must be explicitly closed by the calling
application after the appendVertex() call returns. Returns Acad::eOk if successful. If the
polyline is not yet database-resident, then Acad::eNoDatabase will be returned.
def appendVertex(self, outVertexId: PyDb.ObjectId, vertex: PyDb.Vertex2d) -> None:
This function appends the AcDb2dVertex object pointed to by pNewVert to the vertex list of
the polyline, establishes the polyline as the vertex's owner, and adds the vertex the
AcDbDatabase that contains the polyline (the polyline must be database-resident for this
function to succeed). The appended vertex must be explicitly closed by the calling
application after the appendVertex() call returns. Returns Acad::eOk if successful. If the
polyline is not yet database-resident, then Acad::eNoDatabase will be returned.
def appendVertex(*args) -> None:
This function appends the AcDb2dVertex object pointed to by pNewVert to the vertex list of
the polyline, establishes the polyline as the vertex's owner, and adds the vertex the
AcDbDatabase that contains the polyline (the polyline must be database-resident for this
function to succeed). The appended vertex must be explicitly closed by the calling
application after the appendVertex() call returns. Returns Acad::eOk if successful. If the
polyline is not yet database-resident, then Acad::eNoDatabase will be returned.
def cast(otherObject: PyRx.RxObject) -> Polyline2d:
def className() -> str:
def cloneFrom(otherObject: PyRx.RxObject) -> Polyline2d:
def constantWidth(self) -> float:
This is constantWidth, a member of class AcDb2dPolyline.
def convertToPolyType(self, val: PyDb.Poly2dType) -> None:
Uses the splineFit() and/or curveFit() methods to convert the polyline to the type
specified by the newType argument value. Possible values for type are: k2dSimplePoly A
standard polyline with no curve/spline fitting. k2dFitCurvePoly A polyline that has been
curve fit. This reflects that the second bit of DXF group code 70 is set. k2dQuadSplinePoly
A spline-fit polyline that has a Quadratic B-spline path. This reflects that the third bit
of DXF group code 70 is set and that DXF group code 75 is set to 5. k2dCubicSplinePoly A
spline-fit polyline that has a Cubic B-spline path. This reflects that the third bit of DXF
group code 70 is set and that DXF group code 75 is set to 6. Returns Acad::eOk if
successful, or Acad::eInvalidInput if the data passed in is not acceptable.
def defaultEndWidth(self) -> float:
Returns the default polyline segment ending width value for the polyline. This value is
used as the default end width for all vertices within the polyline. So, for DXFOUT,
vertices that have this end width will not write the value out. For DXFIN, vertices that do
not have a DXF group code 41 value will use the polyline's default end width. If non-zero,
the default end width value is used for the polyline's DXF group code 41.
def defaultStartWidth(self) -> float:
Returns the default polyline segment starting width value for the polyline. This value is
used as the default start width for all vertices within the polyline. So, for DXFOUT,
vertices that have this start width will not write the value out. For DXFIN, vertices that
do not have a DXF group code 40 value will use the polyline's default start width. If
non-zero, the default start width value is used for the polyline's DXF group code 40.
def desc() -> PyRx.RxClass:
Returns a pointer to the AcRxClass object representing the specific class, or most recent
parent class explicitly registered with ObjectARX of either the pointer type used to invoke
it or the class qualifier used with it. (Remember that when a static member function is
invoked via a pointer, the pointer type, not the object type, determines which
implementation of the function is invoked.) When working with a pointer to an object and
the proper AcRxClass object for the class of the object pointed to is desired, the
AcRxObject::isA() function should be used, since it is a virtual non-static method and is
therefore not pointer type dependent. Caching the value of the pointer returned by this
method is acceptable, provided the application knows that the AcRxClass object pointed to
by the returned pointer was created by an ObjectARX application that will not be unloaded.
def elevation(self) -> float:
Returns the elevation of the polyline. The elevation is the OCS Z axis value of the
polyline (that is, the shortest distance from the WCS origin to the plane containing the
polyline). The elevation value is used for the Z coordinate of DXF group code 10 (group
code 30 in a DXF file).
def insertVertexAt(self, indexVt: PyDb.Vertex2d, newVertex: PyDb.Vertex2d) -> None:
This function inserts the AcDb2dVertex object pointed to by pNewVertex into the vertex list
of the polyline just after the AcDb2dVertex object with objectId indexVertId, establishes
the polyline as the vertex's owner, and adds the vertex to the AcDbDatabase that contains
the polyline (the polyline must be database-resident for this function to succeed). To
insert a vertex at the beginning of the polyline, pass in AcDbObjectId::kNull for the
indexVertId argument. The inserted vertex must be explicitly closed by the calling
application after the insertVertexAt() call returns. Returns Acad::eOk if successful. If
the polyline is not yet database-resident, then Acad::eNoDatabase will be returned.
def insertVertexAt(self, outVertexId: PyDb.ObjectId, indexVtId: PyDb.ObjectId, newVertex: PyDb.Vertex2d) -> None:
This function inserts the AcDb2dVertex object pointed to by pNewVertex into the vertex list
of the polyline just after the AcDb2dVertex object with objectId indexVertId, establishes
the polyline as the vertex's owner, and adds the vertex to the AcDbDatabase that contains
the polyline (the polyline must be database-resident for this function to succeed). To
insert a vertex at the beginning of the polyline, pass in AcDbObjectId::kNull for the
indexVertId argument. The inserted vertex must be explicitly closed by the calling
application after the insertVertexAt() call returns. Returns Acad::eOk if successful. If
the polyline is not yet database-resident, then Acad::eNoDatabase will be returned.
def insertVertexAt(*args) -> None:
This function inserts the AcDb2dVertex object pointed to by pNewVertex into the vertex list
of the polyline just after the AcDb2dVertex object with objectId indexVertId, establishes
the polyline as the vertex's owner, and adds the vertex to the AcDbDatabase that contains
the polyline (the polyline must be database-resident for this function to succeed). To
insert a vertex at the beginning of the polyline, pass in AcDbObjectId::kNull for the
indexVertId argument. The inserted vertex must be explicitly closed by the calling
application after the insertVertexAt() call returns. Returns Acad::eOk if successful. If
the polyline is not yet database-resident, then Acad::eNoDatabase will be returned.
def isLinetypeGenerationOn(self) -> bool:
Returns Adesk::kTrue if linetype generation is turned on for the polyline; otherwise,
returns Adesk::kFalse. When linetype generation is on, the linetype pattern used by the
polyline is generated continuously across all vertices rather than starting over at each
vertex. The linetype generation is reflected in bit 8 of DXF group code 70 (that is, if
linetype generation is on, then the bit is set).
def length(self) -> float:
This is length, a member of class AcDb2dPolyline.
def makeClosed(self) -> None:
This function sets the polyline to be closed (a line segment will be drawn between the last
vertex and the first vertex to form a closed polygon). This sets the first bit of DXF group
code 70. Returns Acad::eOk if successful, or Acad::eInvalidInput if the data passed in is
not acceptable.
def makeClosedIfStartAndEndVertexCoincide(self, val: float) -> None:
This is makeClosedIfStartAndEndVertexCoincide, a member of class AcDb2dPolyline.
def makeOpen(self) -> None:
This function sets the polyline to be open. No line segment will be drawn between the last
vertex and the first vertex, so the polyline will not form a closed polygon. This clears
the first bit of DXF group code 70. Returns Acad::eOk if successful, or Acad::eInvalidInput
if the data passed in is not acceptable.
def normal(self) -> PyGe.Vector3d:
This function returns the normal vector of the plane containing the polyline. The normal
vector is in WCS coordinates. The normal value is used for DXF group code 210.
def openSequenceEnd(self, mode: PyDb.OpenMode) -> SequenceEnd:
This function provides access to the AcDbSequenceEnd entity for the polyline for the
purpose of getting or setting xdata. An attempt is made to open the polyline's Seqend in
the mode specified by openMode. The openMode argument may be one of the
following:AcDb::kForReadAcDb::kForWriteAcDb::kForNotifyIf the open attempt is successful,
then pSeqend will be set to the address of the AcDbSequenceEnd object and Acad::eOk will be
returned. If attempting to open AcDb::kForRead and the Seqend is already opened for read
the maximum of 256 times, then the open attempt will fail and this function will return
Acad::eAtMaxReaders. If the Seqend is currently open AcDb::kForNotify, then the open
attempt will fail and this function will return Acad::eWasNotifying. If the Seqend is
currently involved in an Undo operation, then the open attempt will fail and this function
will return Acad::eWasOpenForUndo. If the Seqend is currently open AcDb::kForWrite, then
the open attempt will fail and this function will return Acad::eWasOpenForWrite.
def openVertex(self, id: PyDb.ObjectId, mode: PyDb.OpenMode) -> Vertex2d:
This function provides access to the polyline's vertices. The function is passed in an
empty pointer pVertex. The object ID of the vertex to open is vertId. The mode to open in
is openMode. openErasedOne is a Boolean indicating whether or not to open the object if it
is erased:. The openMode argument may be one of the
following:AcDb::kForReadAcDb::kForWriteAcDb::kForNotifyIf the open attempt is successful,
then pVertex will be set to the address of the object and Acad::eOk will be returned. If
openErasedEntity is Adesk::kFalse, then attempting to open an erased vertex will fail and
this function will return Acad::eWasErased. If attempting to open AcDb::kForRead and the
vertex is already opened for read the maximum of 256 times, then the open attempt will fail
and this function will return Acad::eAtMaxReaders. If the vertex is currently open
AcDb::kForNotify, then the open attempt will fail and this function will return
Acad::eWasNotifying. If the vertex is currently involved in an Undo operation, then the
open attempt will fail and this function will return Acad::eWasOpenForUndo. If the vertex
is currently open AcDb::kForWrite, then the open attempt will fail and this function will
return Acad::eWasOpenForWrite. If objId is AcDbObjectId::kNull, then the open attempt will,
of course, fail and this function will return Acad::eNullObjectId.
def polyType(self) -> Poly2dType:
Returns the AcDb::Poly2dType, which indicates the curve/spline-fit type for this polyline.
Possible values for AcDb::Poly2dType are: k2dSimplePoly A standard polyline with no
curve/spline fitting. k2dFitCurvePoly A polyline that has been curve fit. This reflects
that the second bit of DXF group code 70 is set. k2dQuadSplinePoly A spline-fit polyline
that has a Quadratic B-spline path. This reflects that the third bit of DXF group code 70
is set and that DXF group code 75 is set to 5. k2dCubicSplinePoly A spline-fit polyline
that has a Cubic B-spline path. This reflects that the third bit of DXF group code 70 is
set and that DXF group code 75 is set to 6.
def setClosed(self, val: bool) -> None:
This is setClosed, a member of class AcDb2dPolyline.
def setConstantWidth(self, val: float) -> None:
This is setConstantWidth, a member of class AcDb2dPolyline.
def setDefaultEndWidth(self, val: float) -> None:
Sets newVal to be the default polyline segment ending width value for the polyline. This
value is used as the default end width for all vertices within the polyline. So, for
DXFOUT, vertices that have this end width will not write the value out. For DXFIN, vertices
that do not have a DXF group code 41 value will use the polyline's default end width. If
non-zero, the default end width value is used for the polyline's DXF group code 41. Returns
Acad::eOk if successful, or Acad::eInvalidInput if the data passed in is not acceptable.
def setDefaultStartWidth(self, val: float) -> None:
Sets newVal to be the default polyline segment starting width value for the polyline. This
value is used as the default start width for all vertices within the polyline. So, for
DXFOUT, vertices that have this start width will not write the value out. For DXFIN,
vertices that do not have a DXF group code 40 value will use the polyline's default start
width. If non-zero, the default start width value is used for the polyline's DXF group code
40. Returns Acad::eOk if successful, or Acad::eInvalidInput if the data passed in is not
acceptable.
def setElevation(self, val: float) -> None:
Sets newVal to be the elevation of the polyline. The elevation is the OCS Z axis value of
the polyline (that is, the shortest distance from the WCS origin to the plane containing
the polyline). The elevation value is used for the Z coordinate of DXF group code 10 (group
code 30 in a DXF file). Returns Acad::eOk if successful, or Acad::eInvalidInput if the data
passed in is not acceptable.
def setLinetypeGenerationOff(self) -> None:
This function sets linetype generation off. This causes the linetype pattern in use by the
polyline to start over at each vertex rather than continuing across vertices. This will
clear bit 8 of DXF group code 70. Returns Acad::eOk if successful, or Acad::eInvalidInput
if the data passed in is not acceptable.
def setLinetypeGenerationOn(self) -> None:
This function sets linetype generation on or off. This causes the linetype pattern used by
the polyline to continue across vertices rather than start over at each vertex. This will
set bit 8 of DXF group code 70. Returns Acad::eOk if successful, or Acad::eInvalidInput if
the data passed in is not acceptable.
def setNormal(self, normal: PyGe.Vector3d) -> None:
This function sets normal to be the normal vector for the plane containing the polyline.
normal must be non-zero in length. The normal value is used for DXF group code 210. Returns
Acad::eOk if successful, or Acad::eInvalidInput if the data passed in is not acceptable.
def setPolyType(self, val: PyDb.Poly2dType) -> None:
Sets type to be the AcDb::Poly2dType for the polyline. The AcDb::Poly2dType indicates the
curve/spline-fit type for this polyline. Possible values for type are: k2dSimplePoly A
standard polyline with no curve/spline fitting. k2dFitCurvePoly A polyline that has been
curve fit. This reflects that the second bit of DXF group code 70 is set. k2dQuadSplinePoly
A spline-fit polyline that has a Quadratic B-spline path. This reflects that the third bit
of DXF group code 70 is set and that DXF group code 75 is set to 5. k2dCubicSplinePoly A
spline-fit polyline that has a Cubic B-spline path. This reflects that the third bit of DXF
group code 70 is set and that DXF group code 75 is set to 6.
def setThickness(self, val: float) -> None:
This function sets thickness to be the thickness for the polyline. The thickness is the
polyline's dimension along its normal vector direction. The normal vector direction is
sometimes called the extrusion direction. The thickness value is used for DXF group code
39.
def splineFit(self) -> None:
This function removes any existing spline or curve-fit vertices, converts all remaining
vertices to spline-control vertices, and generates a new set of spline-fit vertices. The
resultant polyline is spline fit through the new set of vertices. This operation performs
the same modification as the PEDIT command 'Spline fit' option except that it uses
splineType and splineSegs as control parameters for the splineFit operation rather than the
splinetype and splinesegs database/system variables. Returns Acad::eOk if successful.
def splineFit(self, splineType: PyDb.Poly2dType, splineSegs: int) -> None:
This function removes any existing spline or curve-fit vertices, converts all remaining
vertices to spline-control vertices, and generates a new set of spline-fit vertices. The
resultant polyline is spline fit through the new set of vertices. This operation performs
the same modification as the PEDIT command 'Spline fit' option except that it uses
splineType and splineSegs as control parameters for the splineFit operation rather than the
splinetype and splinesegs database/system variables. Returns Acad::eOk if successful.
def splineFit(*args) -> None:
This function removes any existing spline or curve-fit vertices, converts all remaining
vertices to spline-control vertices, and generates a new set of spline-fit vertices. The
resultant polyline is spline fit through the new set of vertices. This operation performs
the same modification as the PEDIT command 'Spline fit' option except that it uses
splineType and splineSegs as control parameters for the splineFit operation rather than the
splinetype and splinesegs database/system variables. Returns Acad::eOk if successful.
def straighten(self) -> None:
This function removes all spline and curve-fit vertices from the polyline and sets all
remaining vertices to be simple vertices. This operation performs the same modification as
the PEDIT command 'Decurve' option. Returns Acad::eOk.
def thickness(self) -> float:
This function returns the thickness of the polyline. The thickness is the polyline's
dimension along its normal vector direction (sometimes called the extrusion direction). The
thickness value is used for DXF group code 39.
def vertexIds(self) -> list[PyDb.ObjectId]:
def vertexPosition(self, vt: PyDb.Vertex2d) -> PyGe.Point3d:
This function returns the WCS coordinate position value of vert. This function uses the X
and Y coordinates from the vertex along with the Z coordinate from the polyline and applies
the polyline's OCS-to-WCS transformation to produce the WCS position value. This function
will work with vertex objects that are not owned by the polyline. The position returned
will be as though the vertex was owned by the polyline.
class Polyline3d Class
def __init__(self) -> None:
The AcDb3dPolyline class represents the 3D polyline entity within AutoCAD.
def __init__(self, ptype: PyDb.Poly3dType, points: list[PyGe.Point3d], closed: bool) -> None:
The AcDb3dPolyline class represents the 3D polyline entity within AutoCAD.
def __init__(self, ptype: PyDb.Poly3dType, points: PyGe.Point3dArray, closed: bool) -> None:
The AcDb3dPolyline class represents the 3D polyline entity within AutoCAD.
def __init__(self, id: PyDb.ObjectId) -> None:
The AcDb3dPolyline class represents the 3D polyline entity within AutoCAD.
def __init__(self, id: PyDb.ObjectId, mode: PyDb.OpenMode) -> None:
The AcDb3dPolyline class represents the 3D polyline entity within AutoCAD.
def __init__(self, id: PyDb.ObjectId, mode: PyDb.OpenMode, erased: bool) -> None:
The AcDb3dPolyline class represents the 3D polyline entity within AutoCAD.
def __init__(*args) -> None:
The AcDb3dPolyline class represents the 3D polyline entity within AutoCAD.
def __reduce__(self) -> Any:
def appendVertex(self, vertex: PyDb.Polyline3dVertex) -> None:
This function appends the AcDb3dPolylineVertex object pointed to by pNewVert to the vertex
list of the polyline, establishes the polyline as the vertex's owner, and adds the vertex
to the AcDbDatabase that contains the polyline (the polyline must be database-resident for
this function to succeed). The appended vertex must be explicitly closed by the calling
application after the appendVertex() call returns. Returns Acad::eOk if successful. If the
polyline is not yet database-resident, then Acad::eNoDatabase will be returned.
def appendVertex(self, outVertexId: PyDb.ObjectId, vertex: PyDb.Polyline3dVertex) -> None:
This function appends the AcDb3dPolylineVertex object pointed to by pNewVert to the vertex
list of the polyline, establishes the polyline as the vertex's owner, and adds the vertex
to the AcDbDatabase that contains the polyline (the polyline must be database-resident for
this function to succeed). The appended vertex must be explicitly closed by the calling
application after the appendVertex() call returns. Returns Acad::eOk if successful. If the
polyline is not yet database-resident, then Acad::eNoDatabase will be returned.
def appendVertex(*args) -> None:
This function appends the AcDb3dPolylineVertex object pointed to by pNewVert to the vertex
list of the polyline, establishes the polyline as the vertex's owner, and adds the vertex
to the AcDbDatabase that contains the polyline (the polyline must be database-resident for
this function to succeed). The appended vertex must be explicitly closed by the calling
application after the appendVertex() call returns. Returns Acad::eOk if successful. If the
polyline is not yet database-resident, then Acad::eNoDatabase will be returned.
def cast(otherObject: PyRx.RxObject) -> Polyline3d:
def className() -> str:
def cloneFrom(otherObject: PyRx.RxObject) -> Polyline3d:
def convertToPolyType(self, val: PyDb.Poly3dType) -> None:
Uses the splineFit() method to convert the polyline to the type specified by the type
argument value. Possible values for type are: k3dSimplePoly A standard polyline with no
spline fitting. k3dQuadSplinePoly A spline-fit polyline that has a Quadratic B-spline path.
This reflects that the third bit of DXF group code 70 is set and that DXF group code 75 is
set to 5. k3dCubicSplinePoly A spline-fit polyline that has a Cubic B-spline path. This
reflects that the third bit of DXF group code 70 is set and that DXF group code 75 is set
to 6. Returns Acad::eOk if successful or Acad::eInvalidInput if the data passed in is not
acceptable.
def desc() -> PyRx.RxClass:
Returns a pointer to the AcRxClass object representing the specific class, or most recent
parent class explicitly registered with ObjectARX of either the pointer type used to invoke
it or the class qualifier used with it. (Remember that when a static member function is
invoked via a pointer, the pointer type, not the object type, determines which
implementation of the function is invoked.) When working with a pointer to an object and
the proper AcRxClass object for the class of the object pointed to is desired, the
AcRxObject::isA() function should be used, since it is a virtual non-static method and is
therefore not pointer type dependent. Caching the value of the pointer returned by this
method is acceptable, provided the application knows that the AcRxClass object pointed to
by the returned pointer was created by an ObjectARX application that will not be unloaded.
def getAcGeCurve(self, tol: PyGe.Tol) -> PyGe.CompositeCurve3d:
This is getAcGeCurve, a member of class AcDbCurve.
def insertVertexAt(self, indexVt: PyDb.Polyline3dVertex, newVertex: PyDb.Polyline3dVertex) -> None:
This function inserts the AcDb3dPolylineVertex object pointed to by pNewVertex into the
vertex list of the polyline just after the AcDb3dPolylineVertex object with objectId
indexVertId, establishes the polyline as the vertex's owner, and adds the vertex to the
AcDbDatabase that contains the polyline (the polyline must be database-resident for this
function to succeed). To insert a vertex at the beginning of the polyline, pass in
AcDbObjectId::kNull for the indexVertId argument. The inserted vertex must be explicitly
closed by the calling application after the insertVertexAt() call returns. Returns
Acad::eOk if successful. If the polyline is not yet database-resident, then
Acad::eNoDatabase will be returned.
def insertVertexAt(self, outVertexId: PyDb.ObjectId, indexVtId: PyDb.ObjectId, newVertex: PyDb.Polyline3dVertex) -> None:
This function inserts the AcDb3dPolylineVertex object pointed to by pNewVertex into the
vertex list of the polyline just after the AcDb3dPolylineVertex object with objectId
indexVertId, establishes the polyline as the vertex's owner, and adds the vertex to the
AcDbDatabase that contains the polyline (the polyline must be database-resident for this
function to succeed). To insert a vertex at the beginning of the polyline, pass in
AcDbObjectId::kNull for the indexVertId argument. The inserted vertex must be explicitly
closed by the calling application after the insertVertexAt() call returns. Returns
Acad::eOk if successful. If the polyline is not yet database-resident, then
Acad::eNoDatabase will be returned.
def insertVertexAt(*args) -> None:
This function inserts the AcDb3dPolylineVertex object pointed to by pNewVertex into the
vertex list of the polyline just after the AcDb3dPolylineVertex object with objectId
indexVertId, establishes the polyline as the vertex's owner, and adds the vertex to the
AcDbDatabase that contains the polyline (the polyline must be database-resident for this
function to succeed). To insert a vertex at the beginning of the polyline, pass in
AcDbObjectId::kNull for the indexVertId argument. The inserted vertex must be explicitly
closed by the calling application after the insertVertexAt() call returns. Returns
Acad::eOk if successful. If the polyline is not yet database-resident, then
Acad::eNoDatabase will be returned.
def length(self) -> float:
This is length, a member of class AcDb3dPolyline.
def makeClosed(self) -> None:
This function sets the polyline to be closed. A line segment will be drawn between the last
vertex and the first vertex to form a closed polygon. This sets the first bit of DXF group
code 70. Returns Acad::eOk.
def makeOpen(self) -> None:
This function sets the polyline to be open. No line segment will be drawn between the last
vertex and the first vertex, so the polyline will not form a closed polygon. This clears
the first bit of DXF group code 70. Returns Acad::eOk.
def openSequenceEnd(self, mode: PyDb.OpenMode) -> SequenceEnd:
This function provides access to the AcDbSequenceEnd entity for the polyline for the
purpose of getting or setting Xdata. An attempt is made to open the polyline's Seqend in
the mode specified by openMode. The openMode argument may be one of the
following:AcDb::kForReadAcDb::kForWriteAcDb::kForNotifyIf the open attempt is successful,
then pSeqend will be set to the address of the AcDbSequenceEnd object and Acad::eOk will be
returned. If attempting to open AcDb::kForRead and the Seqend is already opened for read
the maximum of 256 times, then the open attempt will fail and this function will return
Acad::eAtMaxReaders. If the Seqend is currently open AcDb::kForNotify, then the open
attempt will fail and this function will return Acad::eWasNotifying. If the Seqend is
currently involved in an Undo operation, then the open attempt will fail and this function
will return Acad::eWasOpenForUndo. If the Seqend is currently open AcDb::kForWrite, then
the open attempt will fail and this function will return Acad::eWasOpenForWrite.
def openVertex(self, id: PyDb.ObjectId, mode: PyDb.OpenMode) -> Polyline3dVertex:
This function provides access to the polyline's vertices. pVertex passes in an empty
pointer to the function. vertId is the object ID of the vertex to open. openMode is the
mode to open in. openErasedOne is a Boolean indicating whether or not to open the object if
it is erased. The openMode argument may be one of the
following:AcDb::kForReadAcDb::kForWriteAcDb::kForNotifyIf the open attempt is successful,
then pVertex will be set to the address of the object and Acad::eOk will be returned. If
openErasedEntity is Adesk::kFalse, then attempting to open an erased vertex will fail and
this function will return Acad::eWasErased. If attempting to open AcDb::kForRead and the
vertex is already opened for read the maximum of 256 times, then the open attempt will fail
and this function will return Acad::eAtMaxReaders. If the vertex is currently open
AcDb::kForNotify, then the open attempt will fail and this function will return
Acad::eWasNotifying. If the vertex is currently involved in an Undo operation, then the
open attempt will fail and this function will return Acad::eWasOpenForUndo. If the vertex
is currently open AcDb::kForWrite, then the open attempt will fail and this function will
return Acad::eWasOpenForWrite. If objId is AcDbObjectId::kNull, then the open attempt will,
of course, fail and this function will return Acad::eNullObjectId.
def polyType(self) -> Poly3dType:
Returns the AcDb::Poly3dType, which indicates the spline-fit type for this 3D polyline.
Possible values for AcDb::Poly3dType are: k3dSimplePoly A standard polyline with no spline
fitting. k3dQuadSplinePoly A spline-fit polyline that has a Quadratic B-spline path. This
reflects that the third bit of DXF group code 70 is set and that DXF group code 75 is set
to 5. k3dCubicSplinePoly A spline-fit polyline that has a Cubic B-spline path. This
reflects that the third bit of DXF group code 70 is set and that DXF group code 75 is set
to 6.
def setClosed(self, val: bool) -> None:
This is setClosed, a member of class AcDb3dPolyline.
def setPolyType(self, val: PyDb.Poly3dType) -> None:
Sets type to be the AcDb::Poly3dType for the polyline. The AcDb::Poly3dType indicates the
spline-fit type for this polyline. Possible values for type are: k3dSimplePoly A standard
polyline with no spline fitting. k3dQuadSplinePoly A spline-fit polyline that has a
Quadratic B-spline path. This reflects that the third bit of DXF group code 70 is set and
that DXF group code 75 is set to 5. k3dCubicSplinePoly A spline-fit polyline that has a
Cubic B-spline path. This reflects that the third bit of DXF group code 70 is set and that
DXF group code 75 is set to 6. Returns Acad::eOk.
def splineFit(self) -> None:
This function removes any existing spline or curve-fit vertices, converts all remaining
vertices to spline-control vertices, and generates a new set of spline-fit vertices. The
resultant polyline is spline fit through the new set of vertices. This operation performs
the same modification as the PEDIT command 'Spline fit' option except that it uses
splineType and splineSegs as control parameters for the splineFit operation rather than the
SPLINETYPE and SPLINESEGS database/system variables. Returns Acad::eOk if successful.
def splineFit(self, splineType: PyDb.Poly3dType, splineSegs: int) -> None:
This function removes any existing spline or curve-fit vertices, converts all remaining
vertices to spline-control vertices, and generates a new set of spline-fit vertices. The
resultant polyline is spline fit through the new set of vertices. This operation performs
the same modification as the PEDIT command 'Spline fit' option except that it uses
splineType and splineSegs as control parameters for the splineFit operation rather than the
SPLINETYPE and SPLINESEGS database/system variables. Returns Acad::eOk if successful.
def splineFit(*args) -> None:
This function removes any existing spline or curve-fit vertices, converts all remaining
vertices to spline-control vertices, and generates a new set of spline-fit vertices. The
resultant polyline is spline fit through the new set of vertices. This operation performs
the same modification as the PEDIT command 'Spline fit' option except that it uses
splineType and splineSegs as control parameters for the splineFit operation rather than the
SPLINETYPE and SPLINESEGS database/system variables. Returns Acad::eOk if successful.
def straighten(self) -> None:
This function removes all spline and curve-fit vertices from the polyline or mesh and sets
all remaining vertices to be simple vertices. This operation performs the same modification
as the PEDIT command 'Decurve' option. Returns Acad::eOk.
def vertexIds(self) -> list[PyDb.ObjectId]:
class Polyline3dVertex Class
def __init__(self) -> None:
The AcDb3dPolylineVertex class represents the vertices within 3D polylines in AutoCAD.
def __init__(self, pos: PyGe.Point3d) -> None:
The AcDb3dPolylineVertex class represents the vertices within 3D polylines in AutoCAD.
def __init__(self, id: PyDb.ObjectId) -> None:
The AcDb3dPolylineVertex class represents the vertices within 3D polylines in AutoCAD.
def __init__(self, id: PyDb.ObjectId, mode: PyDb.OpenMode) -> None:
The AcDb3dPolylineVertex class represents the vertices within 3D polylines in AutoCAD.
def __init__(self, id: PyDb.ObjectId, mode: PyDb.OpenMode, erased: bool) -> None:
The AcDb3dPolylineVertex class represents the vertices within 3D polylines in AutoCAD.
def __init__(*args) -> None:
The AcDb3dPolylineVertex class represents the vertices within 3D polylines in AutoCAD.
def __reduce__(self) -> Any:
def cast(otherObject: PyRx.RxObject) -> Polyline3dVertex:
def className() -> str:
def cloneFrom(otherObject: PyRx.RxObject) -> Polyline3dVertex:
def desc() -> PyRx.RxClass:
Returns a pointer to the AcRxClass object representing the specific class, or most recent
parent class explicitly registered with ObjectARX of either the pointer type used to invoke
it or the class qualifier used with it. (Remember that when a static member function is
invoked via a pointer, the pointer type, not the object type, determines which
implementation of the function is invoked.) When working with a pointer to an object and
the proper AcRxClass object for the class of the object pointed to is desired, the
AcRxObject::isA() function should be used, since it is a virtual non-static method and is
therefore not pointer type dependent. Caching the value of the pointer returned by this
method is acceptable, provided the application knows that the AcRxClass object pointed to
by the returned pointer was created by an ObjectARX application that will not be unloaded.
def position(self) -> PyGe.Point3d:
Returns the WCS point value of this vertex.
def setPosition(self, val: PyGe.Point3d) -> None:
Sets the vertex to use pt as the position value. pt must be in WCS coordinates. Returns
Acad::eOk if successful, or Acad::eInvalidInput if the data passed in is not acceptable.
def vertexType(self) -> object:
Returns the AcDb::Vertex3dType of this vertex. The possible AcDbVertex3dType values are:
AcDb::k3dSimpleVertex A standard vertex within the polyface mesh. AcDb::k3dControlVertex A
control point for a spline or curve-fit mesh. AcDb::k3dFitVertex A vertex that was
automatically generated as the result of a spline or curve-fit operation. This type of
vertex can go away or change automatically during subsequent editing operations on the
mesh. The vertex type value is used to determine the value for the DXF group code 70 as
follows: Return values Group Code 70 (bit value) k3dSimpleVertex 32 k3dControlVertex 16
k3dFitVertex 8
class Profile3d Class
def __init__(self) -> None:
This class is used to represent a 3d profile that can be used as input to functions such as
createExtrudedSurface(), createRevolvedSurface(), and createSweptSurface(). An object of
this class can represent an entity such as a curve or a region, or it can represent an edge
or a set of edges that form a connected chain.
def __init__(self, val: PyDb.Entity) -> None:
This class is used to represent a 3d profile that can be used as input to functions such as
createExtrudedSurface(), createRevolvedSurface(), and createSweptSurface(). An object of
this class can represent an entity such as a curve or a region, or it can represent an edge
or a set of edges that form a connected chain.
def __init__(*args) -> None:
This class is used to represent a 3d profile that can be used as input to functions such as
createExtrudedSurface(), createRevolvedSurface(), and createSweptSurface(). An object of
this class can represent an entity such as a curve or a region, or it can represent an edge
or a set of edges that form a connected chain.
def __reduce__(self) -> Any:
def className() -> str:
def desc() -> PyRx.RxClass:
Returns a pointer to the AcRxClass object representing the specific class, or most recent
parent class explicitly registered with ObjectARX of either the pointer type used to invoke
it or the class qualifier used with it. (Remember that when a static member function is
invoked via a pointer, the pointer type, not the object type, determines which
implementation of the function is invoked.) When working with a pointer to an object and
the proper AcRxClass object for the class of the object pointed to is desired, the
AcRxObject::isA() function should be used, since it is a virtual non-static method and is
therefore not pointer type dependent. Caching the value of the pointer returned by this
method is acceptable, provided the application knows that the AcRxClass object pointed to
by the returned pointer was created by an ObjectARX application that will not be unloaded.
def isClosed(self) -> bool:
def isEdge(self) -> bool:
def isFace(self) -> bool:
def isPlanar(self) -> tuple[bool, PyGe.Plane]:
def isSubent(self) -> bool:
def isValid(self) -> bool:
class RadialDimension Class
def __init__(self) -> None:
The AcDbRadialDimension class represents the radius dimension type in AutoCAD. This
dimension type requires a center point and a point on the curve being dimensioned in order
to be able to draw the dimension line from the center point through the point on the curve.
In addition, it utilizes a 'leader length' value to determine how far the dimension line
extends out past the curve before doing a horizontal dogleg (if necessary) to the
annotation text.
def __init__(self, center: PyGe.Point3d, chordPoint: PyGe.Point3d, length: float) -> None:
The AcDbRadialDimension class represents the radius dimension type in AutoCAD. This
dimension type requires a center point and a point on the curve being dimensioned in order
to be able to draw the dimension line from the center point through the point on the curve.
In addition, it utilizes a 'leader length' value to determine how far the dimension line
extends out past the curve before doing a horizontal dogleg (if necessary) to the
annotation text.
def __init__(self, center: PyGe.Point3d, chordPoint: PyGe.Point3d, length: float, dimText: str) -> None:
The AcDbRadialDimension class represents the radius dimension type in AutoCAD. This
dimension type requires a center point and a point on the curve being dimensioned in order
to be able to draw the dimension line from the center point through the point on the curve.
In addition, it utilizes a 'leader length' value to determine how far the dimension line
extends out past the curve before doing a horizontal dogleg (if necessary) to the
annotation text.
def __init__(self, center: PyGe.Point3d, chordPoint: PyGe.Point3d, length: float, dimText: str, id: PyDb.ObjectId) -> None:
The AcDbRadialDimension class represents the radius dimension type in AutoCAD. This
dimension type requires a center point and a point on the curve being dimensioned in order
to be able to draw the dimension line from the center point through the point on the curve.
In addition, it utilizes a 'leader length' value to determine how far the dimension line
extends out past the curve before doing a horizontal dogleg (if necessary) to the
annotation text.
def __init__(self, id: PyDb.ObjectId) -> None:
The AcDbRadialDimension class represents the radius dimension type in AutoCAD. This
dimension type requires a center point and a point on the curve being dimensioned in order
to be able to draw the dimension line from the center point through the point on the curve.
In addition, it utilizes a 'leader length' value to determine how far the dimension line
extends out past the curve before doing a horizontal dogleg (if necessary) to the
annotation text.
def __init__(self, id: PyDb.ObjectId, mode: PyDb.OpenMode) -> None:
The AcDbRadialDimension class represents the radius dimension type in AutoCAD. This
dimension type requires a center point and a point on the curve being dimensioned in order
to be able to draw the dimension line from the center point through the point on the curve.
In addition, it utilizes a 'leader length' value to determine how far the dimension line
extends out past the curve before doing a horizontal dogleg (if necessary) to the
annotation text.
def __init__(self, id: PyDb.ObjectId, mode: PyDb.OpenMode, erased: bool) -> None:
The AcDbRadialDimension class represents the radius dimension type in AutoCAD. This
dimension type requires a center point and a point on the curve being dimensioned in order
to be able to draw the dimension line from the center point through the point on the curve.
In addition, it utilizes a 'leader length' value to determine how far the dimension line
extends out past the curve before doing a horizontal dogleg (if necessary) to the
annotation text.
def __init__(*args) -> None:
The AcDbRadialDimension class represents the radius dimension type in AutoCAD. This
dimension type requires a center point and a point on the curve being dimensioned in order
to be able to draw the dimension line from the center point through the point on the curve.
In addition, it utilizes a 'leader length' value to determine how far the dimension line
extends out past the curve before doing a horizontal dogleg (if necessary) to the
annotation text.
def __reduce__(self) -> Any:
def cast(otherObject: PyRx.RxObject) -> RadialDimension:
def center(self) -> PyGe.Point3d:
This function returns the center point (in WCS coordinates) of the curve being dimensioned.
def chordPoint(self) -> PyGe.Point3d:
This function returns the point (in WCS coordinates) where the dimension line intersects
the curve being dimensioned. The chord point is used for DXF group code 15.
def className() -> str:
def cloneFrom(otherObject: PyRx.RxObject) -> RadialDimension:
def desc() -> PyRx.RxClass:
Returns a pointer to the AcRxClass object representing the specific class, or most recent
parent class explicitly registered with ObjectARX of either the pointer type used to invoke
it or the class qualifier used with it. (Remember that when a static member function is
invoked via a pointer, the pointer type, not the object type, determines which
implementation of the function is invoked.) When working with a pointer to an object and
the proper AcRxClass object for the class of the object pointed to is desired, the
AcRxObject::isA() function should be used, since it is a virtual non-static method and is
therefore not pointer type dependent. Caching the value of the pointer returned by this
method is acceptable, provided the application knows that the AcRxClass object pointed to
by the returned pointer was created by an ObjectARX application that will not be unloaded.
def extArcEndAngle(self) -> float:
This function returns the extension arc end angle.
def extArcStartAngle(self) -> float:
This function returns the extension arc start angle.
def leaderLength(self) -> float:
def setCenter(self, pt: PyGe.Point3d) -> None:
This function sets the dimension to use pt (in WCS coordinates) as the center point of the
curve being dimensioned.
def setChordPoint(self, pt: PyGe.Point3d) -> None:
This function sets the dimension to use pt (in WCS coordinates) as the point where the
dimension line intersects the curve being dimensioned. The chord point is used for DXF
group code 15. This function always returns Acad::eOk.
def setExtArcEndAngle(self, val: float) -> None:
This function sets the extension arc end angle. Returns Acad::eOk if successful. Otherwise,
it returns Acad::eInvalidInput.
def setExtArcStartAngle(self, val: float) -> None:
This function sets the extension arc start angle. Returns Acad::eOk if successful.
Otherwise, it returns Acad::eInvalidInput.
def setLeaderLength(self, val: float) -> None:
This function sets the dimension to use length as the distance from the chordPoint
dimension definition point out to where the dimension does a horizontal dogleg to the
annotation text (or stops if no dogleg is necessary). WarningThe leaderLength setting is
only used during the creation of the dimension (and even then only if the dimension is set
to use the default text position value). After the dimension is closed for the first time,
changing the leaderLength value does not affect how the dimension displays, but the new
setting is stored and shows up in DXF, AutoLISP, ADSRX, and the leaderLength() method.
leaderLength is used for DXF group code 40. This function always returns Acad::eOk.
class RadialDimensionLarge Class
def __init__(self) -> None:
This class represents a large radial dimension, also known as a jogged radius dimension.
def __init__(self, center: PyGe.Point3d, chordPoint: PyGe.Point3d, overrideCenter: PyGe.Point3d, jogPoint: PyGe.Point3d, jogAngle: float) -> None:
This class represents a large radial dimension, also known as a jogged radius dimension.
def __init__(self, center: PyGe.Point3d, chordPoint: PyGe.Point3d, overrideCenter: PyGe.Point3d, jogPoint: PyGe.Point3d, jogAngle: float, dimText: str) -> None:
This class represents a large radial dimension, also known as a jogged radius dimension.
def __init__(self, center: PyGe.Point3d, chordPoint: PyGe.Point3d, overrideCenter: PyGe.Point3d, jogPoint: PyGe.Point3d, jogAngle: float, dimText: str, id: PyDb.ObjectId) -> None:
This class represents a large radial dimension, also known as a jogged radius dimension.
def __init__(self, id: PyDb.ObjectId) -> None:
This class represents a large radial dimension, also known as a jogged radius dimension.
def __init__(self, id: PyDb.ObjectId, mode: PyDb.OpenMode) -> None:
This class represents a large radial dimension, also known as a jogged radius dimension.
def __init__(self, id: PyDb.ObjectId, mode: PyDb.OpenMode, erased: bool) -> None:
This class represents a large radial dimension, also known as a jogged radius dimension.
def __init__(*args) -> None:
This class represents a large radial dimension, also known as a jogged radius dimension.
def __reduce__(self) -> Any:
def cast(otherObject: PyRx.RxObject) -> RadialDimensionLarge:
def center(self) -> PyGe.Point3d:
Returns the center point of the arc dimensioned by the jogged radius dimension.
def chordPoint(self) -> PyGe.Point3d:
Returns the chord point on the arc dimensioned by the jogged radius dimension.
def className() -> str:
def cloneFrom(otherObject: PyRx.RxObject) -> RadialDimensionLarge:
def desc() -> PyRx.RxClass:
Returns a pointer to the AcRxClass object representing the specific class, or most recent
parent class explicitly registered with ObjectARX of either the pointer type used to invoke
it or the class qualifier used with it. (Remember that when a static member function is
invoked via a pointer, the pointer type, not the object type, determines which
implementation of the function is invoked.) When working with a pointer to an object and
the proper AcRxClass object for the class of the object pointed to is desired, the
AcRxObject::isA() function should be used, since it is a virtual non-static method and is
therefore not pointer type dependent. Caching the value of the pointer returned by this
method is acceptable, provided the application knows that the AcRxClass object pointed to
by the returned pointer was created by an ObjectARX application that will not be unloaded.
def extArcEndAngle(self) -> float:
This function returns the extension arc end angle.
def extArcStartAngle(self) -> float:
This function returns the extension arc start angle.
def jogAngle(self) -> float:
Returns the jog angle used by the jogged radius dimension.
def jogPoint(self) -> PyGe.Point3d:
Returns the jog point used by the jogged radius dimension.
def overrideCenter(self) -> PyGe.Point3d:
Returns the overidden center point used by the jogged radius dimension.
def setCenter(self, pt: PyGe.Point3d) -> None:
Sets the center point of the arc dimensioned by the jogged radius dimension.
def setChordPoint(self, pt: PyGe.Point3d) -> None:
Sets the chord point on the arc dimensioned by the jogged radius dimension.
def setExtArcEndAngle(self, val: float) -> None:
This function sets the extension arc end angle. Returns Acad::eOk if successful. Otherwise,
it returns Acad::eInvalidInput.
def setExtArcStartAngle(self, val: float) -> None:
This function sets the extension arc start angle. Returns Acad::eOk if successful.
Otherwise, it returns Acad::eInvalidInput.
def setJogAngle(self, val: float) -> None:
Sets the jog angle used by the jogged radius dimension.
def setJogPoint(self, pt: PyGe.Point3d) -> None:
Sets the jog point used by the jogged radius dimension.
def setJogPointPP(self, pt: PyGe.Point3d) -> None:
For internal use only.
def setOverrideCenter(self, pt: PyGe.Point3d) -> None:
Sets the overidden center point to use for the jogged radius dimension.
def setOverrideCenterPP(self, pt: PyGe.Point3d) -> None:
For internal use only.
def setTextPositionPP(self, pt: PyGe.Point3d) -> None:
For internal use only.
class RasterImage Class
def __init__(self) -> None:
def __init__(self, id: PyDb.ObjectId) -> None:
def __init__(self, id: PyDb.ObjectId, mode: PyDb.OpenMode) -> None:
def __init__(self, id: PyDb.ObjectId, mode: PyDb.OpenMode, erased: bool) -> None:
def __init__(*args) -> None:
def __reduce__(self) -> Any:
def brightness(self) -> int:
def cast(otherObject: PyRx.RxObject) -> RasterImage:
def className() -> str:
def clipBoundary(self) -> list[PyGe.Point2d]:
def clipBoundaryType(self) -> ClipBoundaryType:
def cloneFrom(otherObject: PyRx.RxObject) -> RasterImage:
def contrast(self) -> int:
def desc() -> PyRx.RxClass:
Returns a pointer to the AcRxClass object representing the specific class, or most recent
parent class explicitly registered with ObjectARX of either the pointer type used to invoke
it or the class qualifier used with it. (Remember that when a static member function is
invoked via a pointer, the pointer type, not the object type, determines which
implementation of the function is invoked.) When working with a pointer to an object and
the proper AcRxClass object for the class of the object pointed to is desired, the
AcRxObject::isA() function should be used, since it is a virtual non-static method and is
therefore not pointer type dependent. Caching the value of the pointer returned by this
method is acceptable, provided the application knows that the AcRxClass object pointed to
by the returned pointer was created by an ObjectARX application that will not be unloaded.
def fade(self) -> int:
def getOrientation(self) -> tuple[PyGe.Point3d, PyGe.Vector3d, PyGe.Vector3d]:
def getPixelToModelTransform(self) -> PyGe.Matrix3d:
def getVertices(self) -> list[PyGe.Point3d]:
def height(self) -> float:
def imageDefId(self) -> ObjectId:
def imageHeight(self) -> float:
def imageSize(self, val: bool) -> PyGe.Vector2d:
def imageWidth(self) -> float:
def isClipInverted(self) -> bool:
def isClipped(self) -> bool:
def isImageShown(self) -> bool:
def isImageTransparent(self) -> bool:
def isSetDisplayOpt(self, val: PyDb.ImageDisplayOpt) -> bool:
def isShownClipped(self) -> bool:
def position(self) -> PyGe.Point3d:
def reactorId(self) -> ObjectId:
def rotation(self) -> float:
def scale(self) -> PyGe.Vector2d:
def setBrightness(self, val: int) -> None:
def setClipBoundaryToWholeImage(self, vec: PyGe.Vector2d) -> None:
def setClipInverted(self, val: bool) -> None:
def setContrast(self, val: int) -> None:
def setDisplayOpt(self, opt: PyDb.ImageDisplayOpt, val: bool) -> None:
def setFade(self, val: int) -> None:
def setHeight(self, val: float) -> None:
def setImageDefId(self, id: PyDb.ObjectId) -> None:
def setImageTransparency(self, val: bool) -> None:
def setOrientation(self, pt: PyGe.Point3d, u: PyGe.Vector3d, v: PyGe.Vector3d) -> bool:
def setReactorId(self, id: PyDb.ObjectId) -> None:
def setRotation(self, val: float) -> None:
def setShowClipped(self, val: bool) -> None:
def setShowImage(self, val: bool) -> None:
def setWidth(self, val: float) -> None:
def width(self) -> float:
class RasterImageDef Class
def __init__(self) -> None:
The AcDbRasterImageDef object (or 'image definition object') works with the AcDbRasterImage
entity (or 'image entity') to implement raster images inside AutoCAD. The relationship
between these two classes is much like the relationship between an AutoCAD block definition
object and a block insert entity. The image definition object plays a behind-the-scenes
role like the block definition, maintaining links to the source image file and managing
low-level image processing operations required to display and plot images. Image definition
objects are stored in a special AcDbDictionary named ISM_RASTER_IMAGE_DICT. These objects
are not AutoCAD entities, so they can't be displayed or selected directly by the end user.
They handle only 2D pixel coordinates, so all image processing requests must be expressed
as 2D operations. Image processing operations like scaling and rotating the image for
display are executed by the Autodesk Image Engine. The Image Engine has its own extensive
developer API on which sophisticated image editing applications can be built. (Information
on the Autodesk Image Engine is available through the Autodesk Developer Program.) Refer to
the description of class AcDbRasterImage for more information.Linking to
acISMobj25.libClass AcDbRasterImageDef is implemented in an ObjectARX application called
acISMui.arx. Your application must link to the ObjectARX API library acISMobj25.lib to use
any of the methods specific to this class.
def __init__(self, id: PyDb.ObjectId) -> None:
The AcDbRasterImageDef object (or 'image definition object') works with the AcDbRasterImage
entity (or 'image entity') to implement raster images inside AutoCAD. The relationship
between these two classes is much like the relationship between an AutoCAD block definition
object and a block insert entity. The image definition object plays a behind-the-scenes
role like the block definition, maintaining links to the source image file and managing
low-level image processing operations required to display and plot images. Image definition
objects are stored in a special AcDbDictionary named ISM_RASTER_IMAGE_DICT. These objects
are not AutoCAD entities, so they can't be displayed or selected directly by the end user.
They handle only 2D pixel coordinates, so all image processing requests must be expressed
as 2D operations. Image processing operations like scaling and rotating the image for
display are executed by the Autodesk Image Engine. The Image Engine has its own extensive
developer API on which sophisticated image editing applications can be built. (Information
on the Autodesk Image Engine is available through the Autodesk Developer Program.) Refer to
the description of class AcDbRasterImage for more information.Linking to
acISMobj25.libClass AcDbRasterImageDef is implemented in an ObjectARX application called
acISMui.arx. Your application must link to the ObjectARX API library acISMobj25.lib to use
any of the methods specific to this class.
def __init__(self, id: PyDb.ObjectId, mode: PyDb.OpenMode) -> None:
The AcDbRasterImageDef object (or 'image definition object') works with the AcDbRasterImage
entity (or 'image entity') to implement raster images inside AutoCAD. The relationship
between these two classes is much like the relationship between an AutoCAD block definition
object and a block insert entity. The image definition object plays a behind-the-scenes
role like the block definition, maintaining links to the source image file and managing
low-level image processing operations required to display and plot images. Image definition
objects are stored in a special AcDbDictionary named ISM_RASTER_IMAGE_DICT. These objects
are not AutoCAD entities, so they can't be displayed or selected directly by the end user.
They handle only 2D pixel coordinates, so all image processing requests must be expressed
as 2D operations. Image processing operations like scaling and rotating the image for
display are executed by the Autodesk Image Engine. The Image Engine has its own extensive
developer API on which sophisticated image editing applications can be built. (Information
on the Autodesk Image Engine is available through the Autodesk Developer Program.) Refer to
the description of class AcDbRasterImage for more information.Linking to
acISMobj25.libClass AcDbRasterImageDef is implemented in an ObjectARX application called
acISMui.arx. Your application must link to the ObjectARX API library acISMobj25.lib to use
any of the methods specific to this class.
def __init__(self, id: PyDb.ObjectId, mode: PyDb.OpenMode, erased: bool) -> None:
The AcDbRasterImageDef object (or 'image definition object') works with the AcDbRasterImage
entity (or 'image entity') to implement raster images inside AutoCAD. The relationship
between these two classes is much like the relationship between an AutoCAD block definition
object and a block insert entity. The image definition object plays a behind-the-scenes
role like the block definition, maintaining links to the source image file and managing
low-level image processing operations required to display and plot images. Image definition
objects are stored in a special AcDbDictionary named ISM_RASTER_IMAGE_DICT. These objects
are not AutoCAD entities, so they can't be displayed or selected directly by the end user.
They handle only 2D pixel coordinates, so all image processing requests must be expressed
as 2D operations. Image processing operations like scaling and rotating the image for
display are executed by the Autodesk Image Engine. The Image Engine has its own extensive
developer API on which sophisticated image editing applications can be built. (Information
on the Autodesk Image Engine is available through the Autodesk Developer Program.) Refer to
the description of class AcDbRasterImage for more information.Linking to
acISMobj25.libClass AcDbRasterImageDef is implemented in an ObjectARX application called
acISMui.arx. Your application must link to the ObjectARX API library acISMobj25.lib to use
any of the methods specific to this class.
def __init__(*args) -> None:
The AcDbRasterImageDef object (or 'image definition object') works with the AcDbRasterImage
entity (or 'image entity') to implement raster images inside AutoCAD. The relationship
between these two classes is much like the relationship between an AutoCAD block definition
object and a block insert entity. The image definition object plays a behind-the-scenes
role like the block definition, maintaining links to the source image file and managing
low-level image processing operations required to display and plot images. Image definition
objects are stored in a special AcDbDictionary named ISM_RASTER_IMAGE_DICT. These objects
are not AutoCAD entities, so they can't be displayed or selected directly by the end user.
They handle only 2D pixel coordinates, so all image processing requests must be expressed
as 2D operations. Image processing operations like scaling and rotating the image for
display are executed by the Autodesk Image Engine. The Image Engine has its own extensive
developer API on which sophisticated image editing applications can be built. (Information
on the Autodesk Image Engine is available through the Autodesk Developer Program.) Refer to
the description of class AcDbRasterImage for more information.Linking to
acISMobj25.libClass AcDbRasterImageDef is implemented in an ObjectARX application called
acISMui.arx. Your application must link to the ObjectARX API library acISMobj25.lib to use
any of the methods specific to this class.
def __reduce__(self) -> Any:
def activeFileName(self) -> str:
def cast(otherObject: PyRx.RxObject) -> RasterImageDef:
def className() -> str:
def cloneFrom(otherObject: PyRx.RxObject) -> RasterImageDef:
def createImageDictionary(db: PyDb.Database) -> ObjectId:
def desc() -> PyRx.RxClass:
Returns a pointer to the AcRxClass object representing the specific class, or most recent
parent class explicitly registered with ObjectARX of either the pointer type used to invoke
it or the class qualifier used with it. (Remember that when a static member function is
invoked via a pointer, the pointer type, not the object type, determines which
implementation of the function is invoked.) When working with a pointer to an object and
the proper AcRxClass object for the class of the object pointed to is desired, the
AcRxObject::isA() function should be used, since it is a virtual non-static method and is
therefore not pointer type dependent. Caching the value of the pointer returned by this
method is acceptable, provided the application knows that the AcRxClass object pointed to
by the returned pointer was created by an ObjectARX application that will not be unloaded.
def embed(self) -> None:
def entityCount(self) -> int:
def fileType(self) -> str:
def imageDictionary(db: PyDb.Database) -> ObjectId:
def isEmbedded(self) -> bool:
def isLoaded(self) -> bool:
def load(self) -> None:
def resolutionMMPerPixel(self) -> PyGe.Vector2d:
def resolutionUnits(self) -> ImageUnits:
def searchForActivePath(self) -> str:
def setActiveFileName(self, val: str) -> None:
def setResolutionMMPerPixel(self, vec: PyGe.Vector2d) -> None:
def setResolutionUnits(self, val: PyDb.ImageUnits) -> None:
def setSourceFileName(self, val: str) -> None:
def size(self) -> PyGe.Vector2d:
def sourceFileName(self) -> str:
def suggestName(db: PyDb.Dictionary, name: str) -> str:
def unload(self, val: bool) -> None:
def updateEntities(self) -> None:
class RasterImageDefReactor Class
def __init__(self) -> None:
The AcDbRasterImageDefReactor object is used to notify AcDbRasterImage entities of relevant
modifications to their associated AcDbRasterImageDef object. Specifically, modification of
the AcDbRasterImageDef object triggers the redraw of each of its dependent AcDbRasterImage
entities. Erasing the AcDbRasterImageDef object triggers the erasing of each of its
dependent AcDbRasterImage entities. Linking to acISMobj17.lib Class
AcDbRasterImageDefReactor is implemented in an ObjectARX application called acISMui.arx.
Your application must link to the ObjectARX API library acISMobj17.lib to use any of the
methods specific to this class.
def __init__(self, id: PyDb.ObjectId) -> None:
The AcDbRasterImageDefReactor object is used to notify AcDbRasterImage entities of relevant
modifications to their associated AcDbRasterImageDef object. Specifically, modification of
the AcDbRasterImageDef object triggers the redraw of each of its dependent AcDbRasterImage
entities. Erasing the AcDbRasterImageDef object triggers the erasing of each of its
dependent AcDbRasterImage entities. Linking to acISMobj17.lib Class
AcDbRasterImageDefReactor is implemented in an ObjectARX application called acISMui.arx.
Your application must link to the ObjectARX API library acISMobj17.lib to use any of the
methods specific to this class.
def __init__(self, id: PyDb.ObjectId, mode: PyDb.OpenMode) -> None:
The AcDbRasterImageDefReactor object is used to notify AcDbRasterImage entities of relevant
modifications to their associated AcDbRasterImageDef object. Specifically, modification of
the AcDbRasterImageDef object triggers the redraw of each of its dependent AcDbRasterImage
entities. Erasing the AcDbRasterImageDef object triggers the erasing of each of its
dependent AcDbRasterImage entities. Linking to acISMobj17.lib Class
AcDbRasterImageDefReactor is implemented in an ObjectARX application called acISMui.arx.
Your application must link to the ObjectARX API library acISMobj17.lib to use any of the
methods specific to this class.
def __init__(*args) -> None:
The AcDbRasterImageDefReactor object is used to notify AcDbRasterImage entities of relevant
modifications to their associated AcDbRasterImageDef object. Specifically, modification of
the AcDbRasterImageDef object triggers the redraw of each of its dependent AcDbRasterImage
entities. Erasing the AcDbRasterImageDef object triggers the erasing of each of its
dependent AcDbRasterImage entities. Linking to acISMobj17.lib Class
AcDbRasterImageDefReactor is implemented in an ObjectARX application called acISMui.arx.
Your application must link to the ObjectARX API library acISMobj17.lib to use any of the
methods specific to this class.
def __reduce__(self) -> Any:
def cast(otherObject: PyRx.RxObject) -> RasterImageDefReactor:
def className() -> str:
def cloneFrom(otherObject: PyRx.RxObject) -> RasterImageDefReactor:
def desc() -> PyRx.RxClass:
Returns a pointer to the AcRxClass object representing the specific class, or most recent
parent class explicitly registered with ObjectARX of either the pointer type used to invoke
it or the class qualifier used with it. (Remember that when a static member function is
invoked via a pointer, the pointer type, not the object type, determines which
implementation of the function is invoked.) When working with a pointer to an object and
the proper AcRxClass object for the class of the object pointed to is desired, the
AcRxObject::isA() function should be used, since it is a virtual non-static method and is
therefore not pointer type dependent. Caching the value of the pointer returned by this
method is acceptable, provided the application knows that the AcRxClass object pointed to
by the returned pointer was created by an ObjectARX application that will not be unloaded.
def setEnable(val: bool) -> None:
class RegAppTable Class
def __init__(self, id: PyDb.ObjectId, mode: PyDb.OpenMode, erased: bool) -> None:
def __reduce__(self) -> Any:
def add(self, val: PyDb.RegAppTableRecord) -> ObjectId:
This function adds the record pointed to by pRecord to both the database containing the
table and the table itself. Possible return ErrorStatus codes are: Acad::eOk,
Acad::eOutOfMemory, Acad::eDuplicateRecordName, Acad::eNoDatabase (if the RegAppTable is
not in a database).
def cast(otherObject: PyRx.RxObject) -> RegAppTable:
def className() -> str:
def cloneFrom(otherObject: PyRx.RxObject) -> RegAppTable:
def desc() -> PyRx.RxClass:
Returns a pointer to the AcRxClass object representing the specific class, or most recent
parent class explicitly registered with ObjectARX of either the pointer type used to invoke
it or the class qualifier used with it. (Remember that when a static member function is
invoked via a pointer, the pointer type, not the object type, determines which
implementation of the function is invoked.) When working with a pointer to an object and
the proper AcRxClass object for the class of the object pointed to is desired, the
AcRxObject::isA() function should be used, since it is a virtual non-static method and is
therefore not pointer type dependent. Caching the value of the pointer returned by this
method is acceptable, provided the application knows that the AcRxClass object pointed to
by the returned pointer was created by an ObjectARX application that will not be unloaded.
class RegAppTableRecord Class
def __init__(self) -> None:
Objects of this class represent records in the AcDbRegAppTable (known as the APPID symbol
table in AutoCAD and DXF). Each of these records represents an application ID used to
identify a group of Extended Entity Data attached to objects in the drawing database.
def __init__(self, id: PyDb.ObjectId) -> None:
Objects of this class represent records in the AcDbRegAppTable (known as the APPID symbol
table in AutoCAD and DXF). Each of these records represents an application ID used to
identify a group of Extended Entity Data attached to objects in the drawing database.
def __init__(self, id: PyDb.ObjectId, mode: PyDb.OpenMode) -> None:
Objects of this class represent records in the AcDbRegAppTable (known as the APPID symbol
table in AutoCAD and DXF). Each of these records represents an application ID used to
identify a group of Extended Entity Data attached to objects in the drawing database.
def __init__(self, id: PyDb.ObjectId, mode: PyDb.OpenMode, erased: bool) -> None:
Objects of this class represent records in the AcDbRegAppTable (known as the APPID symbol
table in AutoCAD and DXF). Each of these records represents an application ID used to
identify a group of Extended Entity Data attached to objects in the drawing database.
def __init__(*args) -> None:
Objects of this class represent records in the AcDbRegAppTable (known as the APPID symbol
table in AutoCAD and DXF). Each of these records represents an application ID used to
identify a group of Extended Entity Data attached to objects in the drawing database.
def __reduce__(self) -> Any:
def cast(otherObject: PyRx.RxObject) -> RegAppTableRecord:
def className() -> str:
def cloneFrom(otherObject: PyRx.RxObject) -> RegAppTableRecord:
def desc() -> PyRx.RxClass:
Returns a pointer to the AcRxClass object representing the specific class, or most recent
parent class explicitly registered with ObjectARX of either the pointer type used to invoke
it or the class qualifier used with it. (Remember that when a static member function is
invoked via a pointer, the pointer type, not the object type, determines which
implementation of the function is invoked.) When working with a pointer to an object and
the proper AcRxClass object for the class of the object pointed to is desired, the
AcRxObject::isA() function should be used, since it is a virtual non-static method and is
therefore not pointer type dependent. Caching the value of the pointer returned by this
method is acceptable, provided the application knows that the AcRxClass object pointed to
by the returned pointer was created by an ObjectARX application that will not be unloaded.
class Region Class
def __init__(self) -> None:
Objects of this class represent region entities in AutoCAD. An AcDbRegion entity is a
container and interface for a ShapeManager object that is the actual geometrical
representation of the region. This class provides no provisions for directly manipulating
the edges, vertices, or faces of the ShapeManager object that is the actual region
representation.
def __init__(self, id: PyDb.ObjectId) -> None:
Objects of this class represent region entities in AutoCAD. An AcDbRegion entity is a
container and interface for a ShapeManager object that is the actual geometrical
representation of the region. This class provides no provisions for directly manipulating
the edges, vertices, or faces of the ShapeManager object that is the actual region
representation.
def __init__(self, id: PyDb.ObjectId, mode: PyDb.OpenMode) -> None:
Objects of this class represent region entities in AutoCAD. An AcDbRegion entity is a
container and interface for a ShapeManager object that is the actual geometrical
representation of the region. This class provides no provisions for directly manipulating
the edges, vertices, or faces of the ShapeManager object that is the actual region
representation.
def __init__(*args) -> None:
Objects of this class represent region entities in AutoCAD. An AcDbRegion entity is a
container and interface for a ShapeManager object that is the actual geometrical
representation of the region. This class provides no provisions for directly manipulating
the edges, vertices, or faces of the ShapeManager object that is the actual region
representation.
def __reduce__(self) -> Any:
def booleanOper(self, operation: PyDb.BoolOperType, otherRegion: PyDb.Region) -> None:
def cast(otherObject: PyRx.RxObject) -> Region:
def className() -> str:
def cloneFrom(otherObject: PyRx.RxObject) -> Region:
def createFromCurves(curves: list[PyDb.Curve]) -> list[PyDb.Region]:
def desc() -> PyRx.RxClass:
Returns a pointer to the AcRxClass object representing the specific class, or most recent
parent class explicitly registered with ObjectARX of either the pointer type used to invoke
it or the class qualifier used with it. (Remember that when a static member function is
invoked via a pointer, the pointer type, not the object type, determines which
implementation of the function is invoked.) When working with a pointer to an object and
the proper AcRxClass object for the class of the object pointed to is desired, the
AcRxObject::isA() function should be used, since it is a virtual non-static method and is
therefore not pointer type dependent. Caching the value of the pointer returned by this
method is acceptable, provided the application knows that the AcRxClass object pointed to
by the returned pointer was created by an ObjectARX application that will not be unloaded.
def getArea(self) -> float:
def getNormal(self) -> PyGe.Vector3d:
def getPerimeter(self) -> float:
def isNull(self) -> bool:
def numChanges(self) -> int:
class RemapFileContext Class
kDrawingOpen: ClassVar[Self]
kXrefResolution: ClassVar[Self]
kRasterResolution: ClassVar[Self]
kAfterXrefResolution: ClassVar[Self]
class ReservedStringEnumType Class
kByLayer: ClassVar[Self]
kByBlock: ClassVar[Self]
kNone: ClassVar[Self]
kContinuous: ClassVar[Self]
kStandard: ClassVar[Self]
kNormal: ClassVar[Self]
kDefPoints: ClassVar[Self]
kDefault: ClassVar[Self]
kMissing: ClassVar[Self]
kByColor: ClassVar[Self]
kModel: ClassVar[Self]
kGlobal: ClassVar[Self]
kVS2DWireframe: ClassVar[Self]
kVS3DWireframe: ClassVar[Self]
kVS3DHidden: ClassVar[Self]
kVSRealistic: ClassVar[Self]
kVSConceptual: ClassVar[Self]
kTitle: ClassVar[Self]
kHeader: ClassVar[Self]
kData: ClassVar[Self]
kVSShadesOfGray: ClassVar[Self]
kVSSketchy: ClassVar[Self]
kVSXRay: ClassVar[Self]
kVSShadedWithEdges: ClassVar[Self]
kVSShaded: ClassVar[Self]
kReservedStringCount: ClassVar[Self]
class RevolveOptions Class
def __init__(self) -> None:
Utility class for setting options used by createRevolvedSurface() and
createRevolvedSolid(). These options can be used to control the shape of the resulting
surface or solid. The default constructor for this class assigns default values to these
options.
def __reduce__(self) -> Any:
def checkRevolveCurve(self, ent: PyDb.Entity, axisPnt: PyGe.Point3d, axisDir: PyGe.Vector3d, displayErrorMessages: bool) -> tuple[bool, bool, bool]:
def closeToAxis(self) -> bool:
def draftAngle(self) -> float:
def setCloseToAxis(self, val: bool) -> None:
def setDraftAngle(self, val: float) -> None:
def setTwistAngle(self, val: float) -> None:
def twistAngle(self) -> float:
class RevolvedSurface Class
def __init__(self, id: PyDb.ObjectId, mode: PyDb.OpenMode, erased: bool) -> None:
def __reduce__(self) -> Any:
def cast(otherObject: PyRx.RxObject) -> RevolvedSurface:
def className() -> str:
def cloneFrom(otherObject: PyRx.RxObject) -> RevolvedSurface:
def desc() -> PyRx.RxClass:
Returns a pointer to the AcRxClass object representing the specific class, or most recent
parent class explicitly registered with ObjectARX of either the pointer type used to invoke
it or the class qualifier used with it. (Remember that when a static member function is
invoked via a pointer, the pointer type, not the object type, determines which
implementation of the function is invoked.) When working with a pointer to an object and
the proper AcRxClass object for the class of the object pointed to is desired, the
AcRxObject::isA() function should be used, since it is a virtual non-static method and is
therefore not pointer type dependent. Caching the value of the pointer returned by this
method is acceptable, provided the application knows that the AcRxClass object pointed to
by the returned pointer was created by an ObjectARX application that will not be unloaded.
class RotatedDimType Class
kUnknown: ClassVar[Self]
kParallel: ClassVar[Self]
kPerpendicular: ClassVar[Self]
class RotatedDimension Class
def __init__(self) -> None:
The AcDbRotatedDimension class represents the dimension type that dimensions the distance
between two points in space when they are projected onto a line at a specific angle (the
rotation angle) within the dimension's plane. A 'horizontal' dimension is a rotated
dimension with an angle equal to the angle between the dimension's OCS X axis and the X
axis of the UCS used to define 'horizontal.' A 'vertical' dimension is a rotated dimension
with an angle equal to pi / 2 radians (90 degrees) greater than the angle for a
'horizontal' dimension.
def __init__(self, rotation: float, xl1: PyGe.Point3d, xl2: PyGe.Point3d, dimLinePoint: PyGe.Point3d) -> None:
The AcDbRotatedDimension class represents the dimension type that dimensions the distance
between two points in space when they are projected onto a line at a specific angle (the
rotation angle) within the dimension's plane. A 'horizontal' dimension is a rotated
dimension with an angle equal to the angle between the dimension's OCS X axis and the X
axis of the UCS used to define 'horizontal.' A 'vertical' dimension is a rotated dimension
with an angle equal to pi / 2 radians (90 degrees) greater than the angle for a
'horizontal' dimension.
def __init__(self, rotation: float, xl1: PyGe.Point3d, xl2: PyGe.Point3d, dimLinePoint: PyGe.Point3d, dimText: str) -> None:
The AcDbRotatedDimension class represents the dimension type that dimensions the distance
between two points in space when they are projected onto a line at a specific angle (the
rotation angle) within the dimension's plane. A 'horizontal' dimension is a rotated
dimension with an angle equal to the angle between the dimension's OCS X axis and the X
axis of the UCS used to define 'horizontal.' A 'vertical' dimension is a rotated dimension
with an angle equal to pi / 2 radians (90 degrees) greater than the angle for a
'horizontal' dimension.
def __init__(self, rotation: float, xl1: PyGe.Point3d, xl2: PyGe.Point3d, dimLinePoint: PyGe.Point3d, dimText: str, id: PyDb.ObjectId) -> None:
The AcDbRotatedDimension class represents the dimension type that dimensions the distance
between two points in space when they are projected onto a line at a specific angle (the
rotation angle) within the dimension's plane. A 'horizontal' dimension is a rotated
dimension with an angle equal to the angle between the dimension's OCS X axis and the X
axis of the UCS used to define 'horizontal.' A 'vertical' dimension is a rotated dimension
with an angle equal to pi / 2 radians (90 degrees) greater than the angle for a
'horizontal' dimension.
def __init__(self, id: PyDb.ObjectId) -> None:
The AcDbRotatedDimension class represents the dimension type that dimensions the distance
between two points in space when they are projected onto a line at a specific angle (the
rotation angle) within the dimension's plane. A 'horizontal' dimension is a rotated
dimension with an angle equal to the angle between the dimension's OCS X axis and the X
axis of the UCS used to define 'horizontal.' A 'vertical' dimension is a rotated dimension
with an angle equal to pi / 2 radians (90 degrees) greater than the angle for a
'horizontal' dimension.
def __init__(self, id: PyDb.ObjectId, mode: PyDb.OpenMode) -> None:
The AcDbRotatedDimension class represents the dimension type that dimensions the distance
between two points in space when they are projected onto a line at a specific angle (the
rotation angle) within the dimension's plane. A 'horizontal' dimension is a rotated
dimension with an angle equal to the angle between the dimension's OCS X axis and the X
axis of the UCS used to define 'horizontal.' A 'vertical' dimension is a rotated dimension
with an angle equal to pi / 2 radians (90 degrees) greater than the angle for a
'horizontal' dimension.
def __init__(self, id: PyDb.ObjectId, mode: PyDb.OpenMode, erased: bool) -> None:
The AcDbRotatedDimension class represents the dimension type that dimensions the distance
between two points in space when they are projected onto a line at a specific angle (the
rotation angle) within the dimension's plane. A 'horizontal' dimension is a rotated
dimension with an angle equal to the angle between the dimension's OCS X axis and the X
axis of the UCS used to define 'horizontal.' A 'vertical' dimension is a rotated dimension
with an angle equal to pi / 2 radians (90 degrees) greater than the angle for a
'horizontal' dimension.
def __init__(*args) -> None:
The AcDbRotatedDimension class represents the dimension type that dimensions the distance
between two points in space when they are projected onto a line at a specific angle (the
rotation angle) within the dimension's plane. A 'horizontal' dimension is a rotated
dimension with an angle equal to the angle between the dimension's OCS X axis and the X
axis of the UCS used to define 'horizontal.' A 'vertical' dimension is a rotated dimension
with an angle equal to pi / 2 radians (90 degrees) greater than the angle for a
'horizontal' dimension.
def __reduce__(self) -> Any:
def cast(otherObject: PyRx.RxObject) -> RotatedDimension:
def className() -> str:
def cloneFrom(otherObject: PyRx.RxObject) -> RotatedDimension:
def desc() -> PyRx.RxClass:
Returns a pointer to the AcRxClass object representing the specific class, or most recent
parent class explicitly registered with ObjectARX of either the pointer type used to invoke
it or the class qualifier used with it. (Remember that when a static member function is
invoked via a pointer, the pointer type, not the object type, determines which
implementation of the function is invoked.) When working with a pointer to an object and
the proper AcRxClass object for the class of the object pointed to is desired, the
AcRxObject::isA() function should be used, since it is a virtual non-static method and is
therefore not pointer type dependent. Caching the value of the pointer returned by this
method is acceptable, provided the application knows that the AcRxClass object pointed to
by the returned pointer was created by an ObjectARX application that will not be unloaded.
def dimLinePoint(self) -> PyGe.Point3d:
This function returns the definition point (in WCS coordinates) that specifies where the
dimension line will be (that is, this point will be somewhere on the dimension line). The
dimension line definition point is used for DXF group code 10.
def jogSymbolOn(self) -> bool:
This function returns the jog symbol status. Returns true if the jog symbol is on, false
otherwise.
def jogSymbolPosition(self) -> PyGe.Point3d:
This function returns the jog symbol position.
def oblique(self) -> float:
This function returns the extension line obliquing angle (in radians) for the dimension.
This angle is relative to the AcDbRotatedDimension::rotation() value. Positive angles are
counterclockwise when looking down the dimension's OCS Z axis towards the origin. The line
containing the two extension line start points divides the plane containing the dimension
into two half-planes. The extension lines can only be within the half-plane that contains
the dimension line definition point. So, the obliquing angle is periodic with a period of 0
to pi. Obliquing angles greater than pi are simply mapped to the equivalent angle in the
first period. Negative angles are periodic over 0 to -pi and result in the same obliquing
as the positive angle that results if pi is added to their first period value (for example,
-pi / 4 is the same as 3 x pi / 4) An angle of zero is a special case that is interpreted
as 'use the default,' which is the same as an obliquing angle of pi / 2 (90 degrees). The
obliquing angle is used for DXF group code 52.
def rotation(self) -> float:
This function returns the dimension's rotation angle in radians. The rotation angle is the
angle between the dimension's OCS X axis and the axis of the distance being dimensioned.
Positive angles are counterclockwise when looking down the OCS positive Z axis towards the
origin. The rotation angle is used for DXF group code 50.
def setDimLinePoint(self, pt: PyGe.Point3d) -> None:
This function sets the dimension to use pt (in WCS coordinates) as the definition point
that specifies where the dimension line will be (that is, this point will be somewhere on
the dimension line). The dimension line definition point is used for DXF group code 10.
Returns Acad::eOk if successful or Acad::eInvalidInput if the data passed in is not
acceptable.
def setJogSymbolOn(self, val: bool) -> None:
This function sets the jog symbol status. Returns Acad::eOk if successful. Otherwise, it
returns Acad::eInvalidInput.
def setJogSymbolPosition(self, pt: PyGe.Point3d) -> None:
Sets the jog symbol position. Returns Acad::eOk if successful.
def setOblique(self, val: float) -> None:
This function sets the dimension to use oblique (in radians) as the extension line
obliquing angle for the dimension. This angle is relative to the
AcDbRotatedDimension::rotation() value. Positive angles are counterclockwise when looking
down the dimension's OCS Z axis towards the origin. The line containing the two extension
line start points divides the plane containing the dimension into two half-planes. The
extension lines can only be within the half-plane that contains the dimension line
definition point. So, the obliquing angle is periodic with a period of 0 to pi. Obliquing
angles greater than pi will simply be mapped to the equivalent angle in the first period.
Negative angles are periodic over 0 to -pi and result in the same obliquing as the positive
angle that results if pi is added to their first period value (for example, -pi / 4 is the
same as 3 x pi / 4) An angle of zero is a special case that is interpreted as 'use the
default' which is the same as an obliquing angle of pi / 2 (90 degrees). The obliquing
angle is used for DXF group code 52. This function always returns Acad::eOk.
def setRotation(self, val: float) -> None:
This function sets the dimension to use rot (in radians) as the rotation angle. The
rotation angle is the angle between the dimension's OCS X axis and the axis of the distance
being dimensioned. Positive angles are counter-clockwise when looking down the OCS positive
Z axis towards the origin. The rotation angle is used for DXF group code 50. This function
always returns Acad::eOk.
def setXLine1Point(self, pt: PyGe.Point3d) -> None:
This function sets the dimension to use pt (in WCS coordinates) as the definition point
that's used as the start point for the first extension line of the dimension. The AutoCAD
DIMEXO dimension variable affects how the extension line is displayed relative to this
point. The first extension line start point is used for DXF group code 13. This function
always returns Acad::eOk.
def setXLine2Point(self, pt: PyGe.Point3d) -> None:
This function sets the dimension to use pt (in WCS coordinates) as the definition point
that's used as the start point for the second extension line of the dimension. The AutoCAD
DIMEXO dimension variable affects how the extension line is displayed relative to this
point. The second extension line start point is used for DXF group code 14. This function
always returns Acad::eOk.
def xLine1Point(self) -> PyGe.Point3d:
This function returns the definition point (in WCS coordinates) that's used as the start
point for the first extension line of the dimension. The AutoCAD DIMEXO dimension variable
affects how the extension line is displayed relative to this point. The first extension
line start point is used for DXF group code 13.
def xLine2Point(self) -> PyGe.Point3d:
This function returns the definition point (in WCS coordinates) that's used as the start
point for the second extension line of the dimension. The AutoCAD DIMEXO dimension variable
affects how the extension line is displayed relative to this point. The second extension
line start point is used for DXF group code 14.
class RotationAngle Class
kDegreesUnknown: ClassVar[Self]
kDegrees000: ClassVar[Self]
kDegrees090: ClassVar[Self]
kDegrees180: ClassVar[Self]
kDegrees270: ClassVar[Self]
class RowType Class
kUnknownRow: ClassVar[Self]
kDataRow: ClassVar[Self]
kTitleRow: ClassVar[Self]
kHeaderRow: ClassVar[Self]
kAllRowTypes: ClassVar[Self]
class Section Class
def __init__(self) -> None:
Constructs a section plane using the specified points, normal, and viewing direction.
def __init__(self, pts: list[PyGe.Point3d], verticalDir: PyGe.Vector3d) -> None:
Constructs a section plane using the specified points, normal, and viewing direction.
def __init__(self, pts: list[PyGe.Point3d], verticalDir: PyGe.Vector3d, vecViewingDir: PyGe.Vector3d) -> None:
Constructs a section plane using the specified points, normal, and viewing direction.
def __init__(self, id: PyDb.ObjectId) -> None:
Constructs a section plane using the specified points, normal, and viewing direction.
def __init__(self, id: PyDb.ObjectId, mode: PyDb.OpenMode) -> None:
Constructs a section plane using the specified points, normal, and viewing direction.
def __init__(self, id: PyDb.ObjectId, mode: PyDb.OpenMode, erased: bool) -> None:
Constructs a section plane using the specified points, normal, and viewing direction.
def __init__(*args) -> None:
Constructs a section plane using the specified points, normal, and viewing direction.
def __reduce__(self) -> Any:
def addVertex(self, val: int, pt: PyGe.Point3d) -> None:
def bottomPlane(self) -> float:
def cast(otherObject: PyRx.RxObject) -> Section:
def className() -> str:
def cloneFrom(otherObject: PyRx.RxObject) -> Section:
def createJog(self, pt: PyGe.Point3d) -> None:
def desc() -> PyRx.RxClass:
Returns a pointer to the AcRxClass object representing the specific class, or most recent
parent class explicitly registered with ObjectARX of either the pointer type used to invoke
it or the class qualifier used with it. (Remember that when a static member function is
invoked via a pointer, the pointer type, not the object type, determines which
implementation of the function is invoked.) When working with a pointer to an object and
the proper AcRxClass object for the class of the object pointed to is desired, the
AcRxObject::isA() function should be used, since it is a virtual non-static method and is
therefore not pointer type dependent. Caching the value of the pointer returned by this
method is acceptable, provided the application knows that the AcRxClass object pointed to
by the returned pointer was created by an ObjectARX application that will not be unloaded.
def elevation(self) -> float:
def enableLiveSection(self, val: bool) -> None:
def generateSectionGeometry(self, entity: PyDb.Entity) -> tuple:
def getName(self) -> str:
def getSettings(self) -> ObjectId:
def getVertex(self, val: int) -> PyGe.Point3d:
def getVertices(self) -> list[PyGe.Point3d]:
def hasJogs(self) -> bool:
def height(self) -> float:
def hitTest(self, pt: PyGe.Point3d) -> tuple[bool, int, PyGe.Poin3d, PyDb.SectionSubItem]:
def indicatorFillColor(self) -> Color:
def indicatorTransparency(self) -> int:
def isLiveSectionEnabled(self) -> bool:
def isSlice(self) -> bool:
def normal(self) -> PyGe.Vector3d:
def numVertices(self) -> int:
def plane(self) -> tuple[PyGe.Vector3d, PyGe.Vector3d]:
def removeVertex(self, val: int) -> None:
def sectionPlaneOffset(self) -> float:
def setBottomPlane(self, val: float) -> None:
def setElevation(self, val: float) -> None:
def setHeight(self, nHeightType: PyDb.SectionHeight, val: float) -> None:
def setIndicatorFillColor(self, clr: PyDb.Color) -> None:
def setIndicatorTransparency(self, val: int) -> None:
def setIsSlice(self, val: bool) -> None:
def setName(self, name: str) -> None:
def setSectionPlaneOffset(self, val: float) -> None:
def setState(self, state: PyDb.SectionState) -> None:
def setThicknessDepth(self, val: float) -> None:
def setTopPlane(self, val: float) -> None:
def setVertex(self, val: int, pt: PyGe.Point3d) -> None:
def setVerticalDirection(self, vec: PyGe.Vector3d) -> None:
def setVertices(self, ids: list[PyDb.ObjectId]) -> None:
def setViewingDirection(self, vec: PyGe.Vector3d) -> None:
def state(self) -> SectionState:
def thicknessDepth(self, val: bool) -> float:
def topPlane(self) -> float:
def verticalDirection(self) -> PyGe.Vector3d:
def viewingDirection(self) -> PyGe.Vector3d:
class SectionGeneration Class
kSourceAllObjects: ClassVar[Self]
kSourceSelectedObjects: ClassVar[Self]
kDestinationNewBlock: ClassVar[Self]
kDestinationReplaceBlock: ClassVar[Self]
kDestinationFile: ClassVar[Self]
class SectionGeometry Class
kIntersectionBoundary: ClassVar[Self]
kIntersectionFill: ClassVar[Self]
kBackgroundGeometry: ClassVar[Self]
kForegroundGeometry: ClassVar[Self]
kCurveTangencyLines: ClassVar[Self]
class SectionHeight Class
kHeightAboveSectionLine: ClassVar[Self]
kHeightBelowSectionLine: ClassVar[Self]
class SectionManager Class
def __init__(self, id: PyDb.ObjectId, mode: PyDb.OpenMode, erased: bool) -> None:
This class is used to manage the section planes in a database. This class cannot be
instantiated. An object of this class can be obtained form the database using the
AcDbDatabase::getSectionManager() method.
def __reduce__(self) -> Any:
def cast(otherObject: PyRx.RxObject) -> SectionManager:
def className() -> str:
def cloneFrom(otherObject: PyRx.RxObject) -> SectionManager:
def desc() -> PyRx.RxClass:
Returns a pointer to the AcRxClass object representing the specific class, or most recent
parent class explicitly registered with ObjectARX of either the pointer type used to invoke
it or the class qualifier used with it. (Remember that when a static member function is
invoked via a pointer, the pointer type, not the object type, determines which
implementation of the function is invoked.) When working with a pointer to an object and
the proper AcRxClass object for the class of the object pointed to is desired, the
AcRxObject::isA() function should be used, since it is a virtual non-static method and is
therefore not pointer type dependent. Caching the value of the pointer returned by this
method is acceptable, provided the application knows that the AcRxClass object pointed to
by the returned pointer was created by an ObjectARX application that will not be unloaded.
def getLiveSection(self) -> ObjectId:
This function gets the section plane in the database by name. Returns Acad::eOk if
successful. Returns Acad::eKeyNotFound if a section with the specified name is not found.
Otherwise, returns an AutoCAD error status.
def getSection(self) -> ObjectId:
This function gets the currently enabled live section plane in the database. Live
sectioning is either enabled or disabled individually per section object. Live sectioning
can be active for no more than one section object at a time. The mode argument may be one
of the following: AcDb::kForReadAcDb::kForWriteAcDb::kForNotify Returns Acad::eOk if
successful. Returns Acad::eKeyNotFound if there is no active live section plane.
def getUniqueSectionName(self) -> str:
This function finds a unique section plane name.
def numSections(self) -> int:
This function returns the number of section planes in the database.
def objectIds(self) -> list[PyDb.ObjectId]:
class SectionSettings Class
def __init__(self, id: PyDb.ObjectId, mode: PyDb.OpenMode, erased: bool) -> None:
This class stores section geometry settings.
def __reduce__(self) -> Any:
def cast(otherObject: PyRx.RxObject) -> SectionSettings:
def className() -> str:
def cloneFrom(otherObject: PyRx.RxObject) -> SectionSettings:
def color(self, nSecType: PyDb.SectionType, nGeometry: PyDb.SectionGeometry) -> Color:
def currentSectionType(self) -> SectionType:
def desc() -> PyRx.RxClass:
Returns a pointer to the AcRxClass object representing the specific class, or most recent
parent class explicitly registered with ObjectARX of either the pointer type used to invoke
it or the class qualifier used with it. (Remember that when a static member function is
invoked via a pointer, the pointer type, not the object type, determines which
implementation of the function is invoked.) When working with a pointer to an object and
the proper AcRxClass object for the class of the object pointed to is desired, the
AcRxObject::isA() function should be used, since it is a virtual non-static method and is
therefore not pointer type dependent. Caching the value of the pointer returned by this
method is acceptable, provided the application knows that the AcRxClass object pointed to
by the returned pointer was created by an ObjectARX application that will not be unloaded.
def destinationBlock(self, nSecType: PyDb.SectionType) -> ObjectId:
def destinationFile(self, nSecType: PyDb.SectionType) -> str:
def divisionLines(self, nSecType: PyDb.SectionType, nGeometry: PyDb.SectionGeometry) -> bool:
def edgeTransparency(self, nSecType: PyDb.SectionType, nGeometry: PyDb.SectionGeometry) -> int:
def faceTransparency(self, nSecType: PyDb.SectionType, nGeometry: PyDb.SectionGeometry) -> int:
def generationOptions(self, nSecType: PyDb.SectionType) -> SectionGeneration:
def getHatchPattern(self, nSecType: PyDb.SectionType, nGeometry: PyDb.SectionGeometry) -> tuple[PyDb.HatchPatternType, str]:
def getSourceObjects(self, nSecType: PyDb.SectionType) -> list[PyDb.ObjectId]:
def hatchAngle(self, nSecType: PyDb.SectionType, nGeometry: PyDb.SectionGeometry) -> float:
def hatchScale(self, nSecType: PyDb.SectionType, nGeometry: PyDb.SectionGeometry) -> float:
def hatchSpacing(self, nSecType: PyDb.SectionType, nGeometry: PyDb.SectionGeometry) -> float:
def hatchVisibility(self, nSecType: PyDb.SectionType, nGeometry: PyDb.SectionGeometry) -> bool:
def hiddenLine(self, nSecType: PyDb.SectionType, nGeometry: PyDb.SectionGeometry) -> bool:
def layer(self, nSecType: PyDb.SectionType, nGeometry: PyDb.SectionGeometry) -> str:
def lineWeight(self, nSecType: PyDb.SectionType, nGeometry: PyDb.SectionGeometry) -> LineWeight:
def linetype(self, nSecType: PyDb.SectionType, nGeometry: PyDb.SectionGeometry) -> str:
def linetypeScale(self, nSecType: PyDb.SectionType, nGeometry: PyDb.SectionGeometry) -> float:
def plotStyleName(self, nSecType: PyDb.SectionType, nGeometry: PyDb.SectionGeometry) -> str:
def reset(self) -> None:
def reset(self, nSecType: PyDb.SectionType) -> None:
def reset(*args) -> None:
def setColor(self, nSecType: PyDb.SectionType, nGeometry: PyDb.SectionGeometry, clr: PyDb.Color) -> None:
def setCurrentSectionType(self, nSecType: PyDb.SectionType) -> None:
def setDestinationBlock(self, nSecType: PyDb.SectionType, id: PyDb.ObjectId) -> None:
def setDestinationFile(self, nSecType: PyDb.SectionType, fileName: str) -> None:
def setDivisionLines(self, nSecType: PyDb.SectionType, nGeometry: PyDb.SectionGeometry, show: bool) -> None:
def setEdgeTransparency(self, nSecType: PyDb.SectionType, nGeometry: PyDb.SectionGeometry, val: int) -> None:
def setFaceTransparency(self, nSecType: PyDb.SectionType, nGeometry: PyDb.SectionGeometry, val: int) -> None:
def setGenerationOptions(self, nSecType: PyDb.SectionType, opts: PyDb.SectionGeneration) -> None:
def setHatchAngle(self, nSecType: PyDb.SectionType, nGeometry: PyDb.SectionGeometry, val: float) -> None:
def setHatchPattern(self, nSecType: PyDb.SectionType, nGeometry: PyDb.SectionGeometry, pattern: PyDb.HatchPatternType, name: str) -> None:
def setHatchScale(self, nSecType: PyDb.SectionType, nGeometry: PyDb.SectionGeometry, val: float) -> None:
def setHatchSpacing(self, nSecType: PyDb.SectionType, nGeometry: PyDb.SectionGeometry, val: float) -> None:
def setHatchVisibility(self, nSecType: PyDb.SectionType, nGeometry: PyDb.SectionGeometry, val: bool) -> None:
def setHiddenLine(self, nSecType: PyDb.SectionType, nGeometry: PyDb.SectionGeometry, val: bool) -> None:
def setLayer(self, nSecType: PyDb.SectionType, nGeometry: PyDb.SectionGeometry, name: str) -> None:
def setLineWeight(self, nSecType: PyDb.SectionType, nGeometry: PyDb.SectionGeometry, val: PyDb.LineWeight) -> None:
def setLinetype(self, nSecType: PyDb.SectionType, nGeometry: PyDb.SectionGeometry, lineType: str) -> None:
def setLinetypeScale(self, nSecType: PyDb.SectionType, nGeometry: PyDb.SectionGeometry, val: float) -> None:
def setPlotStyleName(self, nSecType: PyDb.SectionType, nGeometry: PyDb.SectionGeometry, val: str) -> None:
def setSourceObjects(self, nSecType: PyDb.SectionType, ids: list[PyDb.ObjectId]) -> None:
def setVisibility(self, nSecType: PyDb.SectionType, nGeometry: PyDb.SectionGeometry, flag: bool) -> None:
def visibility(self, nSecType: PyDb.SectionType, nGeometry: PyDb.SectionGeometry) -> bool:
class SectionState Class
kPlane: ClassVar[Self]
kBoundary: ClassVar[Self]
kVolume: ClassVar[Self]
class SectionSubItem Class
kNone: ClassVar[Self]
kSectionLine: ClassVar[Self]
kSectionLineTop: ClassVar[Self]
kSectionLineBottom: ClassVar[Self]
kBackLine: ClassVar[Self]
kBackLineTop: ClassVar[Self]
kBackLineBottom: ClassVar[Self]
kVerticalLineTop: ClassVar[Self]
kVerticalLineBottom: ClassVar[Self]
class SectionType Class
kLiveSection: ClassVar[Self]
k2dSection: ClassVar[Self]
k3dSection: ClassVar[Self]
class SegType Class
kLine: ClassVar[Self]
kArc: ClassVar[Self]
kCoincident: ClassVar[Self]
kPoint: ClassVar[Self]
kEmpty: ClassVar[Self]
class SequenceEnd Class
def __init__(self) -> None:
The AcDbSequenceEnd class represents the SEQEND entity within AutoCAD. Objects of this
class are created and handled automatically by AutoCAD for each complex entity that
requires them, such as AcDbBlockReference, AcDb2dPolyline, AcDb3dPolyline, etc.
Applications do not need to create objects of this class, nor do they need to add or remove
them from databases. Applications are free to add or manipulate xdata on objects of this
class, as well as work with extension dictionaries for objects of this class.
def __init__(self, id: PyDb.ObjectId) -> None:
The AcDbSequenceEnd class represents the SEQEND entity within AutoCAD. Objects of this
class are created and handled automatically by AutoCAD for each complex entity that
requires them, such as AcDbBlockReference, AcDb2dPolyline, AcDb3dPolyline, etc.
Applications do not need to create objects of this class, nor do they need to add or remove
them from databases. Applications are free to add or manipulate xdata on objects of this
class, as well as work with extension dictionaries for objects of this class.
def __init__(self, id: PyDb.ObjectId, mode: PyDb.OpenMode) -> None:
The AcDbSequenceEnd class represents the SEQEND entity within AutoCAD. Objects of this
class are created and handled automatically by AutoCAD for each complex entity that
requires them, such as AcDbBlockReference, AcDb2dPolyline, AcDb3dPolyline, etc.
Applications do not need to create objects of this class, nor do they need to add or remove
them from databases. Applications are free to add or manipulate xdata on objects of this
class, as well as work with extension dictionaries for objects of this class.
def __init__(*args) -> None:
The AcDbSequenceEnd class represents the SEQEND entity within AutoCAD. Objects of this
class are created and handled automatically by AutoCAD for each complex entity that
requires them, such as AcDbBlockReference, AcDb2dPolyline, AcDb3dPolyline, etc.
Applications do not need to create objects of this class, nor do they need to add or remove
them from databases. Applications are free to add or manipulate xdata on objects of this
class, as well as work with extension dictionaries for objects of this class.
def __reduce__(self) -> Any:
def cast(otherObject: PyRx.RxObject) -> SequenceEnd:
def className() -> str:
def cloneFrom(otherObject: PyRx.RxObject) -> SequenceEnd:
def desc() -> PyRx.RxClass:
Returns a pointer to the AcRxClass object representing the specific class, or most recent
parent class explicitly registered with ObjectARX of either the pointer type used to invoke
it or the class qualifier used with it. (Remember that when a static member function is
invoked via a pointer, the pointer type, not the object type, determines which
implementation of the function is invoked.) When working with a pointer to an object and
the proper AcRxClass object for the class of the object pointed to is desired, the
AcRxObject::isA() function should be used, since it is a virtual non-static method and is
therefore not pointer type dependent. Caching the value of the pointer returned by this
method is acceptable, provided the application knows that the AcRxClass object pointed to
by the returned pointer was created by an ObjectARX application that will not be unloaded.
class ShadePlotResLevel Class
kAsDisplayed: ClassVar[Self]
kPreview: ClassVar[Self]
kNormal: ClassVar[Self]
kPresentation: ClassVar[Self]
kMaximum: ClassVar[Self]
kCustom: ClassVar[Self]
class ShadePlotType Class
kAsDisplayed: ClassVar[Self]
kWireframe: ClassVar[Self]
kHidden: ClassVar[Self]
kRendered: ClassVar[Self]
kVisualStyle: ClassVar[Self]
kRenderPreset: ClassVar[Self]
class Shape Class
def __init__(self) -> None:
The AcDbShape class represents the SHAPE entity within AutoCAD.
def __init__(self, pnt: PyGe.Point3d, size: float, rotation: float, widthFactor: float) -> None:
The AcDbShape class represents the SHAPE entity within AutoCAD.
def __init__(self, id: PyDb.ObjectId) -> None:
The AcDbShape class represents the SHAPE entity within AutoCAD.
def __init__(self, id: PyDb.ObjectId, mode: PyDb.OpenMode) -> None:
The AcDbShape class represents the SHAPE entity within AutoCAD.
def __init__(self, id: PyDb.ObjectId, mode: PyDb.OpenMode, erased: bool) -> None:
The AcDbShape class represents the SHAPE entity within AutoCAD.
def __init__(*args) -> None:
The AcDbShape class represents the SHAPE entity within AutoCAD.
def __reduce__(self) -> Any:
def cast(otherObject: PyRx.RxObject) -> Shape:
def className() -> str:
def cloneFrom(otherObject: PyRx.RxObject) -> Shape:
def desc() -> PyRx.RxClass:
Returns a pointer to the AcRxClass object representing the specific class, or most recent
parent class explicitly registered with ObjectARX of either the pointer type used to invoke
it or the class qualifier used with it. (Remember that when a static member function is
invoked via a pointer, the pointer type, not the object type, determines which
implementation of the function is invoked.) When working with a pointer to an object and
the proper AcRxClass object for the class of the object pointed to is desired, the
AcRxObject::isA() function should be used, since it is a virtual non-static method and is
therefore not pointer type dependent. Caching the value of the pointer returned by this
method is acceptable, provided the application knows that the AcRxClass object pointed to
by the returned pointer was created by an ObjectARX application that will not be unloaded.
def name(self) -> str:
This function returns the name of the shape. If no name has been set, then NULL is
returned. The caller of this function is responsible for freeing the memory used by the
returned string. The name value is used for DXF group code 2. The name of a shape is not
part of the shape but is derived from the shapeNumber() and the shapeIndex().
def normal(self) -> PyGe.Vector3d:
This function returns the normal vector of the plane containing the shape. The normal
vector is in WCS coordinates. The normal value is used for DXF group code 210.
def oblique(self) -> float:
This function returns the oblique angle of the shape. The obliquing angle is the angle of
slant from the shape's vertical. . The oblique value is used for DXF group code 51.
def position(self) -> PyGe.Point3d:
This function returns the insertion point of the shape in WCS coordinates. The position
value is the WCS equivalent of DXF group code 10.
def rotation(self) -> float:
This function returns the rotation angle of the shape. The rotation angle is relative to
the X axis of the shape's OCS with positive angles going counterclockwise when looking down
the Z axis towards the origin. The OCS X axis is determined by using the shape's normal,
the WCS Z axis, and the arbitrary axis algorithm. The rotation value is used for DXF group
code 50.
def setName(self, val: str) -> None:
This function sets name as the shape name to be used by the AcDbShape object. This function
should be called only on database-resident AcDbShape objects in order to access the text
style table of the database. The name value is used for DXF group code 2. Returns Acad::eOk
if successful. If this AcDbShape object is not in a database, then Acad::eNoDatabase is
returned. If name is a shape that has not been loaded in the AcDbDatabase containing this
AcDbShape object, then Acad::eRecordNotInTable is returned. For the operation to succeed,
the name given must be a shape name in one of the shape files that is currently loaded into
the AcDbDatabase containing this AcDbShape object. The name of a shape is not stored with
the shape but is derived from the shapeNumber() and styleId(). This function can be
inefficient because it must iterate through the text style table looking for shape fonts,
then iterate through each shape font looking for a character with a name that matches. It
will be more efficient to set the shape number and shape font directly using
setShapeNumber() and setStyleId() wherever possible.
def setNormal(self, vec: PyGe.Vector3d) -> None:
This function sets normal to be the normal vector for the plane containing the shape.
normal must be non-zero in length. The normal value is used for DXF group code 210. Returns
Acad::eOk if successful or Acad::eInvalidInput if the data passed in is not acceptable.
def setOblique(self, val: float) -> None:
This function sets angle to be the obliquing angle for the shape. The obliquing angle is
the angle of slant from the shape's vertical. The oblique value is used for DXF group code
51. Returns Acad::eOk if successful or Acad::eInvalidInput if the data passed in is not
acceptable.
def setPosition(self, pt: PyGe.Point3d) -> None:
This function sets pos to be the insertion point for the shape. pos must be in WCS
coordinates. The position value is the WCS equivalent of DXF group code 10. Returns
Acad::eOk if successful or Acad::eInvalidInput if the data passed in is not acceptable.
def setRotation(self, val: float) -> None:
This function sets rotation to be the rotation angle of the shape. The rotation angle is
relative to the X axis of the shape's OCS with positive angles going counter-clockwise when
looking down the Z axis towards the origin. The OCS X axis is determined by using the
shape's normal vector, the WCS Z axis, and the arbitrary axis algorithm. The rotation value
is used for DXF group code 50. Returns Acad::eOk if successful or Acad::eInvalidInput if
the data passed in is not acceptable.
def setShapeNumber(self, idx: int) -> None:
Sets the number of the shape. A shape is stored as a reference to a font, and a character
within that font. Essentially a shape is a single character of a special SHX font. This
function sets the number of that character. Returns Acad::eOk if successful.
def setSize(self, val: float) -> None:
This function sets size to be the height of the shape. The size value is used for DXF group
code 40. Returns Acad::eOk if successful or Acad::eInvalidInput if the data passed in is
not acceptable.
def setStyleId(self, id: PyDb.ObjectId) -> None:
Sets this AcDbShape object to use the shape specified by id. A shape is stored as a
reference to a font, and a character within that font. Essentially a shape is a single
character of a special SHX font. Returns Acad::eOk if successful.
def setThickness(self, val: float) -> None:
This function sets thickness to be the thickness for the shape. The thickness is the
shape's dimension along its normal vector direction (sometimes called the extrusion
direction). The thickness value is used for DXF group code 39. Returns Acad::eOk if
successful or Acad::eInvalidInput if the data passed in is not acceptable.
def setWidthFactor(self, val: float) -> None:
This function sets width to be the width factor (sometimes referred to as the relative
X-scale factor) for the shape. The widthFactor is applied to the shape's width to allow the
width to be adjusted independently of the height. For example, if the widthFactor value is
0.8, then the shape will be drawn with a width that is 80% of its normal 'unadjusted'
width. The width factor value is used for DXF group code 41. Returns Acad::eOk if
successful or Acad::eInvalidInput if the data passed in is not acceptable.
def shapeNumber(self) -> int:
Returns the number of the shape. A shape is stored as a reference to a font, and a
character within that font. Essentially a shape is a single character of a special SHX
font. This function returns the number of that character.
def size(self) -> float:
This function returns the height of the shape. The size value is used for DXF group code
40.
def styleId(self) -> ObjectId:
Returns the object ID of the font symbol table record containing this shape's SHX font. A
shape is stored as a reference to a font, and a character within that font. Essentially a
shape is a single character of a special SHX font. This function returns the object ID of
that SHX font.
def thickness(self) -> float:
This function returns the thickness of the shape. The thickness is the shape's dimension
along its normal vector direction (sometimes called the extrusion direction). The thickness
value is used for DXF group code 39.
def widthFactor(self) -> float:
This function returns the width factor (sometimes referred to as the relative X-scale
factor). The widthFactor is applied to the shape's width to allow the width to be adjusted
independently of the height. For example, if the widthFactor value is 0.8, then the shape
will be drawn with a width that is 80% of its normal 'unadjusted' width. The width factor
value is used for DXF group code 41.
class SnoopDwgFiler Class
def __getitem__(self) -> object:
def __init__(self, filerType: PyDb.FilerType) -> None:
def __reduce__(self) -> Any:
def buffer(self) -> list:
class SnoopDxfFiler Class
def __getitem__(self) -> object:
def __init__(self) -> None:
def __reduce__(self) -> Any:
def buffer(self) -> list:
class SoftOwnershipId Class
def __init__(self, id: PyDb.ObjectId) -> None:
def __reduce__(self) -> Any:
class SoftPointerId Class
def __init__(self, id: PyDb.ObjectId) -> None:
def __reduce__(self) -> Any:
class Solid Class
def __init__(self) -> None:
The AcDbSolid class is the representation for the SOLID entity within AutoCAD. The SOLID
entity is a 2D entity, not the 3D solids that are represented by the AcDb3dSolid and
AcDbBody classes.
def __init__(self, pnt0: PyGe.Point3d, pnt1: PyGe.Point3d, pnt2: PyGe.Point3d) -> None:
The AcDbSolid class is the representation for the SOLID entity within AutoCAD. The SOLID
entity is a 2D entity, not the 3D solids that are represented by the AcDb3dSolid and
AcDbBody classes.
def __init__(self, pnt0: PyGe.Point3d, pnt1: PyGe.Point3d, pnt2: PyGe.Point3d, pnt3: PyGe.Point3d) -> None:
The AcDbSolid class is the representation for the SOLID entity within AutoCAD. The SOLID
entity is a 2D entity, not the 3D solids that are represented by the AcDb3dSolid and
AcDbBody classes.
def __init__(self, id: PyDb.ObjectId) -> None:
The AcDbSolid class is the representation for the SOLID entity within AutoCAD. The SOLID
entity is a 2D entity, not the 3D solids that are represented by the AcDb3dSolid and
AcDbBody classes.
def __init__(self, id: PyDb.ObjectId, mode: PyDb.OpenMode) -> None:
The AcDbSolid class is the representation for the SOLID entity within AutoCAD. The SOLID
entity is a 2D entity, not the 3D solids that are represented by the AcDb3dSolid and
AcDbBody classes.
def __init__(self, id: PyDb.ObjectId, mode: PyDb.OpenMode, erased: bool) -> None:
The AcDbSolid class is the representation for the SOLID entity within AutoCAD. The SOLID
entity is a 2D entity, not the 3D solids that are represented by the AcDb3dSolid and
AcDbBody classes.
def __init__(*args) -> None:
The AcDbSolid class is the representation for the SOLID entity within AutoCAD. The SOLID
entity is a 2D entity, not the 3D solids that are represented by the AcDb3dSolid and
AcDbBody classes.
def __reduce__(self) -> Any:
def cast(otherObject: PyRx.RxObject) -> Solid:
def className() -> str:
def cloneFrom(otherObject: PyRx.RxObject) -> Solid:
def desc() -> PyRx.RxClass:
Returns a pointer to the AcRxClass object representing the specific class, or most recent
parent class explicitly registered with ObjectARX of either the pointer type used to invoke
it or the class qualifier used with it. (Remember that when a static member function is
invoked via a pointer, the pointer type, not the object type, determines which
implementation of the function is invoked.) When working with a pointer to an object and
the proper AcRxClass object for the class of the object pointed to is desired, the
AcRxObject::isA() function should be used, since it is a virtual non-static method and is
therefore not pointer type dependent. Caching the value of the pointer returned by this
method is acceptable, provided the application knows that the AcRxClass object pointed to
by the returned pointer was created by an ObjectARX application that will not be unloaded.
def getPointAt(self, idx: int) -> PyGe.Point3d:
This function fills pntRes in with the value of the point in the solid whose index is
index. index can have a value of 0, 1, 2, or 3, depending on which point is desired (that
is, 0 for the first point, 1 for the second point, etc.). If there are only three corners
on the solid, then the points with indices 2 and 3 will have the same value. The returned
point will be in WCS coordinates. Returns Acad::eOk if successful. If the index is not
between 0 and 3, then Acad::eInvalidIndex will be returned. Point one is the WCS equivalent
of DXF group code 10 Point two is the WCS equivalent of DXF group code 11 Point three is
the WCS equivalent of DXF group code 12 Point four is the WCS equivalent of DXF group code
13
def normal(self) -> PyGe.Vector3d:
This function returns the unit normal vector of the plane containing the solid. The normal
value is used for DXF group code 210.
def setNormal(self, vec: PyGe.Vector3d) -> None:
This function sets normal to be the normal vector for the plane containing the solid.
normal must be non-zero in length. The normal value is used for DXF group code 210. Returns
Acad::eOk if successful or Acad::eInvalidInput if the data passed in is not acceptable.
def setPointAt(self, idx: int, pt: PyGe.Point3d) -> None:
This function sets the index'th point in the solid to the value pt. index must be 0, 1, 2,
or 3. pt must be in WCS coordinates. Returns Acad::eOk if successful. If the index is not
between 0 and 3 then Acad::eInvalidIndex will be returned. Point one is the WCS equivalent
of DXF group code 10 Point two is the WCS equivalent of DXF group code 11 Point three is
the WCS equivalent of DXF group code 12 Point four is the WCS equivalent of DXF group code
13
def setThickness(self, val: float) -> None:
This function sets thickness to be the thickness for the solid. The thickness is the
solid's dimension along its normal vector direction (sometimes called the extrusion
direction). The thickness value is used for DXF group code 39. Returns Acad::eOk if
successful or Acad::eInvalidInput if the data passed in is not acceptable.
def thickness(self) -> float:
This function returns the thickness of the solid. The thickness is the shape's dimension
along its normal vector direction (sometimes called the extrusion direction). The thickness
value is used for DXF group code 39.
class Solid3d Class
def __init__(self) -> None:
Objects of this class represent 3D solids in AutoCAD. An AcDb3dSolid entity is a container
and interface for a ShapeManager object that is the actual geometrical representation of
the solid. This class provides various methods that are used to create solid primitives and
to combine them to form a new single solid, much the same way solid objects are created
using the AutoCAD command set. This class provides no provisions for directly manipulating
the edges, vertices, or faces of the ShapeManager object that is the actual solid
representation.
def __init__(self, id: PyDb.ObjectId) -> None:
Objects of this class represent 3D solids in AutoCAD. An AcDb3dSolid entity is a container
and interface for a ShapeManager object that is the actual geometrical representation of
the solid. This class provides various methods that are used to create solid primitives and
to combine them to form a new single solid, much the same way solid objects are created
using the AutoCAD command set. This class provides no provisions for directly manipulating
the edges, vertices, or faces of the ShapeManager object that is the actual solid
representation.
def __init__(self, id: PyDb.ObjectId, mode: PyDb.OpenMode) -> None:
Objects of this class represent 3D solids in AutoCAD. An AcDb3dSolid entity is a container
and interface for a ShapeManager object that is the actual geometrical representation of
the solid. This class provides various methods that are used to create solid primitives and
to combine them to form a new single solid, much the same way solid objects are created
using the AutoCAD command set. This class provides no provisions for directly manipulating
the edges, vertices, or faces of the ShapeManager object that is the actual solid
representation.
def __init__(self, id: PyDb.ObjectId, mode: PyDb.OpenMode, erased: bool) -> None:
Objects of this class represent 3D solids in AutoCAD. An AcDb3dSolid entity is a container
and interface for a ShapeManager object that is the actual geometrical representation of
the solid. This class provides various methods that are used to create solid primitives and
to combine them to form a new single solid, much the same way solid objects are created
using the AutoCAD command set. This class provides no provisions for directly manipulating
the edges, vertices, or faces of the ShapeManager object that is the actual solid
representation.
def __init__(*args) -> None:
Objects of this class represent 3D solids in AutoCAD. An AcDb3dSolid entity is a container
and interface for a ShapeManager object that is the actual geometrical representation of
the solid. This class provides various methods that are used to create solid primitives and
to combine them to form a new single solid, much the same way solid objects are created
using the AutoCAD command set. This class provides no provisions for directly manipulating
the edges, vertices, or faces of the ShapeManager object that is the actual solid
representation.
def __reduce__(self) -> Any:
def booleanOper(self, operation: PyDb.BoolOperType, solid: PyDb.Solid3d) -> None:
def cast(otherObject: PyRx.RxObject) -> Solid3d:
def chamferEdges(self, edgeSubentIds: list[PyDb.SubentId], faceSubentId: PyDb.SubentId, baseDist: float, otherDist: float) -> None:
def checkInterference(self, val: PyDb.Solid3d, createNewSolid: bool) -> tuple[bool, PyDb.Solid3d]:
def className() -> str:
def cleanBody(self) -> None:
def cloneFrom(otherObject: PyRx.RxObject) -> Solid3d:
def copyEdge(self, subentId: PyDb.SubentId) -> Entity:
def copyFace(self, subentId: PyDb.SubentId) -> Entity:
def createBox(self, xLen: float, yLen: float, zLen: float) -> None:
def createExtrudedSolid(self, pSweepEnt: PyDb.Entity, directionVec: PyGe.Vector3d, sweepOptions: PyDb.SweepOptions) -> None:
def createExtrudedSolid(self, pSweepEnt: PyDb.Entity, faceSubentId: PyDb.SubentId, directionVec: PyGe.Vector3d, sweepOptions: PyDb.SweepOptions) -> None:
def createExtrudedSolid(self, pSweepEnt: PyDb.Entity, faceSubentId: PyDb.SubentId, height: float, sweepOptions: PyDb.SweepOptions) -> None:
def createExtrudedSolid(*args) -> None:
def createFrom(self, val: PyDb.Entity) -> None:
def createFrustum(self, height: float, xRadius: float, yRadius: float, topXRadius: float) -> None:
def createPyramid(self, height: float, sides: int, radius: float, topRadius: float) -> None:
def createRevolvedSolid(self, pRevEnt: PyDb.Entity, axisPnt: PyGe.Point3d, axisDir: PyGe.Vector3d, revAngle: float, startAngle: float, revolveOptions: PyDb.RevolveOptions) -> None:
def createRevolvedSolid(self, pRevEnt: PyDb.Entity, faceSubentId: PyDb.SubentId, axisPnt: PyGe.Point3d, axisDir: PyGe.Vector3d, revAngle: float, startAngle: float, revolveOptions: PyDb.RevolveOptions) -> None:
def createRevolvedSolid(*args) -> None:
def createSculptedSolid(self, limitingBodies: list[PyDb.Entity], limitingFlags: list[int]) -> None:
def createSphere(self, radius: float) -> None:
def createSweptSolid(self, pSweepEnt: PyDb.Entity, pPathEnt: PyDb.Entity, sweepOptions: PyDb.SweepOptions) -> None:
def createSweptSolid(self, pSweepEnt: PyDb.Entity, faceSubentId: PyDb.SubentId, pPathEnt: PyDb.Entity, sweepOptions: PyDb.SweepOptions) -> None:
def createSweptSolid(*args) -> None:
def createTorus(self, majorRadius: float, minorRadius: float) -> None:
def createWedge(self, xLen: float, yLen: float, zLen: float) -> None:
def desc() -> PyRx.RxClass:
Returns a pointer to the AcRxClass object representing the specific class, or most recent
parent class explicitly registered with ObjectARX of either the pointer type used to invoke
it or the class qualifier used with it. (Remember that when a static member function is
invoked via a pointer, the pointer type, not the object type, determines which
implementation of the function is invoked.) When working with a pointer to an object and
the proper AcRxClass object for the class of the object pointed to is desired, the
AcRxObject::isA() function should be used, since it is a virtual non-static method and is
therefore not pointer type dependent. Caching the value of the pointer returned by this
method is acceptable, provided the application knows that the AcRxClass object pointed to
by the returned pointer was created by an ObjectARX application that will not be unloaded.
def extrude(self, region: PyDb.Region, height: float, taperAngle: float) -> None:
def extrudeAlongPath(self, region: PyDb.Region, path: PyDb.Curve, taperAngle: float) -> None:
def extrudeFaces(self, subentIds: list[PyDb.SubentId], height: float, taper: float) -> None:
def extrudeFacesAlongPath(self, subentIds: list[PyDb.SubentId], path: PyDb.Curve) -> None:
def filletEdges(self, edgeSubentIds: list[PyDb.SubentId], radius: list[float], startSetback: list[float], endSetback: list[float]) -> None:
def getArea(self) -> float:
def getMassProp(self) -> tuple:
def getSection(self, plane: PyGe.Plane) -> Region:
def getSlice(self, plane: PyGe.Plane | PyDb.Surface, getNegHalfToo: bool) -> Solid3d:
def getSubentColor(self, faceSubentId: PyDb.SubentId) -> Color:
def getSubentMaterial(self, faceSubentId: PyDb.SubentId) -> ObjectId:
def imprintEntity(self, pEntity: PyDb.Entity) -> None:
def isNull(self) -> bool:
def numChanges(self) -> int:
def offsetBody(self, offsetDistance: float) -> None:
def offsetFaces(self, faceSubentIds: list[PyDb.SubentId], offsetDistance: float) -> None:
def projectOnToSolid(self, pEntityToProject: PyDb.Entity, projectionDirection: PyGe.Vector3d) -> list[PyDb.Entity]:
def recordHistory(self) -> bool:
def removeFaces(self, faceSubentIds: list[PyDb.SubentId]) -> None:
def separateBody(self) -> list[PyDb.Solid3d]:
def setRecordHistory(self, val: bool) -> None:
def setShowHistory(self, val: bool) -> None:
def setSubentColor(self, faceSubentId: PyDb.SubentId, clr: PyDb.AcCmColor) -> None:
def setSubentMaterial(self, faceSubentId: PyDb.SubentId, id: PyDb.ObjectId) -> None:
def shellBody(self, faceSubentIds: list[PyDb.SubentId], offsetDistance: float) -> None:
def showHistory(self) -> bool:
def stlOut(self, fileName: str, asciiFormat: bool, maxSurfaceDeviation: float) -> None:
def taperFaces(self, faceSubentIds: list[PyDb.SubentId], basePoint: PyGe.Point3d, draftVector: PyGe.Vector3d, draftAngle: float) -> None:
def transformFaces(self, faceSubentIds: list[PyDb.SubentId], xform: PyGe.Matrix2d) -> None:
def usesGraphicsCache(self) -> bool:
class SortentsTable Class
def __init__(self) -> None:
AcDbSortentsTable is the persistent container for draw order information. It resides in the
extension dictionary of an associated AcDbBlockTableRecord under the key ACAD_SORTENTS.
AcDbSortentsTable contains a set of object ID/handle pairs. The object ID is that of the
entity to be drawn, and the handle is that of an entity in the block table record (usually
but not always different from the associated object ID), which represents the position in
the draw order. Entities are appended to a block table record in order of ascending handle
value; in other words, the higher the handle value, the later it appears in a block table
record. When it's time to draw entities in a block table record, an iterator goes through
the block table record in append order. At each entity, the handle value is obtained and
used to query into the sortents table. If there is a match, the object ID associated with
the handle value in the sortents table is drawn. If there is no match in the sortents
table, then the entity at the iterator position is drawn in its 'natural' order. When the
draw order of entities is modified, many of the entries in the sortents table may be
modified. For example, a block table record has five entities with the following handles
(usually represented as strings representing hexadecimal numbers): 4A, 4B, 4C, 4D, 4E.
These handles appear in ascending order. When an application iterates over the entities in
a block table record in the default direction, the handle value always increases from one
entity to the next. To draw the last entity in the space first (or 'behind' the others),
five entries in the sortents table must be made, as follows: Entity ID Draw Order Handle 4E
4A 4A 4B 4B 4C 4C 4D 4D 4E The order of the entries (represented as a row in the preceding
table) is irrelevant; draw order processing ends up sorting the entries by the draw order
handle when performing the draw. In other words, in a DXF file, the table entries might
appear in the following order, but the resultant draw order is identical: Entity ID Draw
Order Handle 4C 4D 4B 4C 4E 4A 4D 4E 4A 4B As another example, the last entity in the space
is moved 'under' the next-to-last entity in the space, but the rest of the entities are
drawn in 'natural' order. In that case, the sortents table would only need two entries, as
follows: Entity ID Draw Order Handle 4E 4D 4D 4E Adding new entities to the block table
record with an implicit draw order of 'last' requires no new entry in the sortents table.
def __init__(self, id: PyDb.ObjectId) -> None:
AcDbSortentsTable is the persistent container for draw order information. It resides in the
extension dictionary of an associated AcDbBlockTableRecord under the key ACAD_SORTENTS.
AcDbSortentsTable contains a set of object ID/handle pairs. The object ID is that of the
entity to be drawn, and the handle is that of an entity in the block table record (usually
but not always different from the associated object ID), which represents the position in
the draw order. Entities are appended to a block table record in order of ascending handle
value; in other words, the higher the handle value, the later it appears in a block table
record. When it's time to draw entities in a block table record, an iterator goes through
the block table record in append order. At each entity, the handle value is obtained and
used to query into the sortents table. If there is a match, the object ID associated with
the handle value in the sortents table is drawn. If there is no match in the sortents
table, then the entity at the iterator position is drawn in its 'natural' order. When the
draw order of entities is modified, many of the entries in the sortents table may be
modified. For example, a block table record has five entities with the following handles
(usually represented as strings representing hexadecimal numbers): 4A, 4B, 4C, 4D, 4E.
These handles appear in ascending order. When an application iterates over the entities in
a block table record in the default direction, the handle value always increases from one
entity to the next. To draw the last entity in the space first (or 'behind' the others),
five entries in the sortents table must be made, as follows: Entity ID Draw Order Handle 4E
4A 4A 4B 4B 4C 4C 4D 4D 4E The order of the entries (represented as a row in the preceding
table) is irrelevant; draw order processing ends up sorting the entries by the draw order
handle when performing the draw. In other words, in a DXF file, the table entries might
appear in the following order, but the resultant draw order is identical: Entity ID Draw
Order Handle 4C 4D 4B 4C 4E 4A 4D 4E 4A 4B As another example, the last entity in the space
is moved 'under' the next-to-last entity in the space, but the rest of the entities are
drawn in 'natural' order. In that case, the sortents table would only need two entries, as
follows: Entity ID Draw Order Handle 4E 4D 4D 4E Adding new entities to the block table
record with an implicit draw order of 'last' requires no new entry in the sortents table.
def __init__(self, id: PyDb.ObjectId, mode: PyDb.OpenMode) -> None:
AcDbSortentsTable is the persistent container for draw order information. It resides in the
extension dictionary of an associated AcDbBlockTableRecord under the key ACAD_SORTENTS.
AcDbSortentsTable contains a set of object ID/handle pairs. The object ID is that of the
entity to be drawn, and the handle is that of an entity in the block table record (usually
but not always different from the associated object ID), which represents the position in
the draw order. Entities are appended to a block table record in order of ascending handle
value; in other words, the higher the handle value, the later it appears in a block table
record. When it's time to draw entities in a block table record, an iterator goes through
the block table record in append order. At each entity, the handle value is obtained and
used to query into the sortents table. If there is a match, the object ID associated with
the handle value in the sortents table is drawn. If there is no match in the sortents
table, then the entity at the iterator position is drawn in its 'natural' order. When the
draw order of entities is modified, many of the entries in the sortents table may be
modified. For example, a block table record has five entities with the following handles
(usually represented as strings representing hexadecimal numbers): 4A, 4B, 4C, 4D, 4E.
These handles appear in ascending order. When an application iterates over the entities in
a block table record in the default direction, the handle value always increases from one
entity to the next. To draw the last entity in the space first (or 'behind' the others),
five entries in the sortents table must be made, as follows: Entity ID Draw Order Handle 4E
4A 4A 4B 4B 4C 4C 4D 4D 4E The order of the entries (represented as a row in the preceding
table) is irrelevant; draw order processing ends up sorting the entries by the draw order
handle when performing the draw. In other words, in a DXF file, the table entries might
appear in the following order, but the resultant draw order is identical: Entity ID Draw
Order Handle 4C 4D 4B 4C 4E 4A 4D 4E 4A 4B As another example, the last entity in the space
is moved 'under' the next-to-last entity in the space, but the rest of the entities are
drawn in 'natural' order. In that case, the sortents table would only need two entries, as
follows: Entity ID Draw Order Handle 4E 4D 4D 4E Adding new entities to the block table
record with an implicit draw order of 'last' requires no new entry in the sortents table.
def __init__(self, id: PyDb.ObjectId, mode: PyDb.OpenMode, erased: bool) -> None:
AcDbSortentsTable is the persistent container for draw order information. It resides in the
extension dictionary of an associated AcDbBlockTableRecord under the key ACAD_SORTENTS.
AcDbSortentsTable contains a set of object ID/handle pairs. The object ID is that of the
entity to be drawn, and the handle is that of an entity in the block table record (usually
but not always different from the associated object ID), which represents the position in
the draw order. Entities are appended to a block table record in order of ascending handle
value; in other words, the higher the handle value, the later it appears in a block table
record. When it's time to draw entities in a block table record, an iterator goes through
the block table record in append order. At each entity, the handle value is obtained and
used to query into the sortents table. If there is a match, the object ID associated with
the handle value in the sortents table is drawn. If there is no match in the sortents
table, then the entity at the iterator position is drawn in its 'natural' order. When the
draw order of entities is modified, many of the entries in the sortents table may be
modified. For example, a block table record has five entities with the following handles
(usually represented as strings representing hexadecimal numbers): 4A, 4B, 4C, 4D, 4E.
These handles appear in ascending order. When an application iterates over the entities in
a block table record in the default direction, the handle value always increases from one
entity to the next. To draw the last entity in the space first (or 'behind' the others),
five entries in the sortents table must be made, as follows: Entity ID Draw Order Handle 4E
4A 4A 4B 4B 4C 4C 4D 4D 4E The order of the entries (represented as a row in the preceding
table) is irrelevant; draw order processing ends up sorting the entries by the draw order
handle when performing the draw. In other words, in a DXF file, the table entries might
appear in the following order, but the resultant draw order is identical: Entity ID Draw
Order Handle 4C 4D 4B 4C 4E 4A 4D 4E 4A 4B As another example, the last entity in the space
is moved 'under' the next-to-last entity in the space, but the rest of the entities are
drawn in 'natural' order. In that case, the sortents table would only need two entries, as
follows: Entity ID Draw Order Handle 4E 4D 4D 4E Adding new entities to the block table
record with an implicit draw order of 'last' requires no new entry in the sortents table.
def __init__(*args) -> None:
AcDbSortentsTable is the persistent container for draw order information. It resides in the
extension dictionary of an associated AcDbBlockTableRecord under the key ACAD_SORTENTS.
AcDbSortentsTable contains a set of object ID/handle pairs. The object ID is that of the
entity to be drawn, and the handle is that of an entity in the block table record (usually
but not always different from the associated object ID), which represents the position in
the draw order. Entities are appended to a block table record in order of ascending handle
value; in other words, the higher the handle value, the later it appears in a block table
record. When it's time to draw entities in a block table record, an iterator goes through
the block table record in append order. At each entity, the handle value is obtained and
used to query into the sortents table. If there is a match, the object ID associated with
the handle value in the sortents table is drawn. If there is no match in the sortents
table, then the entity at the iterator position is drawn in its 'natural' order. When the
draw order of entities is modified, many of the entries in the sortents table may be
modified. For example, a block table record has five entities with the following handles
(usually represented as strings representing hexadecimal numbers): 4A, 4B, 4C, 4D, 4E.
These handles appear in ascending order. When an application iterates over the entities in
a block table record in the default direction, the handle value always increases from one
entity to the next. To draw the last entity in the space first (or 'behind' the others),
five entries in the sortents table must be made, as follows: Entity ID Draw Order Handle 4E
4A 4A 4B 4B 4C 4C 4D 4D 4E The order of the entries (represented as a row in the preceding
table) is irrelevant; draw order processing ends up sorting the entries by the draw order
handle when performing the draw. In other words, in a DXF file, the table entries might
appear in the following order, but the resultant draw order is identical: Entity ID Draw
Order Handle 4C 4D 4B 4C 4E 4A 4D 4E 4A 4B As another example, the last entity in the space
is moved 'under' the next-to-last entity in the space, but the rest of the entities are
drawn in 'natural' order. In that case, the sortents table would only need two entries, as
follows: Entity ID Draw Order Handle 4E 4D 4D 4E Adding new entities to the block table
record with an implicit draw order of 'last' requires no new entry in the sortents table.
def __reduce__(self) -> Any:
def blockId(self) -> ObjectId:
Returns the object ID for the associated block table record.
def cast(otherObject: PyRx.RxObject) -> SortentsTable:
def className() -> str:
def cloneFrom(otherObject: PyRx.RxObject) -> SortentsTable:
def desc() -> PyRx.RxClass:
Returns a pointer to the AcRxClass object representing the specific class, or most recent
parent class explicitly registered with ObjectARX of either the pointer type used to invoke
it or the class qualifier used with it. (Remember that when a static member function is
invoked via a pointer, the pointer type, not the object type, determines which
implementation of the function is invoked.) When working with a pointer to an object and
the proper AcRxClass object for the class of the object pointed to is desired, the
AcRxObject::isA() function should be used, since it is a virtual non-static method and is
therefore not pointer type dependent. Caching the value of the pointer returned by this
method is acceptable, provided the application knows that the AcRxClass object pointed to
by the returned pointer was created by an ObjectARX application that will not be unloaded.
def firstEntityIsDrawnBeforeSecond(self, first: PyDb.ObjectId, second: PyDb.ObjectId) -> bool:
Sets result to true if first is drawn before second. Returns eInvalidInput if any object ID
is not in the associated block.
def getFullDrawOrder(self, mask: int) -> list:
Returns an array of the entity object IDs of the block in the order in which they would be
drawn in SORTENTS-enabled contexts. The caller supplies an empty object ID array, and
disposes of it after use. When one or more bits of the honorSortentsMask parameter is set
to 1, the function tests the host database's $SORTENTS variable and, if any corresponding
bits are off, it returns the object IDs in natural database order rather than the order
specified by the sortents table. Returns eOk unless the system runs out of memory.
def getRelativeDrawOrder(self, mask: int) -> list:
Rearranges the object IDs in the input array into their current relative draw order. When
one or more bits of the honorSortentsMask parameter is set to 1, the function tests the
host database's $SORTENTS variable and, if any corresponding bits are off, it returns the
object IDs in natural database order rather than the order specified by the sortents table.
Returns eInvalidInput if any object ID is not in the associated block.
def getSortHandle(self, id: PyDb.ObjectId) -> Handle:
Given an input object ID, this function returns the AcDbHandle that indicates the draw
order. Entities with lesser handle values are drawn before/behind entities with higher
handle values. This handle, sometimes called its 'draw order sort key,' may have nothing to
do with the object ID, and may no longer even exist in the database. Its numerical value is
what is of use, not the object it points to.
def moveAbove(self, ids: Collection[PyDb.ObjectId], target: PyDb.ObjectId) -> None:
Places all the entities specified in the input object ID array above the specified target
entity. The entities being moved retain their relative draw order. Returns eInvalidInput if
any input object ID is not in the associated block, or eDuplicateKey if any object ID
appears twice in the input array.
def moveBelow(self, ids: Collection[PyDb.ObjectId], target: PyDb.ObjectId) -> None:
Places all the entities specified in the input object ID array below the specified target
entity. The entities being moved retain their relative draw order. Returns eInvalidInput if
any input object ID is not in the associated block, or eDuplicateKey if any object ID
appears twice in the input array.
def moveToBottom(self, ids: Collection[PyDb.ObjectId]) -> None:
Places all the entities specified in the input object ID array at the beginning of the draw
order. The entities being moved retain their relative draw order. Returns eInvalidInput if
any input object ID is not in the associated block, or eDuplicateKey if any object ID
appears twice in the input array.
def moveToTop(self, ids: Collection[PyDb.ObjectId]) -> None:
Places all the entities specified in the input object ID array at the ending of the draw
order. The entities being moved retain their relative draw order. Returns eInvalidInput if
any input object ID is not in the associated block, or eDuplicateKey if any object ID
appears twice in the input array.
def remove(self, id: PyDb.ObjectId) -> None:
Deprecated; do not use. Returns eInvalidInput.
def setBlockId(self, id: PyDb.ObjectId) -> None:
Sets the object ID for the associated block table record. Returns eInvalidInput if the
input object ID is invalid or is not that of a block table record.
def setRelativeDrawOrder(self, ids: Collection[PyDb.ObjectId]) -> None:
Takes the object IDs in the input array and moves them in their current associated draw
order slots so that they are drawn in the specified order. If you wish to move or
consolidate the draw order slots of these object IDs, use the appropriate movexxx() member
function to do so, either before or after calling this member. Returns eInvalidInput if any
object ID is not in the associated block.
def sortAs(self, id: PyDb.ObjectId) -> tuple:
Given an input object ID, this function returns the AcDbHandle that indicates the draw
order. Entities with lower handle values are drawn before/behind entities with higher
handle values. This handle, sometimes called its 'draw order sort key' may have nothing to
do with the object ID, and may no longer even exist in the database. Its numerical value is
what is of use, not the object it points to.
def swapOrder(self, left: PyDb.ObjectId, right: PyDb.ObjectId) -> None:
Swaps the draw order positions of the entities. Returns eInvalidInput if either object ID
is not in the associated block.
class SpatialFilter Class
def __init__(self) -> None:
This class defines an extruded volume based on a 2D boundary definition, local coordinate
system, and the front and back clipping planes.
def __init__(self, id: PyDb.ObjectId) -> None:
This class defines an extruded volume based on a 2D boundary definition, local coordinate
system, and the front and back clipping planes.
def __init__(self, id: PyDb.ObjectId, mode: PyDb.OpenMode) -> None:
This class defines an extruded volume based on a 2D boundary definition, local coordinate
system, and the front and back clipping planes.
def __init__(self, id: PyDb.ObjectId, mode: PyDb.OpenMode, erased: bool) -> None:
This class defines an extruded volume based on a 2D boundary definition, local coordinate
system, and the front and back clipping planes.
def __init__(*args) -> None:
This class defines an extruded volume based on a 2D boundary definition, local coordinate
system, and the front and back clipping planes.
def __reduce__(self) -> Any:
def cast(otherObject: PyRx.RxObject) -> SpatialFilter:
def className() -> str:
def clipVolumeIntersectsExtents(self, val: PyDb.Extents) -> bool:
This function is used to determine whether an object with extents exts intersects this
AcDbSpatialFilter object's clipping volume. Returns Adesk::kTrue if exts intersects this
filter's clipping volume. Otherwise, returns Adesk::kFalse.
def cloneFrom(otherObject: PyRx.RxObject) -> SpatialFilter:
def desc() -> PyRx.RxClass:
Returns a pointer to the AcRxClass object representing the specific class, or most recent
parent class explicitly registered with ObjectARX of either the pointer type used to invoke
it or the class qualifier used with it. (Remember that when a static member function is
invoked via a pointer, the pointer type, not the object type, determines which
implementation of the function is invoked.) When working with a pointer to an object and
the proper AcRxClass object for the class of the object pointed to is desired, the
AcRxObject::isA() function should be used, since it is a virtual non-static method and is
therefore not pointer type dependent. Caching the value of the pointer returned by this
method is acceptable, provided the application knows that the AcRxClass object pointed to
by the returned pointer was created by an ObjectARX application that will not be unloaded.
def getClipSpaceToWCSMatrix(self) -> PyGe.Matrix3d:
This method sets mat to be the transformation matrix to transform the clip boundary points
from their coordinate system (whatever it may be) to WCS. This matrix should be applied to
3D points whose X and Y values come from the 2D points obtained from getDefinition() and a
Z value of 0.0. For example: AcGePoint2dArray pts;AcGeVector3d normal;double elevation,
frontclip, backclip;Adesk::Boolean enabled;pFilter->getDefinition(pts, normal,
elevation,frontclip, backclip, enabled);AcGeMatrix3d
clipToWCS;pFilter->getClipSpaceToWCSMatrix(clipToWCS);AcGePoint3d pt(pts[0].x, pts[0].y,
0.0);pt.transformBy(clipToWCS); Returns a reference to the matrix argument passed in.
def getDefinition(self) -> tuple:
This function is used to get the definition of the AcDbSpatialFilter object. Returns
Acad::eOk if successful.
def getOriginalInverseBlockXform(self) -> PyGe.Matrix3d:
This method sets mat to the inverse of the block transform for the associated
AcDbBlockReference when the Filter was last set. Returns a reference to the matrix argument
passed in.
def getVolume(self) -> tuple[PyGe.Point3d, PyGe.Point3d, PyGe.Vector3d, PyGe.Vector3d]:
Transforms the AcDbSpatialFilter object's clip boundary definition into the coordinate
space of the associated block or xref, and sets output parameters fromPt, toPt, upDir, and
viewField to their resulting transformed values. Returns Acad::eNullObjectPointer if the
clip boundary is not defined, or an appropriate Acad::ErrorStatus if the block or xref
cannot be opened for read. Otherwise, this function returns Acad::eOk.
def hasPerspectiveCamera(self) -> bool:
Returns Adesk::kTrue if a perspective camera is currently defined for this
AcDbSpatialFilter object. Otherwise, this function returns Adesk::kFalse. Use the
AcDbSpatialFilter::setPerspectiveCamera function to define a perspective camera.
def indexClass(self) -> PyRx.RxClass:
This function is used in the init() method of the AcDbCompositeFilteredBlockIterator. For
example, it is used internally when filtering is in effect during the regeneration of the
drawing for clipped xrefs to establish the index iterator definitions. Returns the class
descriptor for the AcDbIndex for this filter
def isInverted(self) -> bool:
Returns true if the filter's inverted flag is set.
def queryBounds(self, ref: PyDb.BlockReference) -> Extents:
This function is used to get the boundary area of this AcDbSpatialFilter object. This
function has no return value.
def setDefinition(self, pnt2d: list[PyGe.Point2d], normal: PyGe.Vector3d, elev: float, frontclip: float, backclip: float, enabled: bool) -> None:
This function is used to set the definition of the AcDbSpatialFilter object. The points
described in the pts argument must be expressed in the ECS of the block or xref definition.
Returns Acad::eOk if successful.
def setInverted(self, val: bool) -> None:
This method is used to set or clear the filter's inverted flag.
def setPerspectiveCamera(self, val: PyGe.Point3d) -> None:
Sets the perspective camera position to the location specified by fromPt.
class Spline Class
def __init__(self) -> None:
This class implements the AutoCAD SPLINE entity. Objects of the AcDbSpline class use an
embedded gelib object to maintain the actual spline information. The spline itself may
either be a simple curve fit (within a specified tolerance which may be 0) through a set of
'fit points,' or it may be a NURBS spline (that is, a set of control points, knots, and
weights used to define the spline path). Internally, a curve-fit spline still has NURBS
data; however the reverse is not true. The following books are a good place to start to get
a basic understanding of spline curves: Curves and Surfaces for CAGD by Gerald
FarinMathematical Elements for Computer Graphics by David Rogers and Alan AdamsAn
Introduction To Splines For Use In Computer Graphics & Geometric Modeling by Richard H.
Bartels, John C. Beatty, and Brian A Barsky
def __init__(self, id: PyDb.ObjectId) -> None:
This class implements the AutoCAD SPLINE entity. Objects of the AcDbSpline class use an
embedded gelib object to maintain the actual spline information. The spline itself may
either be a simple curve fit (within a specified tolerance which may be 0) through a set of
'fit points,' or it may be a NURBS spline (that is, a set of control points, knots, and
weights used to define the spline path). Internally, a curve-fit spline still has NURBS
data; however the reverse is not true. The following books are a good place to start to get
a basic understanding of spline curves: Curves and Surfaces for CAGD by Gerald
FarinMathematical Elements for Computer Graphics by David Rogers and Alan AdamsAn
Introduction To Splines For Use In Computer Graphics & Geometric Modeling by Richard H.
Bartels, John C. Beatty, and Brian A Barsky
def __init__(self, id: PyDb.ObjectId, mode: PyDb.OpenMode) -> None:
This class implements the AutoCAD SPLINE entity. Objects of the AcDbSpline class use an
embedded gelib object to maintain the actual spline information. The spline itself may
either be a simple curve fit (within a specified tolerance which may be 0) through a set of
'fit points,' or it may be a NURBS spline (that is, a set of control points, knots, and
weights used to define the spline path). Internally, a curve-fit spline still has NURBS
data; however the reverse is not true. The following books are a good place to start to get
a basic understanding of spline curves: Curves and Surfaces for CAGD by Gerald
FarinMathematical Elements for Computer Graphics by David Rogers and Alan AdamsAn
Introduction To Splines For Use In Computer Graphics & Geometric Modeling by Richard H.
Bartels, John C. Beatty, and Brian A Barsky
def __init__(self, id: PyDb.ObjectId, mode: PyDb.OpenMode, erased: bool) -> None:
This class implements the AutoCAD SPLINE entity. Objects of the AcDbSpline class use an
embedded gelib object to maintain the actual spline information. The spline itself may
either be a simple curve fit (within a specified tolerance which may be 0) through a set of
'fit points,' or it may be a NURBS spline (that is, a set of control points, knots, and
weights used to define the spline path). Internally, a curve-fit spline still has NURBS
data; however the reverse is not true. The following books are a good place to start to get
a basic understanding of spline curves: Curves and Surfaces for CAGD by Gerald
FarinMathematical Elements for Computer Graphics by David Rogers and Alan AdamsAn
Introduction To Splines For Use In Computer Graphics & Geometric Modeling by Richard H.
Bartels, John C. Beatty, and Brian A Barsky
def __init__(self, idfitPoints: list[PyGe.Point3d]) -> None:
This class implements the AutoCAD SPLINE entity. Objects of the AcDbSpline class use an
embedded gelib object to maintain the actual spline information. The spline itself may
either be a simple curve fit (within a specified tolerance which may be 0) through a set of
'fit points,' or it may be a NURBS spline (that is, a set of control points, knots, and
weights used to define the spline path). Internally, a curve-fit spline still has NURBS
data; however the reverse is not true. The following books are a good place to start to get
a basic understanding of spline curves: Curves and Surfaces for CAGD by Gerald
FarinMathematical Elements for Computer Graphics by David Rogers and Alan AdamsAn
Introduction To Splines For Use In Computer Graphics & Geometric Modeling by Richard H.
Bartels, John C. Beatty, and Brian A Barsky
def __init__(self, idfitPoints: list[PyGe.Point3d], order: int, fitTolerance: float) -> None:
This class implements the AutoCAD SPLINE entity. Objects of the AcDbSpline class use an
embedded gelib object to maintain the actual spline information. The spline itself may
either be a simple curve fit (within a specified tolerance which may be 0) through a set of
'fit points,' or it may be a NURBS spline (that is, a set of control points, knots, and
weights used to define the spline path). Internally, a curve-fit spline still has NURBS
data; however the reverse is not true. The following books are a good place to start to get
a basic understanding of spline curves: Curves and Surfaces for CAGD by Gerald
FarinMathematical Elements for Computer Graphics by David Rogers and Alan AdamsAn
Introduction To Splines For Use In Computer Graphics & Geometric Modeling by Richard H.
Bartels, John C. Beatty, and Brian A Barsky
def __init__(self, idfitPoints: list[PyGe.Point3d], startTangent: PyGe.Vector3d, endTangent: PyGe.Vector3d) -> None:
This class implements the AutoCAD SPLINE entity. Objects of the AcDbSpline class use an
embedded gelib object to maintain the actual spline information. The spline itself may
either be a simple curve fit (within a specified tolerance which may be 0) through a set of
'fit points,' or it may be a NURBS spline (that is, a set of control points, knots, and
weights used to define the spline path). Internally, a curve-fit spline still has NURBS
data; however the reverse is not true. The following books are a good place to start to get
a basic understanding of spline curves: Curves and Surfaces for CAGD by Gerald
FarinMathematical Elements for Computer Graphics by David Rogers and Alan AdamsAn
Introduction To Splines For Use In Computer Graphics & Geometric Modeling by Richard H.
Bartels, John C. Beatty, and Brian A Barsky
def __init__(self, idfitPoints: list[PyGe.Point3d], startTangent: PyGe.Vector3d, endTangent: PyGe.Vector3d, order: int, fitTolerance: float) -> None:
This class implements the AutoCAD SPLINE entity. Objects of the AcDbSpline class use an
embedded gelib object to maintain the actual spline information. The spline itself may
either be a simple curve fit (within a specified tolerance which may be 0) through a set of
'fit points,' or it may be a NURBS spline (that is, a set of control points, knots, and
weights used to define the spline path). Internally, a curve-fit spline still has NURBS
data; however the reverse is not true. The following books are a good place to start to get
a basic understanding of spline curves: Curves and Surfaces for CAGD by Gerald
FarinMathematical Elements for Computer Graphics by David Rogers and Alan AdamsAn
Introduction To Splines For Use In Computer Graphics & Geometric Modeling by Richard H.
Bartels, John C. Beatty, and Brian A Barsky
def __init__(self, idfitPoints: list[PyGe.Point3d], periodic: bool) -> None:
This class implements the AutoCAD SPLINE entity. Objects of the AcDbSpline class use an
embedded gelib object to maintain the actual spline information. The spline itself may
either be a simple curve fit (within a specified tolerance which may be 0) through a set of
'fit points,' or it may be a NURBS spline (that is, a set of control points, knots, and
weights used to define the spline path). Internally, a curve-fit spline still has NURBS
data; however the reverse is not true. The following books are a good place to start to get
a basic understanding of spline curves: Curves and Surfaces for CAGD by Gerald
FarinMathematical Elements for Computer Graphics by David Rogers and Alan AdamsAn
Introduction To Splines For Use In Computer Graphics & Geometric Modeling by Richard H.
Bartels, John C. Beatty, and Brian A Barsky
def __init__(self, idfitPoints: list[PyGe.Point3d], periodic: bool, knotParam: PyGe.KnotParameterization, order: int, fitTolerance: float) -> None:
This class implements the AutoCAD SPLINE entity. Objects of the AcDbSpline class use an
embedded gelib object to maintain the actual spline information. The spline itself may
either be a simple curve fit (within a specified tolerance which may be 0) through a set of
'fit points,' or it may be a NURBS spline (that is, a set of control points, knots, and
weights used to define the spline path). Internally, a curve-fit spline still has NURBS
data; however the reverse is not true. The following books are a good place to start to get
a basic understanding of spline curves: Curves and Surfaces for CAGD by Gerald
FarinMathematical Elements for Computer Graphics by David Rogers and Alan AdamsAn
Introduction To Splines For Use In Computer Graphics & Geometric Modeling by Richard H.
Bartels, John C. Beatty, and Brian A Barsky
def __init__(self, idfitPoints: list[PyGe.Point3d], startTangent: PyGe.Vector3d, endTangent: PyGe.Vector3d, knotParam: PyGe.KnotParameterization) -> None:
This class implements the AutoCAD SPLINE entity. Objects of the AcDbSpline class use an
embedded gelib object to maintain the actual spline information. The spline itself may
either be a simple curve fit (within a specified tolerance which may be 0) through a set of
'fit points,' or it may be a NURBS spline (that is, a set of control points, knots, and
weights used to define the spline path). Internally, a curve-fit spline still has NURBS
data; however the reverse is not true. The following books are a good place to start to get
a basic understanding of spline curves: Curves and Surfaces for CAGD by Gerald
FarinMathematical Elements for Computer Graphics by David Rogers and Alan AdamsAn
Introduction To Splines For Use In Computer Graphics & Geometric Modeling by Richard H.
Bartels, John C. Beatty, and Brian A Barsky
def __init__(self, idfitPoints: list[PyGe.Point3d], startTangent: PyGe.Vector3d, endTangent: PyGe.Vector3d, knotParam: PyGe.KnotParameterization, order: int, fitTolerance: float) -> None:
This class implements the AutoCAD SPLINE entity. Objects of the AcDbSpline class use an
embedded gelib object to maintain the actual spline information. The spline itself may
either be a simple curve fit (within a specified tolerance which may be 0) through a set of
'fit points,' or it may be a NURBS spline (that is, a set of control points, knots, and
weights used to define the spline path). Internally, a curve-fit spline still has NURBS
data; however the reverse is not true. The following books are a good place to start to get
a basic understanding of spline curves: Curves and Surfaces for CAGD by Gerald
FarinMathematical Elements for Computer Graphics by David Rogers and Alan AdamsAn
Introduction To Splines For Use In Computer Graphics & Geometric Modeling by Richard H.
Bartels, John C. Beatty, and Brian A Barsky
def __init__(self, degree: int, rational: bool, closed: bool, periodic: bool, controlPoints: list[PyGe.Point3d], knots: list[float], weights: list[float]) -> None:
This class implements the AutoCAD SPLINE entity. Objects of the AcDbSpline class use an
embedded gelib object to maintain the actual spline information. The spline itself may
either be a simple curve fit (within a specified tolerance which may be 0) through a set of
'fit points,' or it may be a NURBS spline (that is, a set of control points, knots, and
weights used to define the spline path). Internally, a curve-fit spline still has NURBS
data; however the reverse is not true. The following books are a good place to start to get
a basic understanding of spline curves: Curves and Surfaces for CAGD by Gerald
FarinMathematical Elements for Computer Graphics by David Rogers and Alan AdamsAn
Introduction To Splines For Use In Computer Graphics & Geometric Modeling by Richard H.
Bartels, John C. Beatty, and Brian A Barsky
def __init__(self, degree: int, rational: bool, closed: bool, periodic: bool, controlPoints: list[PyGe.Point3d], knots: list[float], weights: list[float], controlPtTol: float, knotTol: float) -> None:
This class implements the AutoCAD SPLINE entity. Objects of the AcDbSpline class use an
embedded gelib object to maintain the actual spline information. The spline itself may
either be a simple curve fit (within a specified tolerance which may be 0) through a set of
'fit points,' or it may be a NURBS spline (that is, a set of control points, knots, and
weights used to define the spline path). Internally, a curve-fit spline still has NURBS
data; however the reverse is not true. The following books are a good place to start to get
a basic understanding of spline curves: Curves and Surfaces for CAGD by Gerald
FarinMathematical Elements for Computer Graphics by David Rogers and Alan AdamsAn
Introduction To Splines For Use In Computer Graphics & Geometric Modeling by Richard H.
Bartels, John C. Beatty, and Brian A Barsky
def __init__(self, center: PyGe.Point3d, unitNormal: PyGe.Vector3d, majorAxis: PyGe.Vector3d, radiusRatioL: float) -> None:
This class implements the AutoCAD SPLINE entity. Objects of the AcDbSpline class use an
embedded gelib object to maintain the actual spline information. The spline itself may
either be a simple curve fit (within a specified tolerance which may be 0) through a set of
'fit points,' or it may be a NURBS spline (that is, a set of control points, knots, and
weights used to define the spline path). Internally, a curve-fit spline still has NURBS
data; however the reverse is not true. The following books are a good place to start to get
a basic understanding of spline curves: Curves and Surfaces for CAGD by Gerald
FarinMathematical Elements for Computer Graphics by David Rogers and Alan AdamsAn
Introduction To Splines For Use In Computer Graphics & Geometric Modeling by Richard H.
Bartels, John C. Beatty, and Brian A Barsky
def __init__(self, center: PyGe.Point3d, unitNormal: PyGe.Vector3d, majorAxis: PyGe.Vector3d, radiusRatioL: float, startAngle: float, endAngle: float) -> None:
This class implements the AutoCAD SPLINE entity. Objects of the AcDbSpline class use an
embedded gelib object to maintain the actual spline information. The spline itself may
either be a simple curve fit (within a specified tolerance which may be 0) through a set of
'fit points,' or it may be a NURBS spline (that is, a set of control points, knots, and
weights used to define the spline path). Internally, a curve-fit spline still has NURBS
data; however the reverse is not true. The following books are a good place to start to get
a basic understanding of spline curves: Curves and Surfaces for CAGD by Gerald
FarinMathematical Elements for Computer Graphics by David Rogers and Alan AdamsAn
Introduction To Splines For Use In Computer Graphics & Geometric Modeling by Richard H.
Bartels, John C. Beatty, and Brian A Barsky
def __init__(*args) -> None:
This class implements the AutoCAD SPLINE entity. Objects of the AcDbSpline class use an
embedded gelib object to maintain the actual spline information. The spline itself may
either be a simple curve fit (within a specified tolerance which may be 0) through a set of
'fit points,' or it may be a NURBS spline (that is, a set of control points, knots, and
weights used to define the spline path). Internally, a curve-fit spline still has NURBS
data; however the reverse is not true. The following books are a good place to start to get
a basic understanding of spline curves: Curves and Surfaces for CAGD by Gerald
FarinMathematical Elements for Computer Graphics by David Rogers and Alan AdamsAn
Introduction To Splines For Use In Computer Graphics & Geometric Modeling by Richard H.
Bartels, John C. Beatty, and Brian A Barsky
def __reduce__(self) -> Any:
def cast(otherObject: PyRx.RxObject) -> Spline:
def className() -> str:
def cloneFrom(otherObject: PyRx.RxObject) -> Spline:
def degree(self) -> int:
Returns the degree of the spline's polynomial representation. The value is in the range 1
to 25.
def desc() -> PyRx.RxClass:
Returns a pointer to the AcRxClass object representing the specific class, or most recent
parent class explicitly registered with ObjectARX of either the pointer type used to invoke
it or the class qualifier used with it. (Remember that when a static member function is
invoked via a pointer, the pointer type, not the object type, determines which
implementation of the function is invoked.) When working with a pointer to an object and
the proper AcRxClass object for the class of the object pointed to is desired, the
AcRxObject::isA() function should be used, since it is a virtual non-static method and is
therefore not pointer type dependent. Caching the value of the pointer returned by this
method is acceptable, provided the application knows that the AcRxClass object pointed to
by the returned pointer was created by an ObjectARX application that will not be unloaded.
def elevateDegree(self, val: int) -> None:
Increases the degree (which is the same as the order -1) of the spline to newDegree. Once
incremented it cannot be decremented. The valid range is between (current degree) and 25.
def fitTolerance(self) -> float:
Returns the tolerance value used for curve fitting. This is the maximum distance (in
drawing units) that the spline curve is allowed to deviate from the fit points.
def getControlPointAt(self, idx: int) -> PyGe.Point3d:
Returns, via point (in WCS coordinates), the value of the control point at position index
in the list of control points. If index is negative or more than the number of control
points in the spline, then point is set to the last control point. Returns Acad::eOk if
successful, otherwise returns Acad::eGeneralModelingFailure.
def getFitData(self) -> tuple:
This function has been deprecated and will be removed in a future release.
def getFitDataKnot(self) -> tuple:
def getFitPointAt(self, idx: int) -> PyGe.Point3d:
Returns with point set to the value of the fit point at position index. Returns Acad::eOk
if successful, otherwise Acad::eGeneralModelingFailure is returned (for example, if the
spline doesn't have fit data or index is greater than the number of fit points in the
spline).
def getFitTangents(self) -> tuple[PyGe.Vector3d, PyGe.Vector3d]:
Returns with startTangent and endTangent set to the start point and end point tangent
vectors in WCS coordinates. Returns Acad::eOk is successful, otherwise
Acad::eGeneralModelingFailure is returned (for example, if the spline has no fit data).
def getNurbsData(self) -> tuple:
Returns the NURBS data of the spline via degree, rational, closed, periodic, controlPoints,
knots, weights, controlPtTol, and knotTol. Whether or not the spline has fit data, it
always has NURBS data if it has an underlying gelib object within it (that is, as long as
AcDbSpline::isNull() == Adesk::kFalse).
def getOffsetCurvesGivenPlaneNormal(self, normal: PyGe.Vector3d, dist: float) -> list[PyDb.Curve]:
This function creates one or more entities that, together, make up the result of offsetting
the curve by the distance offsetDist in the plane with normal vector normal. For many
curves, the result will be a single new curve, which may not be of the same class as the
original curve. For example, offsetting an AcDbEllipse results in an AcDbSpline, since the
result of offsetting an ellipse does not fit the equation of an ellipse. However, in some
cases it might be necessary for the offset result to be several curves. To allow for this
possibility, a dynamic array of void pointers is used to hold pointers to the resulting
entity or entities. To use this array of pointers, the calling application must cast the
pointer(s) to the appropriate object type(s). If only a specific entity type or set of
types are to be handled, then using the cast method of the class(es) desired to see if each
pointer can be safely cast to that object type will work. If the actual object type is
desired, then each object's isA() method may be used to get a pointer to the object's
AcRxClass object, which has a name() method to get the classname of the object. If the
offsetDist value is negative this is usually interpreted as being an offset to make a
smaller curve (that is, for an arc it would offset to a radius that is offsetDist less than
the starting curve's radius). Or, if smaller has no meaning, then a negative offsetDist may
be interpreted as an offset in the direction of smaller X,Y,Z WCS coordinates. However,
this is not enforced, so custom entities can interpret the sign of the offsetDist value
however they wish. The entities returned in the offsetCurves arrays are dynamically
allocated, but have not been added to an AcDbDatabase yet. So, the application that calls
this function is responsible for their memory. If they are subsequently appended to a
database, then the database takes over responsibility for their memory. Otherwise, the
application is responsible for deleting them when they are no longer needed. Returns
Acad::eOk if offsetting is successfully completed. If the offset distance is invalid, or if
normal is a zero length vector or the entity is linear and normal is not perpendicular with
the entity, then Acad::eInvalidInput is returned. Other ErrorStatus return values are
implementation dependent. The default implementation returns Acad::eNotImplemented.
def hasFitData(self) -> bool:
This function returns Adesk::kTrue if and only if the spline has fit data associated with
it.
def insertControlPointAt(self, knotParam: int, ctrlPt: PyGe.Point3d) -> None:
Add a control point on the spline at the given knot parameter. If the spline is
non-rational, the weight value will be ingored.
def insertControlPointAt(self, knotParam: int, ctrlPt: PyGe.Point3d, weight: float) -> None:
Add a control point on the spline at the given knot parameter. If the spline is
non-rational, the weight value will be ingored.
def insertControlPointAt(*args) -> None:
Add a control point on the spline at the given knot parameter. If the spline is
non-rational, the weight value will be ingored.
def insertFitPointAt(self, idx: int, pnt: PyGe.Point3d) -> None:
Adds point to the list of fit points and refits the spline. point is added at the index
position in the fit points list. If index is negative, then point is added at the beginning
of the spline. If index is greater than the number of fit points in the spline, then point
is added at the end of the spline. Returns Acad::eOk if successful, otherwise returns
Acad::eGeneralModelingFailure.
def insertKnot(self, val: float) -> None:
Inserts a new knot into the spline at the location on the spline defined by param. The
param value must be within the spline's parameter range. To obtain the spline's parameter
range, use the AcDbSpline::getNurbsData() method to obtain an array of the current knot
values. The first knot value is the spline's start parameter value, while the last knot is
the spline's end parameter. Returns Acad::eOk if successful, otherwise returns
Acad::eGeneralModelingFailure.
def isNull(self) -> bool:
Returns Adesk::kTrue if this AcDbSpline object does not have an gelib object within it.
def isRational(self) -> bool:
This function returns Adesk::kTrue if and only if the spline is rational.
def numControlPoints(self) -> int:
Returns the number of control points in the spline.
def numFitPoints(self) -> int:
Returns the number of fit points associated with the spline. WarningDo not call this
function unless the spline has fit data (that is, AcDbSpline::hasFitData() ==
Adesk::kTrue),
def purgeFitData(self) -> None:
Purges the fit data if the spline is a fitted spline. Once the fit data has been removed,
the spline uses its control point or NURBS data. Returns Acad::eOk if successful. Otherwise
Acad::eGeneralModelingFailure is returned. (In ARX SDK versions 1.0 and 1.1, calling this
function on a spline with no fit data triggers an assert in non production versions of
AutoCAD. This assert can be safely ignored.)
def rebuild(self, degree: int, numPnts: int) -> None:
Rebuild the spline with the degree and number of control points. This will change the shape
of the spline. The degree can't be higher than 11.
def removeControlPointAt(self, val: int) -> None:
Remove a control point at the given index
def removeFitPointAt(self, idx: int) -> None:
Removes the fit point at index in the list of fit points of the spline and refits the
spline. There must be at least three fit points in the spline for this function to succeed.
Returns Acad::eOk if successful. If index is negative or is greater than the number of fit
points in the spline, then Acad::eInvalidInput is returned. If the current number of fit
points is only two or gelib is not successful in refitting the spline, then
Acad::eGeneralModelingFailure is returned.
def setControlPointAt(self, idx: int, pnt: PyGe.Point3d) -> None:
Sets point (in WCS coordinates) to be the control point at the index position in the
control points list replacing the point value that was previously at index position.
Returns Acad::eOk if successful, otherwise Acad::eGeneralModelingFailure is returned.
def setFitData(self, fitPoints: list[PyGe.Point3d], degree: int, fitTolerance: float, startTan: PyGe.Vector3d, endTan: PyGe.Vector3d) -> None:
This function has been deprecated and will be removed in a future release.
def setFitDataKnot(self, idfitPoints: list[PyGe.Point3d], periodic: bool, knotParam: PyGe.KnotParameterization) -> None:
def setFitDataKnot(self, idfitPoints: list[PyGe.Point3d], periodic: bool, knotParam: PyGe.KnotParameterization, degree: int, fitTolerance: float) -> None:
def setFitDataKnot(self, idfitPoints: list[PyGe.Point3d], startTangent: PyGe.Vector3d, endTangent: PyGe.Vector3d, knotParam: PyGe.KnotParameterization) -> None:
def setFitDataKnot(self, idfitPoints: list[PyGe.Point3d], startTangent: PyGe.Vector3d, endTangent: PyGe.Vector3d, knotParam: PyGe.KnotParameterization, order: int, fitTolerance: float) -> None:
def setFitDataKnot(*args) -> None:
def setFitPointAt(self, idx: int, pnt: PyGe.Point3d) -> None:
Sets point (in WCS coordinates) to be the fit point at the index position in the fit points
list (replacing the point value previously at index) and then refits the spline. Returns
Acad::eOk if successful, otherwise returns Acad::eGeneralModelingFailure.
def setFitTangents(self, start: PyGe.Vector3d, end: PyGe.Vector3d) -> None:
Sets the start end tangents of spline to be startTangent and endTangent respectively and
refits the spline. Returns Acad::eOk if successful, otherwise Acad::eGeneralModelingFailure
is returned.
def setFitTol(self, val: float) -> None:
Sets tol to be the new fit point tolerance for the spline and then refits the spline curve.
If tol is 0, then the spline passes through all the fit points. Returns Acad::eOk if
successful, otherwise Acad::eGeneralModelingFailure is returned.
def setNurbsData(self, degree: int, rational: bool, closed: bool, periodic: bool, controlPoints: list[PyGe.Point3d], knots: list[float], weights: list[float]) -> None:
This function replaces any existing spline data with the data passed in via degree,
rational, closed, periodic, controlPoints, knots, weights, controlPtTol and knotTol. If the
spline is to be rational, then rational should be Adesk::kTrue. If the spline is to be
closed (that is, a closed loop), then closed should be Adesk::kTrue. If the spline is to be
periodic, then periodic should be Adesk::kTrue. This parameter should only be set to
Adesk::kTrue if the spline is closed. A periodic spline is a spline with period T such that
the point at parameter value t + T is the same as the point at parameter value t for any
value of t. The weights array is only used when rational == Adesk::kTrue. If used, it must
have the same number of entries as the controlPoints array. All weight values must be
greater than 0.0. If isPeriodic = Adesk::kFalse then length of knot vector must be greater
than length of the control array by degree+1. If isPeriodic = Adesk::kTrue then: the length
of knot vector must be greater than length of the control array by 1. The first and the
last control points must NOT be identical. The knotTol value is used to determine which
knot values are to be treated as the same. If the difference between two knot values is
less than knotTol, then the two values are treated as the same (and the first of the two
values will be used). The controlPtTol value is used to determine if two control points are
to be treated as the same point. If the distance between two control points is less than
controlPtTol, then those two control points are treated as the same point. If the first and
last control points are within controlPtTol of each other, the spline is closed regardless
of the closed value. Returns Acad::eOk if successful. If gelib is unable to create a
spline, then Acad::eGeneralModelingFailure is returned.
def setNurbsData(self, degree: int, rational: bool, closed: bool, periodic: bool, controlPoints: list[PyGe.Point3d], knots: list[float], weights: list[float], controlPtTol: float, knotTol: float) -> None:
This function replaces any existing spline data with the data passed in via degree,
rational, closed, periodic, controlPoints, knots, weights, controlPtTol and knotTol. If the
spline is to be rational, then rational should be Adesk::kTrue. If the spline is to be
closed (that is, a closed loop), then closed should be Adesk::kTrue. If the spline is to be
periodic, then periodic should be Adesk::kTrue. This parameter should only be set to
Adesk::kTrue if the spline is closed. A periodic spline is a spline with period T such that
the point at parameter value t + T is the same as the point at parameter value t for any
value of t. The weights array is only used when rational == Adesk::kTrue. If used, it must
have the same number of entries as the controlPoints array. All weight values must be
greater than 0.0. If isPeriodic = Adesk::kFalse then length of knot vector must be greater
than length of the control array by degree+1. If isPeriodic = Adesk::kTrue then: the length
of knot vector must be greater than length of the control array by 1. The first and the
last control points must NOT be identical. The knotTol value is used to determine which
knot values are to be treated as the same. If the difference between two knot values is
less than knotTol, then the two values are treated as the same (and the first of the two
values will be used). The controlPtTol value is used to determine if two control points are
to be treated as the same point. If the distance between two control points is less than
controlPtTol, then those two control points are treated as the same point. If the first and
last control points are within controlPtTol of each other, the spline is closed regardless
of the closed value. Returns Acad::eOk if successful. If gelib is unable to create a
spline, then Acad::eGeneralModelingFailure is returned.
def setNurbsData(*args) -> None:
This function replaces any existing spline data with the data passed in via degree,
rational, closed, periodic, controlPoints, knots, weights, controlPtTol and knotTol. If the
spline is to be rational, then rational should be Adesk::kTrue. If the spline is to be
closed (that is, a closed loop), then closed should be Adesk::kTrue. If the spline is to be
periodic, then periodic should be Adesk::kTrue. This parameter should only be set to
Adesk::kTrue if the spline is closed. A periodic spline is a spline with period T such that
the point at parameter value t + T is the same as the point at parameter value t for any
value of t. The weights array is only used when rational == Adesk::kTrue. If used, it must
have the same number of entries as the controlPoints array. All weight values must be
greater than 0.0. If isPeriodic = Adesk::kFalse then length of knot vector must be greater
than length of the control array by degree+1. If isPeriodic = Adesk::kTrue then: the length
of knot vector must be greater than length of the control array by 1. The first and the
last control points must NOT be identical. The knotTol value is used to determine which
knot values are to be treated as the same. If the difference between two knot values is
less than knotTol, then the two values are treated as the same (and the first of the two
values will be used). The controlPtTol value is used to determine if two control points are
to be treated as the same point. If the distance between two control points is less than
controlPtTol, then those two control points are treated as the same point. If the first and
last control points are within controlPtTol of each other, the spline is closed regardless
of the closed value. Returns Acad::eOk if successful. If gelib is unable to create a
spline, then Acad::eGeneralModelingFailure is returned.
def setType(self, val: PyDb.SplineType) -> None:
Change the spline's type. It will impact how the spline is represented -- either by fit
points or control points.
def toPolyline(self) -> Polyline:
Generates a polyline to approximate a spline.
def type(self) -> SplineType:
Returns the type of the spline -- either created by fit points or by control points.
def updateFitData(self) -> None:
Updates the fit data of the spline. If the spline's fit tolerance == 0, then the spline is
refitted; otherwise the fit data is purged (in which case the control point or NURBS data
will be used by the spline). Returns Acad::eOk if successful, otherwise returns
Acad::eGeneralModelingFailure.
def weightAt(self, val: int) -> float:
Returns the weight of the control point at index. Weights can only exist for rational
splines, so if the spline is not rational, -1 is returned. If index is negative or greater
than the number of control points, then 1 is returned.
class SplineType Class
kFitPoints: ClassVar[Self]
kControlPoints: ClassVar[Self]
class StandardScaleType Class
kScaleToFit: ClassVar[Self]
kCustomScale: ClassVar[Self]
k1_1: ClassVar[Self]
k1_2: ClassVar[Self]
k1_4: ClassVar[Self]
k1_5: ClassVar[Self]
k1_8: ClassVar[Self]
k1_10: ClassVar[Self]
k1_16: ClassVar[Self]
k1_20: ClassVar[Self]
k1_30: ClassVar[Self]
k1_40: ClassVar[Self]
k1_50: ClassVar[Self]
k1_100: ClassVar[Self]
k2_1: ClassVar[Self]
k4_1: ClassVar[Self]
k8_1: ClassVar[Self]
k10_1: ClassVar[Self]
k100_1: ClassVar[Self]
k1_128in_1ft: ClassVar[Self]
k1_64in_1ft: ClassVar[Self]
k1_32in_1ft: ClassVar[Self]
k1_16in_1ft: ClassVar[Self]
k3_32in_1ft: ClassVar[Self]
k1_8in_1ft: ClassVar[Self]
k3_16in_1ft: ClassVar[Self]
k1_4in_1ft: ClassVar[Self]
k3_8in_1ft: ClassVar[Self]
k1_2in_1ft: ClassVar[Self]
k3_4in_1ft: ClassVar[Self]
k1in_1ft: ClassVar[Self]
k1and1_2in_1ft: ClassVar[Self]
k3in_1ft: ClassVar[Self]
k6in_1ft: ClassVar[Self]
k1ft_1ft: ClassVar[Self]
class StdScaleType Class
kScaleToFit: ClassVar[Self]
k1_128in_1ft: ClassVar[Self]
k1_64in_1ft: ClassVar[Self]
k1_32in_1ft: ClassVar[Self]
k1_16in_1ft: ClassVar[Self]
k3_32in_1ft: ClassVar[Self]
k1_8in_1ft: ClassVar[Self]
k3_16in_1ft: ClassVar[Self]
k1_4in_1ft: ClassVar[Self]
k3_8in_1ft: ClassVar[Self]
k1_2in_1ft: ClassVar[Self]
k3_4in_1ft: ClassVar[Self]
k1in_1ft: ClassVar[Self]
k3in_1ft: ClassVar[Self]
k6in_1ft: ClassVar[Self]
k1ft_1ft: ClassVar[Self]
k1_1: ClassVar[Self]
k1_2: ClassVar[Self]
k1_4: ClassVar[Self]
k1_5: ClassVar[Self]
k1_8: ClassVar[Self]
k1_10: ClassVar[Self]
k1_16: ClassVar[Self]
k1_20: ClassVar[Self]
k1_30: ClassVar[Self]
k1_40: ClassVar[Self]
k1_50: ClassVar[Self]
k1_100: ClassVar[Self]
k2_1: ClassVar[Self]
k4_1: ClassVar[Self]
k8_1: ClassVar[Self]
k10_1: ClassVar[Self]
k100_1: ClassVar[Self]
k1000_1: ClassVar[Self]
k1and1_2in_1ft: ClassVar[Self]
class SubDMesh Class
def __init__(self) -> None:
The AcDbSubDMesh class represents the SubDivision surface entity type within AutoCAD.
def __init__(self, id: PyDb.ObjectId) -> None:
The AcDbSubDMesh class represents the SubDivision surface entity type within AutoCAD.
def __init__(self, id: PyDb.ObjectId, mode: PyDb.OpenMode) -> None:
The AcDbSubDMesh class represents the SubDivision surface entity type within AutoCAD.
def __init__(self, id: PyDb.ObjectId, mode: PyDb.OpenMode, erased: bool) -> None:
The AcDbSubDMesh class represents the SubDivision surface entity type within AutoCAD.
def __init__(*args) -> None:
The AcDbSubDMesh class represents the SubDivision surface entity type within AutoCAD.
def __reduce__(self) -> Any:
def cap(self, subentPaths: list[PyDb.FullSubentPath]) -> None:
Caps given edges.
def cast(otherObject: PyRx.RxObject) -> SubDMesh:
def className() -> str:
def cloneFrom(otherObject: PyRx.RxObject) -> SubDMesh:
def collapse(self, subentFaceId: PyDb.SubentId) -> None:
Collapse gin mesh edge or face.
def computeSurfaceArea(self) -> float:
Returns the surface area of the mesh for the current level of subdivision.
def computeVolume(self) -> float:
Returns the volume of the mesh for the current level of subdivision.
def convertToSolid(self, bConvertAsSmooth: bool, optimize: bool) -> Solid3d:
Creates an AcDb3dSolid entity from the mesh data using the bConvertAsSmooth flag to control
whether the ASM solid is smoothed with NURBS faces or polygonal faces, if the mesh data
encloses a volume without self-intersecting.
def convertToSurface(self, bConvertAsSmooth: bool, id: PyDb.SubentId) -> PyDb.Surface:
Creates an AcDbSurface entity from the mesh data using the bConvertAsSmooth flag to control
whether the ASM surface is smoothed with NURBS faces or polygonal faces.
def convertToSurface(self, bConvertAsSmooth: bool, optimize: bool) -> PyDb.Surface:
Creates an AcDbSurface entity from the mesh data using the bConvertAsSmooth flag to control
whether the ASM surface is smoothed with NURBS faces or polygonal faces.
def convertToSurface(*args) -> PyDb.Surface:
Creates an AcDbSurface entity from the mesh data using the bConvertAsSmooth flag to control
whether the ASM surface is smoothed with NURBS faces or polygonal faces.
def desc() -> PyRx.RxClass:
Returns a pointer to the AcRxClass object representing the specific class, or most recent
parent class explicitly registered with ObjectARX of either the pointer type used to invoke
it or the class qualifier used with it. (Remember that when a static member function is
invoked via a pointer, the pointer type, not the object type, determines which
implementation of the function is invoked.) When working with a pointer to an object and
the proper AcRxClass object for the class of the object pointed to is desired, the
AcRxObject::isA() function should be used, since it is a virtual non-static method and is
therefore not pointer type dependent. Caching the value of the pointer returned by this
method is acceptable, provided the application knows that the AcRxClass object pointed to
by the returned pointer was created by an ObjectARX application that will not be unloaded.
def extrudeConnectedFaces(self, subentPaths: list[PyDb.FullSubentPath], length: float, dir: PyGe.Vector3d, taper: float) -> None:
Connects and extrudes faces along given direction and taper angle
def extrudeConnectedFaces(self, subentPaths: list[PyDb.FullSubentPath], alongPath: list[PyGe.Point3d], taper: float) -> None:
Connects and extrudes faces along given direction and taper angle
def extrudeConnectedFaces(*args) -> None:
Connects and extrudes faces along given direction and taper angle
def extrudeFaces(self, subentPaths: list[PyDb.FullSubentPath], length: float, dir: PyGe.Vector3d, taper: float) -> None:
Extrudes faces in the given direction and taper angle.
def extrudeFaces(self, subentPaths: list[PyDb.FullSubentPath], alongPath: list[PyGe.Point3d], taper: float) -> None:
Extrudes faces in the given direction and taper angle.
def extrudeFaces(*args) -> None:
Extrudes faces in the given direction and taper angle.
def getAdjacentSubentPath(self, path: PyDb.FullSubentPath, stype: PyDb.SubentType) -> list[list[PyDb.FullSubentPath]]:
Returns adjacent subentities for a specified mesh sub-entity.
def getCrease(self, id: int | PyDb.SubentId) -> list[float] | float:
Gets the crease value for a mesh subentity.
def getCrease(self, subentPaths: list[PyDb.FullSubentPath]) -> list[float] | float:
Gets the crease value for a mesh subentity.
def getCrease(*args) -> list[float] | float:
Gets the crease value for a mesh subentity.
def getEdgeArray(self) -> list[int]:
Returns Level 0 (base) mesh edges.
def getFaceArray(self) -> list[int]:
Returns Level 0 (base) mesh face list array.
def getFacePlane(self, id: PyDb.SubentId) -> PyGe.Plane:
Gets the face plane of the specified face.
def getNormalArray(self) -> list[PyGe.Vector3d]:
Returns Level 0 (base) vertex normal array.
def getSubDividedFaceArray(self) -> list[int]:
Returns smoothed mesh face list array.
def getSubDividedNormalArray(self) -> list[PyGe.Vector3d]:
Returns smoothed mesh vertex normal array.
def getSubDividedVertexAt(self, id: int | PyDb.SubentId) -> PyGe.Point3d:
Returns the vertex at the specified position of the smoothed mesh.
def getSubDividedVertices(self) -> list[PyGe.Point3d]:
Returns the smoothed mesh vertices.
def getSubentColor(self, id: PyDb.SubentId) -> Color:
Returns the color for the specified subentity.
def getSubentMaterial(self, id: PyDb.SubentId) -> ObjectId:
Returns the object id of the material assigned to the specified subentity.
def getSubentPath(self, index: int, stype: PyDb.SubentType) -> list[list[PyDb.FullSubentPath]]:
Returns the array of AcDbFullSubentPath representing the subentity base for the specified
subentity type and index.
def getVertexAt(self, id: int | PyDb.SubentId) -> PyGe.Point3d:
Returns the vertex at the specified position of the base mesh.
def getVertices(self) -> list[PyGe.Point3d]:
Returns the level 0 (base) mesh vertices.
def isWatertight(self) -> bool:
Indicates whether or not a mesh is watertight. It is watertight if adjacent polygons share
common vertices.
def mergeFaces(self, subentPaths: list[PyDb.FullSubentPath]) -> None:
Merges all given faces.
def numOfEdges(self) -> int:
Returns the number for level 0 (base) mesh edges.
def numOfFaces(self) -> int:
Returns the number of level 0 (base) mesh faces.
def numOfSubDividedFaces(self) -> int:
Returns the number for current level (smoothed) mesh faces.
def numOfSubDividedFacesAt(self, subentPaths: list[PyDb.FullSubentPath]) -> int:
Returns the number of subdivided faces for given base mesh faces
def numOfSubDividedVertices(self) -> int:
Returns the number for current level (smoothed) mesh vertices.
def numOfVertices(self) -> int:
Returns the number for Level 0 (base) mesh vertices.
def setBox(self, xLen: float, yLen: float, zLen: float, divX: int, divY: int, divZ: int, subDLevel: int) -> None:
Creates a box mesh primitive.
def setCone(self, majorRadius: float, minorRadius: float, height: float, divAxis: int, divHeight: int, divCap: int, radiusRatio: float, subDLevel: int) -> None:
Creates a cone mesh primitive.
def setCrease(self, creaseVal: float) -> None:
Makes all edges of the MESH object 'sharp.'
def setCrease(self, subentPaths: list[PyDb.FullSubentPath], creaseVal: float) -> None:
Makes all edges of the MESH object 'sharp.'
def setCrease(*args) -> None:
Makes all edges of the MESH object 'sharp.'
def setCylinder(self, majorRadius: float, minorRadius: float, height: float, divAxis: int, divHeight: int, divCap: int, subDLevel: int) -> None:
Creates a cylinder mesh primitive.
def setPyramid(self, radius: float, height: float, divLength: int, divHeight: int, divCap: int, nSides: int, radiusRatio: float, subDLevel: int) -> None:
Creates a pyramid mesh primitive.
def setSphere(self, radius: float, divAxis: int, divHeight: int, subDLevel: int) -> None:
Creates a sphere mesh primitive.
def setSubDMesh(self, vertexArray: list[PyGe.Point3d], faceArray: list[int], subDLevel: int) -> None:
Creates a mesh for a given vertex array and face list array.
def setSubentColor(self, id: PyDb.SubentId, clr: PyDb.Color) -> None:
Sets the color of the specified subentity
def setSubentMaterial(self, id: PyDb.SubentId, materialId: PyDb.ObjectId) -> None:
Sets the material for the specified subentity.
def setTorus(self, majorRadius: float, divSection: int, divSweepPath: int, sectionRadiusRatio: float, sectionRotate: float, subDLevel: int) -> None:
Creates a torus mesh primitive.
def setVertexAt(self, id: int | PyDb.SubentId, pt: PyGe.Point3d) -> None:
Sets the vertex at the given position for the base mesh.
def setWedge(self, xLen: float, yLen: float, zLen: float, divLength: int, divWidth: int, divHeight: int, divSlope: int, divCap: int, subDLevel: int) -> None:
Creates a wedge mesh primitive.
def spin(self, subentFaceId: PyDb.SubentId) -> None:
Spin edge of mesh face
def splitFace(self, subentFaceId: PyDb.SubentId, subent0: PyDb.SubentId, point0: PyGe.Point3d, subent1: PyDb.SubentId, point1: PyGe.Point3d) -> None:
Split a face in two by specifying two points on two different face edges.
def subdDivideDown(self) -> None:
Drops the smoothness level down one by decreasing the subDvision level.
def subdDivideUp(self) -> None:
Pushes the smoothness level up one by increasing the subDvision level.
def subdLevel(self) -> int:
Returns the current smoothness level.
def subdRefine(self, subentPaths: list[PyDb.FullSubentPath]) -> None:
Adds definition to the Smooth mesh by re-assigning any level of smoothness to the
representation of certain faces, to become the new Level 0.
class SubentId Class
def __init__(self) -> None:
def __init__(self, type: PyDb.SubentType, indexMarker: int) -> None:
def __init__(self, pTypeClass: PyRx.RxClass, indexMarker: int) -> None:
def __init__(*args) -> None:
def __ne__(self) -> bool:
def __reduce__(self) -> Any:
def index(self) -> int:
Returns subentity index in the AcDbSubentId object. There is no rule as to how this index
value must be determined, but it is often the graphics system marker for the subentity that
the AcDbSubentId object is identifying.
kNull: PyDb.SubentId
def setIndex(self, indexMarker: int) -> None:
Sets the SubentId's index to index.
def setType(self, val: PyDb.SubentType) -> None:
Sets the SubentId's SubentType to type.
def setTypeClass(val: PyRx.RxClass) -> None:
Sets the AcRxClass* of the subentity. This method sets the AcDbSubentId::type to
AcDb::kClassSubentType and sets the AcRxClass* for the subentity.
def type(self) -> int:
Returns subent type of object. The possible SubentTypes are: AcDb::kNullSubentType
AcDb::kFaceSubentType AcDb::kEdgeSubentType AcDb::kVertexSubentType AcDb::kMlineSubentCache
def typeClass(self) -> PyRx.RxClass:
Returns the AcRxClass* of the subentity. Returns the AcRxClass* of the subentity if the
AcDbSubentId::type() is AcDb::kClassSubentType, otherwise it returns NULL.
class SubentType Class
kNullSubentType: ClassVar[Self]
kFaceSubentType: ClassVar[Self]
kEdgeSubentType: ClassVar[Self]
kVertexSubentType: ClassVar[Self]
kMlineSubentCache: ClassVar[Self]
kClassSubentType: ClassVar[Self]
kAxisSubentType: ClassVar[Self]
kSilhouetteSubentType: ClassVar[Self]
class Surface Class
def __init__(self) -> None:
Surface entity with methods to create and manipulate ASM surfaces. The following classes
derive from AcDbSurface:
AcDbExtrudedSurfaceAcDbLoftedSurfaceAcDbPlaneSurfaceAcDbRevolvedSurfaceAcDbSweptSurface
def __init__(self, id: PyDb.ObjectId) -> None:
Surface entity with methods to create and manipulate ASM surfaces. The following classes
derive from AcDbSurface:
AcDbExtrudedSurfaceAcDbLoftedSurfaceAcDbPlaneSurfaceAcDbRevolvedSurfaceAcDbSweptSurface
def __init__(self, id: PyDb.ObjectId, mode: PyDb.OpenMode) -> None:
Surface entity with methods to create and manipulate ASM surfaces. The following classes
derive from AcDbSurface:
AcDbExtrudedSurfaceAcDbLoftedSurfaceAcDbPlaneSurfaceAcDbRevolvedSurfaceAcDbSweptSurface
def __init__(self, id: PyDb.ObjectId, mode: PyDb.OpenMode, erased: bool) -> None:
Surface entity with methods to create and manipulate ASM surfaces. The following classes
derive from AcDbSurface:
AcDbExtrudedSurfaceAcDbLoftedSurfaceAcDbPlaneSurfaceAcDbRevolvedSurfaceAcDbSweptSurface
def __init__(*args) -> None:
Surface entity with methods to create and manipulate ASM surfaces. The following classes
derive from AcDbSurface:
AcDbExtrudedSurfaceAcDbLoftedSurfaceAcDbPlaneSurfaceAcDbRevolvedSurfaceAcDbSweptSurface
def __reduce__(self) -> Any:
def cast(otherObject: PyRx.RxObject) -> PyDb.Surface:
def className() -> str:
def cloneFrom(otherObject: PyRx.RxObject) -> PyDb.Surface:
def createExtrudedSurface(pSweep: PyDb.Profile3d, directionVec: PyGe.Vector3d, sweepOptions: PyDb.SweepOptions) -> ExtrudedSurface:
Creates an extruded surface from the given profile using the specified options and adds the
surface to the current database.
def createFrom(val: PyDb.Entity) -> PyDb.Surface:
def createRevolvedSurface(pRev: PyDb.Profile3d, axisPnt: PyGe.Point3d, axisDir: PyGe.Vector3d, revAngle: float, startAngle: float, sweepOptions: PyDb.SweepOptions) -> RevolvedSurface:
Creates a revolved surface from the given profile using the specified options.
def creationActionBodyId(self) -> ObjectId:
def desc() -> PyRx.RxClass:
Returns a pointer to the AcRxClass object representing the specific class, or most recent
parent class explicitly registered with ObjectARX of either the pointer type used to invoke
it or the class qualifier used with it. (Remember that when a static member function is
invoked via a pointer, the pointer type, not the object type, determines which
implementation of the function is invoked.) When working with a pointer to an object and
the proper AcRxClass object for the class of the object pointed to is desired, the
AcRxObject::isA() function should be used, since it is a virtual non-static method and is
therefore not pointer type dependent. Caching the value of the pointer returned by this
method is acceptable, provided the application knows that the AcRxClass object pointed to
by the returned pointer was created by an ObjectARX application that will not be unloaded.
def extendEdges(self, subEnts: list[PyDb.FullSubentPath], extDist: float, extOption: SurfaceEdgeExtensionType, bAssociativeEnabled: bool) -> None:
def getArea(self) -> float:
def getPerimeter(self) -> float:
def getWireframeType(self) -> SurfaceWireframeType:
def modificationActionBodyIds(self) -> list[PyDb.ObjectId]:
def projectOnToSurface(self, object: PyDb.Entity, projectionDirection: PyGe.Vector3d) -> list[PyDb.Entity]:
def rayTest(self, rayBasePoint: PyGe.Point3d, rayDir: PyGe.Vector3d, rayRadius: float) -> tuple[list[PyDb.SubentId], list[float]]:
def setUIsolineDensity(self, numIsolines: int) -> None:
def setVIsolineDensity(self, numIsolines: int) -> None:
def setWireframeType(self, val: PyDb.SurfaceWireframeType) -> None:
def uIsolineDensity(self) -> int:
def vIsolineDensity(self) -> int:
class SurfaceEdgeExtensionType Class
kExtendEdge: ClassVar[Self]
kStretchEdge: ClassVar[Self]
class SurfaceWireframeType Class
kIsolines: ClassVar[Self]
kIsoparms: ClassVar[Self]
class SweepAlignOption Class
kNoAlignment: ClassVar[Self]
kAlignSweepEntityToPath: ClassVar[Self]
kTranslateSweepEntityToPath: ClassVar[Self]
kTranslatePathToSweepEntity: ClassVar[Self]
class SweepMiterOption Class
kDefaultMiter: ClassVar[Self]
kOldMiter: ClassVar[Self]
kNewMiter: ClassVar[Self]
kCrimpMiter: ClassVar[Self]
kBendMiter: ClassVar[Self]
class SweepOptions Class
def __init__(self) -> None:
Utility class for setting options used by createSweptSurface() and createSweptSolid().
These options can be used to control the shape of the resulting surface or solid. The
default constructor for this class assigns default values to these options.
def __reduce__(self) -> Any:
def align(self) -> SweepAlignOption:
def alignAngle(self) -> float:
def alignStart(self) -> bool:
def bank(self) -> bool:
def basePoint(self) -> PyGe.Point3d:
def checkIntersections(self) -> bool:
def checkPathCurve(self, pPathEnt: PyDb.Entity, displayErrorMessages: bool) -> None:
def checkSweepCurve(self, pPathEnt: PyDb.Entity, displayErrorMessages: bool) -> tuple[PyDb.Planarity, PyGe.Point3d, PyGe.Vector3d, bool, float]:
def draftAngle(self) -> float:
def endDraftDist(self) -> float:
def getPathEntityTransform(self, xform: PyGe.Matrix3d) -> bool:
def getSweepEntityTransform(self, xform: PyGe.Matrix3d) -> bool:
def miterOption(self) -> SweepMiterOption:
def scaleFactor(self) -> float:
def setAlign(self, val: PyDb.SweepAlignOption) -> None:
def setAlignAngle(self, val: float) -> None:
def setAlignStart(self, val: bool) -> None:
def setBank(self, val: bool) -> None:
def setBasePoint(self, pt: PyGe.Point3d) -> None:
def setCheckIntersections(self, val: bool) -> None:
def setDraftAngle(self, val: float) -> None:
def setEndDraftDist(self, val: float) -> None:
def setMiterOption(self, val: PyDb.SweepMiterOption) -> None:
def setPathEntityTransform(self, mat: PyGe.Matrix3d) -> None:
def setPathEntityTransform(self, pPathEnt: PyDb.Entity) -> None:
def setPathEntityTransform(self, pPathEnt: PyDb.Entity, displayErrorMessages: bool) -> None:
def setPathEntityTransform(*args) -> None:
def setScaleFactor(self, val: float) -> None:
def setStartDraftDist(self, val: float) -> None:
def setSweepEntityTransform(self, mat: PyGe.Matrix3d) -> None:
def setSweepEntityTransform(self, sweepEntities: list[PyDb.Entity]) -> None:
def setSweepEntityTransform(self, sweepEntities: list[PyDb.Entity], displayErrorMessages: bool) -> None:
def setSweepEntityTransform(*args) -> None:
def setTwistAngle(self, val: float) -> None:
def setTwistRefVec(self, vec: PyGe.Vector3d) -> None:
def startDraftDist(self) -> float:
def twistAngle(self) -> float:
def twistRefVec(self) -> PyGe.Vector3d:
class SweptSurface Class
def __init__(self, id: PyDb.ObjectId, mode: PyDb.OpenMode, erased: bool) -> None:
def __reduce__(self) -> Any:
def cast(otherObject: PyRx.RxObject) -> SweptSurface:
def className() -> str:
def cloneFrom(otherObject: PyRx.RxObject) -> SweptSurface:
def desc() -> PyRx.RxClass:
Returns a pointer to the AcRxClass object representing the specific class, or most recent
parent class explicitly registered with ObjectARX of either the pointer type used to invoke
it or the class qualifier used with it. (Remember that when a static member function is
invoked via a pointer, the pointer type, not the object type, determines which
implementation of the function is invoked.) When working with a pointer to an object and
the proper AcRxClass object for the class of the object pointed to is desired, the
AcRxObject::isA() function should be used, since it is a virtual non-static method and is
therefore not pointer type dependent. Caching the value of the pointer returned by this
method is acceptable, provided the application knows that the AcRxClass object pointed to
by the returned pointer was created by an ObjectARX application that will not be unloaded.
class SymUtilServices Class
def __init__(self) -> None:
def __reduce__(self) -> Any:
def blockModelSpaceId(self, db: PyDb.Database) -> ObjectId:
def blockModelSpaceName(self) -> str:
def blockPaperSpaceId(self, db: PyDb.Database) -> ObjectId:
def blockPaperSpaceName(self) -> str:
def compareSymbolName(self, thisName: str, otherName: str) -> int:
def compatibilityMode(self, db: PyDb.Database) -> bool:
def getBlockNameFromInsertPathName(self, pathname: str) -> str:
def getInsertPathNameFromBlockName(self, pathname: str) -> str:
def getPathNameFromSymbolName(self, symname: str, extensions: str) -> str:
def getSymbolNameFromPathName(self, symname: str, extensions: str) -> str:
def hasVerticalBar(self, val: str) -> bool:
def isBlockLayoutName(self, val: str) -> bool:
def isBlockModelSpaceName(self, val: str) -> bool:
def isBlockPaperSpaceName(self, val: str) -> bool:
def isLayerDefpointsName(self, val: str) -> bool:
def isLayerZeroName(self, val: str) -> bool:
def isLinetypeByBlockName(self, val: str) -> bool:
def isLinetypeByLayerName(self, val: str) -> bool:
def isLinetypeContinuousName(self, val: str) -> bool:
def isRegAppAcadName(self, val: str) -> bool:
def isTextStyleStandardName(self, val: str) -> bool:
def isViewportActiveName(self, val: str) -> bool:
def layerDefpointsId(self, db: PyDb.Database) -> ObjectId:
def layerDefpointsName(self) -> str:
def layerZeroId(self, db: PyDb.Database) -> ObjectId:
def layerZeroName(self) -> str:
def linetypeByBlockId(self, db: PyDb.Database) -> ObjectId:
def linetypeByBlockName(self) -> str:
def linetypeByLayerId(self, db: PyDb.Database) -> ObjectId:
def linetypeByLayerName(self) -> str:
def linetypeContinuousId(self, db: PyDb.Database) -> ObjectId:
def linetypeContinuousName(self) -> str:
def makeDependentName(self, dwgname: str, symbolName: str) -> str:
def regAppAcadId(self, db: PyDb.Database) -> ObjectId:
def regAppAcadName(self) -> str:
def repairPreExtendedSymbolName(self, oldname: str, allowVerticalBar: bool) -> str:
def repairSymbolName(self, oldname: str, allowVerticalBar: bool) -> str:
def textStyleStandardId(self, db: PyDb.Database) -> ObjectId:
def textStyleStandardName(self) -> str:
def validateCompatibleSymbolName(self, name: str, isNewName: bool, allowVerticalBar: bool, compatibilityMode: bool) -> ErrorStatus:
def validatePreExtendedSymbolName(self, oldname: str, allowVerticalBar: bool) -> ErrorStatus:
def validateSymbolName(self, name: str, allowVerticalBar: bool) -> ErrorStatus:
def viewportActiveName(self) -> str:
class SymbolTable Class
def __contains__(self, val: str | PyDb.ObjectId) -> bool:
def __getitem__(self, val: str) -> ObjectId:
def __init__(self, id: PyDb.ObjectId, mode: PyDb.OpenMode, erased: bool) -> None:
def __iter__(self) -> Iterator[PyDb.ObjectId]:
def __reduce__(self) -> Any:
def add(self, val: PyDb.SymbolTableRecord) -> ObjectId:
This function adds the record pointed to by pRecord to both the database containing the
table and the table itself. Possible return ErrorStatus codes are: Acad::eOk,
Acad::eOutOfMemory, Acad::eDuplicateRecordName, Acad::eNoDatabase (if the SymbolTable is
not in a database).
def asDict(self) -> dict[str, PyDb.ObjectId]:
def cast(otherObject: PyRx.RxObject) -> SymbolTable:
def className() -> str:
def cloneFrom(otherObject: PyRx.RxObject) -> SymbolTable:
def desc() -> PyRx.RxClass:
Returns a pointer to the AcRxClass object representing the specific class, or most recent
parent class explicitly registered with ObjectARX of either the pointer type used to invoke
it or the class qualifier used with it. (Remember that when a static member function is
invoked via a pointer, the pointer type, not the object type, determines which
implementation of the function is invoked.) When working with a pointer to an object and
the proper AcRxClass object for the class of the object pointed to is desired, the
AcRxObject::isA() function should be used, since it is a virtual non-static method and is
therefore not pointer type dependent. Caching the value of the pointer returned by this
method is acceptable, provided the application knows that the AcRxClass object pointed to
by the returned pointer was created by an ObjectARX application that will not be unloaded.
def getAt(self, val: str) -> ObjectId:
This function searches the SymbolTable for the record with name entryName and, if found,
opens the record in the mode specified by openMode. If the open operation succeeds, pRec
returns pointing to the opened record. If openErasedRec == true, then erased records are
opened. Possible return ErrorStatus codes are: Acad::eOk, Acad::eKeyNotFound,
Acad::ePermanentlyErased, Acad::eAtMaxReaders, Acad::eWasOpenForNotify,
Acad::eWasNotifying, Acad::eWasOpenForUndo, Acad::eWasOpenForWrite, Acad::eWasOpenForRead
def has(self, val: str | PyDb.ObjectId) -> bool:
This function returns true if the table contains a record with a name that matches name. If
no matches are found, then false is returned.
def recordIds(self) -> list[PyDb.ObjectId]:
def toDict(self) -> dict[str, PyDb.ObjectId]:
class SymbolTableRecord Class
def __init__(self, id: PyDb.ObjectId, mode: PyDb.OpenMode, erased: bool) -> None:
def __reduce__(self) -> Any:
def cast(otherObject: PyRx.RxObject) -> SymbolTableRecord:
def className() -> str:
def cloneFrom(otherObject: PyRx.RxObject) -> SymbolTableRecord:
def desc() -> PyRx.RxClass:
Returns a pointer to the AcRxClass object representing the specific class, or most recent
parent class explicitly registered with ObjectARX of either the pointer type used to invoke
it or the class qualifier used with it. (Remember that when a static member function is
invoked via a pointer, the pointer type, not the object type, determines which
implementation of the function is invoked.) When working with a pointer to an object and
the proper AcRxClass object for the class of the object pointed to is desired, the
AcRxObject::isA() function should be used, since it is a virtual non-static method and is
therefore not pointer type dependent. Caching the value of the pointer returned by this
method is acceptable, provided the application knows that the AcRxClass object pointed to
by the returned pointer was created by an ObjectARX application that will not be unloaded.
def getName(self) -> str:
This function copies the name string of the AcDbSymbolTableRecord to sName. The
AcDbSymbolTableRecord name string is used for DXF group code 2.
def isDependent(self) -> bool:
This function returns true when the SymbolTableRecord is a dependent (that is, part of) of
an attached xref drawing; otherwise false is returned. The isDependent value is used for
the fifth bit of DXF group code 70.
def isRenamable(self) -> bool:
Returns true when the SymbolTableRecord can be renamed.
def isResolved(self) -> bool:
This function returns true if the SymbolTableRecord is part of an xref which has been
successfully 'resolved' (loaded into the drawing). If the record is not part of an xref, or
it is part of an xref but the xref has not been successfully resolved, then false is
returned. The AcDbSymbolTableRecord::isDependent() method can be used to determine if the
record is part of an xref. The isResolved value is used for the sixth bit of DXF group code
70.
def name(self) -> str:
Returns the name of the AcDbSymbolTableRecord object.
def setName(self, name: str) -> None:
This function sets the SymbolTableRecord to use a copy of the string pointed to by pName as
the name string for the record. The string must have a null terminator, and any or all of
the characters may be Unicode or multibyte representations or multibyte characters. This
function can be used to rename a symbol-table record. This includes the situation where the
new name only differs from the old name by the case of the letters. Returns Acad::eOk if
successful. If there is insufficient memory for the string copy, then Acad::eOutOfMemory is
returned. The SymbolTableRecord name string is used for DXF group code 2.
class Table Class
def __init__(self) -> None:
def __init__(self, id: PyDb.ObjectId) -> None:
def __init__(self, id: PyDb.ObjectId, mode: PyDb.OpenMode) -> None:
def __init__(*args) -> None:
def __reduce__(self) -> Any:
def alignment(self, rowType: PyDb.RowType) -> CellAlignment:
def alignment(self, row: int, col: int) -> CellAlignment:
def alignment(*args) -> CellAlignment:
def attachmentPoint(self, row: int, col: int, content: int) -> PyGe.Point3d:
def backgroundColor(self, rowType: PyDb.RowType) -> Color:
def backgroundColor(self, row: int, col: int) -> Color:
def backgroundColor(*args) -> Color:
def blockRotation(self, row: int, col: int) -> float:
def blockScale(self, row: int, col: int) -> float:
def blockTableRecordId(self, row: int, col: int) -> ObjectId:
def blockTableRecordId(self, row: int, col: int, content: int) -> ObjectId:
def blockTableRecordId(*args) -> ObjectId:
def breakFlowDirection(self) -> TableBreakFlowDirection:
def breakHeight(self, val: int) -> float:
def breakOffset(self, idx: int) -> PyGe.Vector3d:
def breakOption(self) -> TableBreakOption:
def breakSpacing(self) -> float:
def calcTextExtents(val: str, textStyleId: PyDb.ObjectId) -> tuple[float, float]:
def canDelete(self, row: int, col: int, brow: bool) -> bool:
def canInsert(self, index: int, brow: bool) -> bool:
def cast(otherObject: PyRx.RxObject) -> Table:
def cellRange(self) -> CellRange:
def cellState(self, row: int, col: int) -> CellState:
def cellStrValues(self) -> list[tuple[int, int, str]]:
def cellStrValues(self, nOption: PyDb.TableIteratorOption) -> list[tuple[int, int, str]]:
def cellStrValues(self, pRange: PyDb.CellRange) -> list[tuple[int, int, str]]:
def cellStrValues(self, pRange: PyDb.CellRange, nOption: TableIteratorOption) -> list[tuple[int, int, str]]:
def cellStrValues(*args) -> list[tuple[int, int, str]]:
def cellStyle(self, row: int, col: int) -> str:
def cellStyleOverrides(self, row: int, col: int) -> list[int]:
def cellType(self, row: int, col: int) -> CellType:
def cellValues(self) -> list[tuple[int, int, Any]]:
def cellValues(self, nOption: PyDb.TableIteratorOption) -> list[tuple[int, int, Any]]:
def cellValues(self, pRange: PyDb.CellRange) -> list[tuple[int, int, Any]]:
def cellValues(self, pRange: PyDb.CellRange, nOption: TableIteratorOption) -> list[tuple[int, int, Any]]:
def cellValues(*args) -> list[tuple[int, int, Any]]:
def cells(self) -> list[PyDb.Cell]:
def cells(self, nOption: PyDb.TableIteratorOption) -> list[PyDb.Cell]:
def cells(self, pRange: PyDb.CellRange) -> list[PyDb.Cell]:
def cells(self, pRange: PyDb.CellRange, nOption: TableIteratorOption) -> list[PyDb.Cell]:
def cells(*args) -> list[PyDb.Cell]:
def className() -> str:
def clearCellOverrides(self, row: int, col: int) -> None:
def clearCustomData(self, row: int, col: int, style: str) -> None:
def clearSubSelection(self) -> None:
def clearTableStyleOverrides(self) -> None:
def cloneFrom(otherObject: PyRx.RxObject) -> Table:
def columnWidth(self, col: int) -> float:
def contentColor(self, rowType: PyDb.RowType) -> Color:
def contentColor(self, row: int, col: int) -> Color:
def contentColor(self, row: int, col: int, content: int) -> Color:
def contentColor(*args) -> Color:
def contentLayout(self, row: int, col: int) -> CellContentLayout:
def contentType(self, row: int, col: int) -> CellContentType:
def contentType(self, row: int, col: int, content: int) -> CellContentType:
def contentType(*args) -> CellContentType:
def createContent(self, row: int, col: int, idx: int) -> int:
def dataFormat(self, row: int, col: int) -> str:
def dataFormat(self, row: int, col: int, content: int) -> str:
def dataFormat(*args) -> str:
def deleteCellContent(self, row: int, col: int) -> None:
def deleteColumns(self, row: int, nCols: int) -> None:
def deleteContent(self, row: int, col: int) -> None:
def deleteContent(self, row: int, col: int, content: int) -> None:
def deleteContent(self, range: PyDb.CellRange) -> None:
def deleteContent(*args) -> None:
def deleteRows(self, row: int, nRows: int) -> None:
def desc() -> PyRx.RxClass:
Returns a pointer to the AcRxClass object representing the specific class, or most recent
parent class explicitly registered with ObjectARX of either the pointer type used to invoke
it or the class qualifier used with it. (Remember that when a static member function is
invoked via a pointer, the pointer type, not the object type, determines which
implementation of the function is invoked.) When working with a pointer to an object and
the proper AcRxClass object for the class of the object pointed to is desired, the
AcRxObject::isA() function should be used, since it is a virtual non-static method and is
therefore not pointer type dependent. Caching the value of the pointer returned by this
method is acceptable, provided the application knows that the AcRxClass object pointed to
by the returned pointer was created by an ObjectARX application that will not be unloaded.
def direction(self) -> PyGe.Vector3d:
def enableBreak(self, val: bool) -> None:
def enableMergeAll(self, row: int, col: int, val: bool) -> None:
def fieldId(self, row: int, col: int) -> ObjectId:
def fieldId(self, row: int, col: int, content: int) -> ObjectId:
def fieldId(*args) -> ObjectId:
def flowDirection(self) -> TableFlowDirection:
def generateLayout(self) -> None:
def getBlockAttributeValue(self, row: int, col: int, val: str, id: PyDb.ObjectId) -> str:
def getBlockAttributeValue(self, row: int, col: int, content: int, val: str, id: PyDb.ObjectId) -> str:
def getBlockAttributeValue(*args) -> str:
def getCellExtents(self, row: int, col: int, isOuterCell: bool) -> list[PyGe.Point3d]:
def getCellOverride(self, row: int, col: int, content: int) -> CellProperty:
def getCustomData(self, row: int, col: int, style: str) -> AcValue:
def getDataLink(self, row: int, col: int) -> ObjectId:
def getDataLinkRange(self, row: int, col: int) -> CellRange:
def getDataType(self, rowType: PyDb.RowType) -> tuple[PyDb.ValueDataType, PyDb.ValueUnitType]:
def getDataType(self, row: int, col: int) -> tuple[PyDb.ValueDataType, PyDb.ValueUnitType]:
def getDataType(self, row: int, col: int, content: int) -> tuple[PyDb.ValueDataType, PyDb.ValueUnitType]:
def getDataType(*args) -> tuple[PyDb.ValueDataType, PyDb.ValueUnitType]:
def getFormula(self, row: int, col: int, content: int) -> str:
def getGridOverride(self, row: int, col: int, nGridLineType: PyDb.GridLineType) -> GridProperty:
def getGridProperty(self, row: int, col: int, nGridLineType: GridLineType) -> object:
def getMergeRange(self, row: int, col: int) -> CellRange:
def getSubSelection(self) -> CellRange:
def gridColor(self, gridlineType: GridLineType, rowType: PyDb.RowType) -> Color:
def gridColor(self, row: int, col, gridlineType: GridLineType) -> Color:
def gridColor(*args) -> Color:
def gridDoubleLineSpacing(self, row: int, col: int, nGridLineType: GridLineType) -> float:
def gridEdgeColor(self, row: int, col: int, content: CellEdgeMask) -> Color:
def gridEdgeLineWeight(self, row: int, col: int, content: CellEdgeMask) -> LineWeight:
def gridEdgeVisibility(self, row: int, col: int, content: CellEdgeMask) -> Visibility:
def gridLineStyle(self, row: int, col: int, nGridLineType: PyDb.GridLineType) -> GridLineStyle:
def gridLineWeight(self, gridlineType: GridLineType, rowType: PyDb.RowType) -> LineWeight:
def gridLineWeight(self, row: int, col, gridlineType: GridLineType) -> LineWeight:
def gridLineWeight(*args) -> LineWeight:
def gridLinetype(self, row: int, col: int, nGridLineType: PyDb.GridLineType) -> ObjectId:
def gridVisibility(self, gridlineType: GridLineType, rowType: PyDb.RowType) -> Visibility:
def gridVisibility(self, row: int, col, gridlineType: GridLineType) -> Visibility:
def gridVisibility(*args) -> Visibility:
def hasFormula(self, row: int, col: int, content: int) -> bool:
def hasSubSelection(self) -> bool:
def height(self) -> float:
def hitTest(self, wpt: PyGe.Point3d, viewvec: PyGe.Vector3d, wx: float, wy: float) -> tuple[bool, int, int, int, int]:
def horzCellMargin(self) -> float:
def insertColumns(self, row: int, width: float, nCols: int) -> None:
def insertColumnsAndInherit(self, nIndex: int, nInheritFrom: int, nNumCols: int) -> None:
def insertRows(self, row: int, height: float, nRows: int) -> None:
def insertRowsAndInherit(self, nIndex: int, nInheritFrom: int, nNumRows: int) -> None:
def isAutoScale(self, row: int, col: int) -> bool:
def isAutoScale(self, row: int, col: int, content: int) -> bool:
def isAutoScale(*args) -> bool:
def isBackgroundColorNone(self, rowType: PyDb.RowType) -> bool:
def isBackgroundColorNone(self, row: int, col: int) -> bool:
def isBackgroundColorNone(*args) -> bool:
def isBreakEnabled(self) -> bool:
def isContentEditable(self, row: int, col: int) -> bool:
def isEmpty(self, row: int, col: int) -> bool:
def isFormatEditable(self, row: int, col: int) -> bool:
def isHeaderSuppressed(self) -> bool:
def isLinked(self, row: int, col: int) -> bool:
def isMergeAllEnabled(self, row: int, col: int) -> bool:
def isMergedCell(self, row: int, col: int) -> tuple[bool, int, int, int, int]:
def isRegenerateTableSuppressed(self) -> bool:
def isTitleSuppressed(self) -> bool:
def margin(self, row: int, col: int, nMargin: PyDb.CellMargin) -> float:
def mergeCells(self, minRow: int, maxRow: int, minCol: int, maxCol: int) -> None:
def minimumColumnWidth(self, col: int) -> float:
def minimumRowHeight(self, row: int) -> float:
def minimumTableHeight(self) -> float:
def minimumTableWidth(self) -> float:
def moveContent(self, row: int, col: int, frm: int, to: int) -> None:
def numColumns(self) -> int:
def numContents(self, row: int, col: int) -> int:
def numRows(self) -> int:
def recomputeTableBlock(self, val: bool) -> None:
def removeAllOverrides(self, row: int, col: int) -> None:
def removeDataLink(self, row: int, col: int) -> None:
def rotation(self, row: int, col: int, content: int) -> float:
def rowHeight(self, row: int) -> float:
def rowType(self, row: int) -> RowType:
def scale(self, row: int, col: int, content: int) -> float:
def setAlignment(self, align: PyDb.CellAlignment, rowType: PyDb.RowType) -> None:
def setAlignment(self, nRow: int, nCol: int, align: PyDb.CellAlignment) -> None:
def setAlignment(*args) -> None:
def setAutoScale(self, row: int, col: int, flag: bool) -> None:
def setAutoScale(self, row: int, col: int, content: int, flag: bool) -> None:
def setAutoScale(*args) -> None:
def setBackgroundColor(self, clr: PyDb.Color, rowType: PyDb.RowType) -> None:
def setBackgroundColor(self, row: int, col: int, clr: PyDb.Color) -> None:
def setBackgroundColor(*args) -> None:
def setBackgroundColorNone(self, value: bool, rowType: PyDb.RowType) -> None:
def setBackgroundColorNone(self, nRow: int, nCol: int, value: bool) -> None:
def setBackgroundColorNone(*args) -> None:
def setBlockAttributeValue(self, row: int, col: int, id: PyDb.ObjectId, val: str) -> None:
def setBlockAttributeValue(self, row: int, col: int, content: int, id: PyDb.ObjectId, val: str) -> None:
def setBlockAttributeValue(*args) -> None:
def setBlockRotation(self, row: int, col: int, rotAng: float) -> None:
def setBlockScale(self, row: int, col: int, scale: float) -> None:
def setBlockTableRecordId(self, row: int, col: int, id: PyDb.ObjectId, autoFit: bool) -> None:
def setBlockTableRecordId(self, row: int, col: int, content: int, id: PyDb.ObjectId, autoFit: bool) -> None:
def setBlockTableRecordId(*args) -> None:
def setBreakFlowDirection(self, dir: PyDb.TableBreakFlowDirection) -> None:
def setBreakHeight(self, val: int, height: float) -> None:
def setBreakOffset(self, idx: int, vec: PyGe.Vector3d) -> None:
def setBreakOption(self, val: TableBreakOption) -> None:
def setBreakSpacing(self, val: float) -> None:
def setCellOverride(self, row: int, col: int, content: int, nOverride: PyDb.CellProperty) -> None:
def setCellState(self, row: int, col: int, val: PyDb.CellState) -> None:
def setCellStyle(self, row: int, col: int, style: str) -> None:
def setCellType(self, row: int, col: int, type: CellType) -> None:
def setColumnWidth(self, column: int, width: float) -> None:
def setColumnWidth(self, width: float) -> None:
def setColumnWidth(*args) -> None:
def setContentColor(self, color: PyDb.Color, rowType: PyDb.RowType) -> None:
def setContentColor(self, nRow: int, nCol: int, color: PyDb.Color) -> None:
def setContentColor(self, nRow: int, nCol: int, content: int, color: PyDb.Color) -> None:
def setContentColor(*args) -> None:
def setContentLayout(self, row: int, col: int, val: PyDb.CellContentLayout) -> None:
def setCustomData(self, row: int, col: int, style: str, val: PyDb.AcValue) -> None:
def setDataFormat(self, row: int, col: int, val: str) -> None:
def setDataFormat(self, row: int, col: int, content: int, val: str) -> None:
def setDataFormat(*args) -> None:
def setDataLink(self, row: int, col: int, id: PyDb.ObjectId, update: bool) -> None:
def setDataType(self, nDataType: ValueDataType, nUnitType: ValueUnitType) -> None:
def setDataType(self, nDataType: ValueDataType, nUnitType: ValueUnitType, rowType: PyDb.RowType) -> None:
def setDataType(self, row: int, col: int, nDataType: ValueDataType, nUnitType: ValueUnitType) -> None:
def setDataType(self, row: int, col, nContent: int, nDataType: ValueDataType, nUnitType: ValueUnitType) -> None:
def setDataType(*args) -> None:
def setDirection(self, val: PyGe.Vector3d) -> None:
def setFieldId(self, row: int, col: int, id: PyDb.ObjectId) -> None:
def setFieldId(self, row: int, col: int, content: int, id: PyDb.ObjectId, nFlag: PyDb.CellOption) -> None:
def setFieldId(*args) -> None:
def setFlowDirection(self, val: PyDb.TableFlowDirection) -> None:
def setFormat(self, row: int, col: int, format: str) -> None:
def setFormula(self, row: int, col: int, content: int, val: str) -> None:
def setGridColor(self, color: PyDb.Color, nBorders: int, nRows: int) -> None:
def setGridColor(self, nRow: int, nCol: int, nGridLineTypes: GridLineType, color: PyDb.Color) -> None:
def setGridColor(*args) -> None:
def setGridDoubleLineSpacing(self, row: int, col: int, nGridLineType: GridLineType, spacing: float) -> None:
def setGridEdgeColor(self, row: int, col: int, content: CellEdgeMask, clr: PyDb.AcCmColor) -> None:
def setGridEdgeLineWeight(self, row: int, col: int, content: CellEdgeMask, val: PyDb.LineWeight) -> None:
def setGridEdgeVisibility(self, row: int, col: int, content: CellEdgeMask, val: PyDb.Visibility) -> None:
def setGridLineStyle(self, row: int, col: int, nGridLineType: PyDb.GridLineType, nLineStyle: PyDb.GridLineStyle) -> None:
def setGridLineWeight(self, lwt: LineWeight, nBorders: int, nRows: int) -> None:
def setGridLineWeight(self, nRow: int, nCol: int, nGridLineTypes: GridLineType, nLineWeight: LineWeight) -> None:
def setGridLineWeight(*args) -> None:
def setGridLinetype(self, row: int, col: int, nGridLineType: PyDb.GridLineType, idLinetype: PyDb.ObjectId) -> None:
def setGridOverride(self, row: int, col: int, nGridLineType: PyDb.GridLineType, nOverride: PyDb.GridProperty) -> None:
def setGridVisibility(self, visible: PyDb.Visibility, nBorders: int, nRows: int) -> None:
def setGridVisibility(self, nRow: int, nCol: int, nGridLineTypes: GridLineType, visible: PyDb.Visibility) -> None:
def setGridVisibility(*args) -> None:
def setHeight(self, val: float) -> None:
def setHorzCellMargin(self, val: float) -> None:
def setMargin(self, row: int, col: int, nMargin: PyDb.CellMargin, val: float) -> None:
def setNormal(self, val: PyGe.Vector3d) -> None:
def setPosition(self, val: PyGe.Point3d) -> None:
def setRecomputeTableBlock(self, val: bool) -> None:
def setRegen(self) -> None:
def setRotation(self, row: int, col: int, content: int, fang: float) -> None:
def setRowHeight(self, row: int, height: float) -> None:
def setRowHeight(self, height: float) -> None:
def setRowHeight(*args) -> None:
def setScale(self, row: int, col: int, content: int, val: float) -> None:
def setSize(self, rows: int, cols: int) -> None:
def setSubSelection(self, val: PyDb.CellRange) -> None:
def setTableRotation(self, val: float) -> None:
def setTableStyle(self, val: PyDb.ObjectId) -> None:
def setTextHeight(self, height: float, rowType: PyDb.RowType) -> None:
def setTextHeight(self, row: int, col: int, height: float) -> None:
def setTextHeight(self, row: int, col, nContent: int, height: float) -> None:
def setTextHeight(*args) -> None:
def setTextRotation(self, row: int, col: int, rot: RotationAngle) -> None:
def setTextString(self, row: int, col: int, val: str) -> None:
def setTextString(self, row: int, col: int, content: int, val: str) -> None:
def setTextString(self, cell: PyDb.Cell, val: str) -> None:
def setTextString(*args) -> None:
def setTextStyle(self, id: PyDb.ObjectId, rowType: PyDb.RowType) -> None:
def setTextStyle(self, row: int, col: int, id: PyDb.ObjectId) -> None:
def setTextStyle(self, row: int, col, nContent: int, id: PyDb.ObjectId) -> None:
def setTextStyle(*args) -> None:
def setValue(self, row: int, col: int, val: PyDb.AcValue) -> None:
def setValue(self, row: int, col: int, content: int, val: PyDb.AcValue) -> None:
def setValue(self, row: int, col: int, content: int, val: PyDb.AcValue, opt: PyDb.ValueParseOption) -> None:
def setValue(self, row: int, col: int, content: int, val: str, opt: PyDb.ValueParseOption) -> None:
def setValue(*args) -> None:
def setVertCellMargin(self, val: float) -> None:
def setWidth(self, val: float) -> None:
def suppressHeaderRow(self, val: bool) -> None:
def suppressInvisibleGrid(self, val: bool) -> None:
def suppressRegenerateTable(self, val: bool) -> None:
def suppressTitleRow(self, val: bool) -> None:
def tableRotation(self) -> float:
def tableStyle(self) -> ObjectId:
def tableStyleOverrides(self) -> list[int]:
def textHeight(self, rowType: PyDb.RowType) -> float:
def textHeight(self, row: int, col: int) -> float:
def textHeight(self, row: int, col: int, content: int) -> float:
def textHeight(*args) -> float:
def textRotation(self, row: int, col: int) -> RotationAngle:
def textString(self, row: int, col: int) -> str:
def textString(self, row: int, col: int, content: int) -> str:
def textString(self, cell: PyDb.Cell) -> str:
def textString(*args) -> str:
def textStringFmt(self, row: int, col: int, nOption: ValueFormatOption) -> str:
def textStringFmt(self, row: int, col: int, content: int, nOption: ValueFormatOption) -> str:
def textStringFmt(self, cell: PyDb.Cell, nOption: ValueFormatOption) -> str:
def textStringFmt(*args) -> str:
def textStyle(self, rowType: PyDb.RowType) -> ObjectId:
def textStyle(self, row: int, col: int) -> ObjectId:
def textStyle(self, row: int, col: int, content: int) -> ObjectId:
def textStyle(*args) -> ObjectId:
def unmergeCells(self, minRow: int, maxRow: int, minCol: int, maxCol: int) -> None:
def updateDataLink(self, nDir: UpdateDirection, nOption: UpdateOption) -> None:
def updateDataLink(self, row: int, col: int, nDir: UpdateDirection, nOption: UpdateOption) -> None:
def updateDataLink(*args) -> None:
def value(self, row: int, col: int) -> AcValue:
def value(self, row: int, col: int, content: int) -> AcValue:
def value(self, row: int, col: int, content: int, opt: PyDb.ValueFormatOption) -> AcValue:
def value(*args) -> AcValue:
def vertCellMargin(self) -> float:
def width(self) -> float:
class TableBreakFlowDirection Class
kTableIteratorNone: ClassVar[Self]
kTableBreakFlowDownOrUp: ClassVar[Self]
kTableBreakFlowLeft: ClassVar[Self]
class TableBreakOption Class
kTableBreakNone: ClassVar[Self]
kTableBreakEnableBreaking: ClassVar[Self]
kTableBreakRepeatTopLabels: ClassVar[Self]
kTableBreakRepeatBottomLabels: ClassVar[Self]
kTableBreakAllowManualPositions: ClassVar[Self]
kTableBreakAllowManualHeights: ClassVar[Self]
class TableFlowDirection Class
kTtoB: ClassVar[Self]
kExactly: ClassVar[Self]
class TableHitItem Class
kTableHitNone: ClassVar[Self]
kTableHitCell: ClassVar[Self]
kTableHitRowIndicator: ClassVar[Self]
kTableHitColumnIndicator: ClassVar[Self]
kTableHitGridLine: ClassVar[Self]
class TableIteratorOption Class
kTableIteratorNone: ClassVar[Self]
kTableIteratorIterateSelection: ClassVar[Self]
kTableIteratorIterateRows: ClassVar[Self]
kTableIteratorIterateColumns: ClassVar[Self]
kTableIteratorIterateDataLinks: ClassVar[Self]
kTableIteratorReverseOrder: ClassVar[Self]
kTableIteratorSkipReadOnlyContent: ClassVar[Self]
kTableIteratorSkipReadOnlyFormat: ClassVar[Self]
kTableIteratorSkipMerged: ClassVar[Self]
class TableStyle Class
def __init__(self) -> None:
AcDbTableStyle class objects are used to store the table formatting properties (for
example, grid visibility, lineweight, line color, and cell font, height, color, and
background fill) used by AcDbTable entities. AcDbTableStyle objects are stored in the
ACAD_TABLESTYLE dictionary within the named object dictionary of AcDbDatabase. Because
tables appear in a variety of forms, table objects will be based on a table style similar
to the way text objects and dimension objects are based on styles in AutoCAD. The table
style controls the initial formatting of a newly created table object and whether the table
includes a title and header row.
def __init__(self, id: PyDb.ObjectId) -> None:
AcDbTableStyle class objects are used to store the table formatting properties (for
example, grid visibility, lineweight, line color, and cell font, height, color, and
background fill) used by AcDbTable entities. AcDbTableStyle objects are stored in the
ACAD_TABLESTYLE dictionary within the named object dictionary of AcDbDatabase. Because
tables appear in a variety of forms, table objects will be based on a table style similar
to the way text objects and dimension objects are based on styles in AutoCAD. The table
style controls the initial formatting of a newly created table object and whether the table
includes a title and header row.
def __init__(self, id: PyDb.ObjectId, mode: PyDb.OpenMode) -> None:
AcDbTableStyle class objects are used to store the table formatting properties (for
example, grid visibility, lineweight, line color, and cell font, height, color, and
background fill) used by AcDbTable entities. AcDbTableStyle objects are stored in the
ACAD_TABLESTYLE dictionary within the named object dictionary of AcDbDatabase. Because
tables appear in a variety of forms, table objects will be based on a table style similar
to the way text objects and dimension objects are based on styles in AutoCAD. The table
style controls the initial formatting of a newly created table object and whether the table
includes a title and header row.
def __init__(self, id: PyDb.ObjectId, mode: PyDb.OpenMode, erased: bool) -> None:
AcDbTableStyle class objects are used to store the table formatting properties (for
example, grid visibility, lineweight, line color, and cell font, height, color, and
background fill) used by AcDbTable entities. AcDbTableStyle objects are stored in the
ACAD_TABLESTYLE dictionary within the named object dictionary of AcDbDatabase. Because
tables appear in a variety of forms, table objects will be based on a table style similar
to the way text objects and dimension objects are based on styles in AutoCAD. The table
style controls the initial formatting of a newly created table object and whether the table
includes a title and header row.
def __init__(*args) -> None:
AcDbTableStyle class objects are used to store the table formatting properties (for
example, grid visibility, lineweight, line color, and cell font, height, color, and
background fill) used by AcDbTable entities. AcDbTableStyle objects are stored in the
ACAD_TABLESTYLE dictionary within the named object dictionary of AcDbDatabase. Because
tables appear in a variety of forms, table objects will be based on a table style similar
to the way text objects and dimension objects are based on styles in AutoCAD. The table
style controls the initial formatting of a newly created table object and whether the table
includes a title and header row.
def __reduce__(self) -> Any:
def alignment(self, rowType: PyDb.RowType) -> CellAlignment:
def alignment(self, cellStyle: str) -> CellAlignment:
def alignment(*args) -> CellAlignment:
def backgroundColor(self, rowType: PyDb.RowType) -> Color:
def backgroundColor(self, cellStyle: str) -> Color:
def backgroundColor(*args) -> Color:
def bitFlags(self) -> int:
def cast(otherObject: PyRx.RxObject) -> TableStyle:
def cellClass(self, pszCellStyle: str) -> int:
def className() -> str:
def cloneFrom(otherObject: PyRx.RxObject) -> TableStyle:
def color(self, rowType: PyDb.RowType) -> Color:
def color(self, cellStyle: str) -> Color:
def color(*args) -> Color:
def copyCellStyle(self, pszSrcCellStyle: str, pszTargetCellStyle: str) -> None:
def createCellStyle(self) -> str:
def createCellStyle(self, pszCellStyle: str) -> str:
def createCellStyle(self, pszCellStyle: str, fromCellStyle: str) -> str:
def createCellStyle(*args) -> str:
def deleteCellStyle(self, pszCellStyle: str) -> None:
def desc() -> PyRx.RxClass:
Returns a pointer to the AcRxClass object representing the specific class, or most recent
parent class explicitly registered with ObjectARX of either the pointer type used to invoke
it or the class qualifier used with it. (Remember that when a static member function is
invoked via a pointer, the pointer type, not the object type, determines which
implementation of the function is invoked.) When working with a pointer to an object and
the proper AcRxClass object for the class of the object pointed to is desired, the
AcRxObject::isA() function should be used, since it is a virtual non-static method and is
therefore not pointer type dependent. Caching the value of the pointer returned by this
method is acceptable, provided the application knows that the AcRxClass object pointed to
by the returned pointer was created by an ObjectARX application that will not be unloaded.
def description(self) -> str:
def enableMergeAll(self, val: bool, pszCellStyle: str) -> None:
def flowDirection(self) -> TableFlowDirection:
def format(self) -> str:
def format(self, rowType: PyDb.RowType) -> str:
def format(self, cellStyle: str) -> str:
def format(*args) -> str:
def getCellStyles(self) -> list[str]:
def getDataType(self, rowType: PyDb.RowType) -> tuple[PyDb.ValueDataType, PyDb.ValueUnitType]:
def getDataType(self, cellStyle: str) -> tuple[PyDb.ValueDataType, PyDb.ValueUnitType]:
def getDataType(*args) -> tuple[PyDb.ValueDataType, PyDb.ValueUnitType]:
def getGridProperty(self, gridLineType: PyDb.GridLineType, pszCellStyle: str) -> object:
def getName(self) -> str:
def getTemplate(self) -> ObjectId:
def gridColor(self, gridLineType: PyDb.GridLineType, rowType: PyDb.RowType) -> Color:
def gridColor(self, gridLineType: PyDb.GridLineType, cellStyle: str) -> Color:
def gridColor(*args) -> Color:
def gridDoubleLineSpacing(self, gridLineType: PyDb.GridLineType, pszCellStyle: str) -> float:
def gridLineStyle(self, gridLineType: PyDb.GridLineType, pszCellStyle: str) -> GridLineStyle:
def gridLineWeight(self, gridLineType: PyDb.GridLineType, rowType: PyDb.RowType) -> LineWeight:
def gridLineWeight(self, gridLineType: PyDb.GridLineType, cellStyle: str) -> LineWeight:
def gridLineWeight(*args) -> LineWeight:
def gridLinetype(self, gridLineType: PyDb.GridLineType, pszCellStyle: str) -> ObjectId:
def gridVisibility(self, gridLineType: PyDb.GridLineType, rowType: PyDb.RowType) -> Visibility:
def gridVisibility(self, gridLineType: PyDb.GridLineType, cellStyle: str) -> Visibility:
def gridVisibility(*args) -> Visibility:
def horzCellMargin(self) -> float:
def isBackgroundColorNone(self, rowType: PyDb.RowType) -> bool:
def isCellStyleInUse(self, pszCellStyle: str) -> bool:
def isHeaderSuppressed(self) -> bool:
def isMergeAllEnabled(self, pszCellStyle: str) -> bool:
def isTitleSuppressed(self) -> bool:
def margin(self, nMargin: PyDb.CellMargin, pszCellStyle: str) -> float:
def numCellStyles(self) -> int:
def postTableStyleToDb(self, db: PyDb.Database, styleName: str) -> ObjectId:
def removeTemplate(self) -> ObjectId:
def renameCellStyle(self, pszOldName: str, pszNewName: str) -> None:
def rotation(self, pszCellStyle: str) -> float:
def setAlignment(self, val: PyDb.CellAlignment, rowType: PyDb.RowType) -> None:
def setAlignment(self, val: PyDb.CellAlignment, cellStyle: str) -> None:
def setAlignment(*args) -> None:
def setBackgroundColor(self, val: PyDb.Color, rowType: PyDb.RowType) -> None:
def setBackgroundColor(self, val: PyDb.Color, cellStyle: str) -> None:
def setBackgroundColor(*args) -> None:
def setBackgroundColorNone(self, val: bool, rowType: PyDb.RowType) -> None:
def setBitFlags(self, flags: int) -> None:
def setCellClass(self, val: int, pszCellStyle: str) -> None:
def setColor(self, val: PyDb.Color, rowType: PyDb.RowType) -> None:
def setColor(self, val: PyDb.Color, cellStyle: str) -> None:
def setColor(*args) -> None:
def setDataType(self, nDataType: PyDb.ValueDataType, nUnitType: PyDb.ValueDataType) -> None:
def setDataType(self, nDataType: PyDb.ValueDataType, nUnitType: PyDb.ValueDataType, rowType: PyDb.RowType) -> None:
def setDataType(self, nDataType: PyDb.ValueDataType, nUnitType: PyDb.ValueDataType, cellStyle: str) -> None:
def setDataType(*args) -> None:
def setDescription(self, val: str) -> None:
def setFlowDirection(self, val: PyDb.TableFlowDirection) -> None:
def setFormat(self, sFormat: str) -> None:
def setFormat(self, sFormat: str, rowType: PyDb.RowType) -> None:
def setFormat(self, sFormat: str, cellStyle: str) -> None:
def setFormat(*args) -> None:
def setGridColor(self, clr: PyDb.Color, gridLineType: PyDb.GridLineType, rowType: PyDb.RowType) -> None:
def setGridColor(self, clr: PyDb.Color, gridLineType: PyDb.GridLineType, cellStyle: str) -> None:
def setGridColor(*args) -> None:
def setGridDoubleLineSpacing(self, val: float, gridLineTypes: PyDb.GridLineType, pszCellStyle: str) -> None:
def setGridLineStyle(self, nLineStyle: PyDb.GridLineStyle, gridLineType: PyDb.GridLineType, pszCellStyle: str) -> None:
def setGridLineWeight(self, lineWeight: PyDb.LineWeight, gridLineType: PyDb.GridLineType, rowType: PyDb.RowType) -> None:
def setGridLineWeight(self, lineWeight: PyDb.LineWeight, gridLineType: PyDb.GridLineType, cellStyle: str) -> None:
def setGridLineWeight(*args) -> None:
def setGridLinetype(self, id: PyDb.ObjectId, gridLineType: PyDb.GridLineType, pszCellStyle: str) -> None:
def setGridProperty(self, gridProp: PyDb.GridProperty, gridLineType: PyDb.GridLineType, pszCellStyle: str) -> None:
def setGridVisibility(self, vis: PyDb.Visibility, gridLineType: PyDb.GridLineType, rowType: PyDb.RowType) -> None:
def setGridVisibility(self, vis: PyDb.Visibility, gridLineType: PyDb.GridLineType, cellStyle: str) -> None:
def setGridVisibility(*args) -> None:
def setHorzCellMargin(self, val: float) -> None:
def setMargin(self, nMargins: PyDb.CellMargin, val: float, pszCellStyle: str) -> None:
def setName(self, val: str) -> None:
def setRotation(self, val: float, pszCellStyle: str) -> None:
def setTemplate(self, id: PyDb.ObjectId, nOption: PyDb.MergeCellStyleOption) -> None:
def setTextHeight(self, val: float, rowType: PyDb.RowType) -> None:
def setTextHeight(self, val: float, cellStyle: str) -> None:
def setTextHeight(*args) -> None:
def setTextStyle(self, id: PyDb.ObjectId, rowType: PyDb.RowType) -> None:
def setTextStyle(self, id: PyDb.ObjectId, cellStyle: str) -> None:
def setTextStyle(*args) -> None:
def setVertCellMargin(self, val: float) -> None:
def suppressHeaderRow(self, val: bool) -> None:
def suppressTitleRow(self, val: bool) -> None:
def textHeight(self, rowType: PyDb.RowType) -> float:
def textHeight(self, cellStyle: str) -> float:
def textHeight(*args) -> float:
def textStyle(self, rowType: PyDb.RowType) -> ObjectId:
def textStyle(self, cellStyle: str) -> ObjectId:
def textStyle(*args) -> ObjectId:
def vertCellMargin(self) -> float:
class Text Class
def __init__(self) -> None:
def __init__(self, position: PyGe.Point3d, text: str) -> None:
def __init__(self, position: PyGe.Point3d, text: str, height: float, rotation: float) -> None:
def __init__(self, id: PyDb.ObjectId) -> None:
def __init__(self, id: PyDb.ObjectId, mode: PyDb.OpenMode) -> None:
def __init__(self, id: PyDb.ObjectId, mode: PyDb.OpenMode, erased: bool) -> None:
def __init__(*args) -> None:
def __reduce__(self) -> Any:
def adjustAlignment(self, val: Database) -> None:
Normally when a text entity is closed, the text's position and alignment points are
adjusted according to the text's justification settings and the text style. But, if the
text entity is embedded in another entity, it will never be closed in which case it won't
automatically be adjusted. Or, if the text is added to a transaction before it's first
close(), and the graphics are flushed to the screen before the outermost transaction ends,
the text will be displayed before the automatic adjustment takes place. This method allows
a way to cause the text to be adjusted on non-database resident text entities or text
entities within transactions. If the text entity is not database resident, then pDb must
not be NULL, otherwise Acad::eNoDatabase will be returned. If the text entity is database
resident, then the entity's database will be used regardless of the value of pDb. When this
method is called, the database used must also be the current working database (as returned
by acdbHostApplicationServices()->workingDatabase()), the text entity must have non-NULL
text string data and a valid text style objectId that resides in the database being used,
otherwise Acad::eInvalidContext will be returned. Returns Acad::eOk if successful.
def alignmentPoint(self) -> PyGe.Point3d:
This function returns the alignment point of the text. If vertical mode is AcDb::kTextBase
and horizontal mode is either AcDb::kTextLeft, AcDb::kTextAlign, or AcDb::kTextFit, then
the position point (DXF group code 10) is the insertion point for the text object and, for
AcDb::kTextLeft, the alignment point is automatically calculated based on the other
parameters in the text object. For all other vertical and horizontal mode combinations, the
alignment point is used as the insertion point of the text and the position point is
automatically calculated based on the other parameters in the text object. The alignment
point value is the WCS equivalent of DXF group code 11.
def cast(otherObject: PyRx.RxObject) -> Text:
def className() -> str:
def cloneFrom(otherObject: PyRx.RxObject) -> Text:
def convertFieldToText(self) -> None:
If the text contains fields, this function converts them to text and removes the fields. It
does not evaluate the fields before converting them. Returns Acad::eOk if successful.
Returns Acad::eNotApplicable if there is no field. Otherwise, returns an AutoCAD error
status.
def correctSpelling(self) -> int:
This function runs the spell checker on the text to correct any spelling errors. The spell
checker is an AutoCAD-specific function, so this method may not be implemented for other
AcDb library uses. Returns 0 if completed successfully (with errors fixed or no errors
found), otherwise returns 1.
def desc() -> PyRx.RxClass:
Returns a pointer to the AcRxClass object representing the specific class, or most recent
parent class explicitly registered with ObjectARX of either the pointer type used to invoke
it or the class qualifier used with it. (Remember that when a static member function is
invoked via a pointer, the pointer type, not the object type, determines which
implementation of the function is invoked.) When working with a pointer to an object and
the proper AcRxClass object for the class of the object pointed to is desired, the
AcRxObject::isA() function should be used, since it is a virtual non-static method and is
therefore not pointer type dependent. Caching the value of the pointer returned by this
method is acceptable, provided the application knows that the AcRxClass object pointed to
by the returned pointer was created by an ObjectARX application that will not be unloaded.
def direction(self) -> PyGe.Vector3d:
Returns an AcGeVector3d (in WCS) representing the X axis ('horizontal') for the text. This
direction vector is used to determine the text flow direction.
def getBoundingPoints(self) -> list[PyGe.Point3d]:
Gets an array of AcGePoint3d objects that represent two corners of the bounding box for the
AcDbText object.
def height(self) -> float:
This function returns the height of the text. The height value is used as a scale factor
for both height and width of the text. In addition, the width factor is applied to the text
width. The height value is used for DXF group code 40.
def hitTest(self, val: PyGe.Point3d) -> bool:
This function tests for the existence of an AcDbText object in a specified location when
the TEXTGAPSELECTION system variable is enabled.
def horizontalMode(self) -> TextHorzMode:
This function returns the horizontal mode of the text. The possible return values
are:AcDb::kTextLeftAcDb::kTextCenterAcDb::kTextRightAcDb::kTextAlignAcDb::kTextMidAcDb::kTextFitThe
horizontal mode is used for DXF group code 72.
def isDefaultAlignment(self) -> bool:
This function returns Adesk::kTrue if the text is in a default alignment. Default alignment
is when horizontal mode is AcDb::kTextLeft and vertical mode is AcDb::kTextBase, or when
horizontal mode is AcDb::kTextMiddle.
def isMirroredInX(self) -> bool:
This function returns Adesk::kTrue if the text is mirrored in the X direction (that is, it
appears backward in the horizontal direction). If the text is not mirrored, then
Adesk::kFalse is returned. This value is used for bit 2 in DXF group code 71.
def isMirroredInY(self) -> bool:
This function returns Adesk::kTrue if the text is mirrored in the Y direction (that is, it
appears to be upside down). If the text is not mirrored, then Adesk::kFalse is returned.
This value is used for bit 4 in DXF group code 71.
def justification(self) -> TextAlignment:
Returns a constant value of the AcTextAlignment enum type that represents the justification
of the text object.
def mirrorInX(self, val: bool) -> None:
If mirror is Adesk::kTrue, the text is displayed so that it appears to be mirrored in the X
direction (that is, it appears to be backward in the horizontal direction). If mirror is
Adesk::kFalse, then the text appears in the forward direction. This value is used for bit 2
in DXF group code 71. Returns Acad::eOk if successful or Acad::eInvalidInput if the data
passed in is not acceptable.
def mirrorInY(self, val: bool) -> None:
If invert is Adesk::kTrue, then the text is displayed so that it appears to be mirrored in
the Y direction (that is, it appears to be upside down). If invert is Adesk::kFalse, then
the text appears right side up. This value is used for bit 4 in DXF group code 71. Returns
Acad::eOk if successful or Acad::eInvalidInput if the data passed in is not acceptable.
def normal(self) -> PyGe.Vector3d:
This function returns the normal vector of the plane containing the text. The normal vector
is in WCS coordinates. The normal value is used for DXF group code 210.
def oblique(self) -> float:
This function returns the oblique angle (in radians) of the text. The obliquing angle is
the angle from the text's vertical; that is, the top of the text 'slants' relative to the
bottom, the same as the slope in this italic text. Positive angles slant characters forward
at their tops. Negative angles have 2pi added to them to convert them to their positive
equivalent. The oblique value is used for DXF group code 51.
def position(self) -> PyGe.Point3d:
This function returns the insertion point of the text in WCS coordinates. If vertical mode
is AcDb::kTextBase and horizontal mode is either AcDb::kTextLeft, AcDb::kTextAlign, or
AcDb::kTextFit, then the position point is the insertion point for the text object and, for
AcDb::kTextLeft, the alignment point (DXF group code 11) is automatically calculated based
on the other parameters in the text object. For all other vertical and horizontal mode
combinations, the alignment point is used as the insertion point of the text and the
position point is automatically calculated based on the other parameters in the text
object. The position value is the WCS equivalent of DXF group code 10.
def rotation(self) -> float:
This function returns the rotation angle of the text. The rotation angle is relative to the
X axis of the text's OCS, with positive angles going counterclockwise when looking down the
Z axis towards the origin. The OCS X axis is determined by using the text's normal, the WCS
Z axis, and the arbitrary axis algorithm. The rotation value is used for DXF group code 50.
def setAlignmentPoint(self, val: PyGe.Point3d) -> None:
This function sets pt to be the alignment point for the text object. If vertical mode is
AcDb::kTextBase and horizontal mode is either AcDb::kTextLeft, AcDb::kTextAlign, or
AcDb::kTextFit, then the position point (DXF group code 10) is the insertion point for the
text object and, for AcDb::kTextLeft, the alignment point is automatically calculated based
on the other parameters in the text object. Any setting made by this function are replaced
by the newly calculated value. For all other vertical and horizontal mode combinations, the
alignment point is used as the insertion point of the text and the position point is
automatically calculated based on the other parameters in the text object. The alignment
point value is the WCS equivalent of DXF group code 11. Returns Acad::eOk if successful, or
Acad::eNotApplicable if the text object's horizontal mode is AcDb::kTextLeft and vertical
mode is AcDb::kTextBase.
def setHeight(self, val: float) -> None:
This function sets ht to be the height of the text. The height value is used as a scale
factor for both height and width of the text. In addition, the width factor is applied to
the text width. The height value is used for DXF group code 40. Returns Acad::eOk if
successful or Acad::eInvalidInput if the input value is less than or equal to 0.0.
def setHorizontalMode(self, val: PyDb.TextHorzMode) -> None:
This function sets hMode to be the horizontal mode of the text. The allowable values for
hMode are: AcDb::kTextLeft AcDb::kTextCenter AcDb::kTextRight AcDb::kTextAlign
AcDb::kTextMid AcDb::kTextFit The horizontal mode is used for DXF group code 72. Returns
Acad::eOk if successful or Acad::eInvalidInput if the data passed in is not acceptable.
WarningIf horizontalMode is set to any value other than AcDb::kTextLeft, then the text
object's alignment point is used to determine the text's position. The position point is
recalculated based on the text string and the alignment point's value. If horizontalMode is
AcDb::kTextLeft, then the position point is used to determine the text's position and the
alignment point is recalculated based on the text string and the position point's value.
def setJustification(self, val: PyDb.TextAlignment) -> None:
Sets the justification for the text object.
def setNormal(self, val: PyGe.Vector3d) -> None:
This function sets normal to be the normal vector for the plane containing the text. normal
must be non-zero in length. The normal value is used for DXF group code 210. Returns
Acad::eOk if successful or Acad::eInvalidInput if the data passed in is not acceptable.
def setOblique(self, val: float) -> None:
This function sets angle (in radians) to be the obliquing angle for the text. The obliquing
angle is the angle from the text's vertical; that is, the top of the text 'slants' relative
to the bottom--the same as the slope in this italic text. Positive angles slant characters
forward at their tops. Negative angles have 2pi added to them to convert them to their
positive equivalent. The oblique value is used for DXF group code 51. Returns Acad::eOk if
successful or Acad::eInvalidInput if the data passed in is not acceptable.
def setPosition(self, pos: PyGe.Point3d) -> None:
This function sets pos to be the position point for the text. pos must be in WCS
coordinates. If vertical mode is AcDb::kTextBase and horizontal mode is either
AcDb::kTextLeft, AcDb::kTextAlign, or AcDb::kTextFit, then the position point is the
insertion point for the text object and, for AcDb::kTextLeft, the alignment point (DXF
group code 11) is automatically calculated based on the other parameters in the text
object. For all other vertical and horizontal mode combinations, the alignment point is
used as the insertion point of the text. The position point is automatically calculated
based on the other parameters in the text object. Any setting made by this function is
replaced by the newly calculated value. The position value is the WCS equivalent of DXF
group code 10. Returns Acad::eOk if successful.
def setRotation(self, val: float) -> None:
This function sets rotation to be the rotation angle of the text. The rotation angle is
relative to the X axis of the text's OCS, with positive angles going counterclockwise when
looking down the Z axis toward the origin. The OCS X axis is determined by using the text's
normal vector, the WCS Z axis, and the arbitrary axis algorithm. The rotation value is used
for DXF group code 50. Returns Acad::eOk if successful or Acad::eInvalidInput if the data
passed in is not acceptable.
def setTextString(self, val: str) -> None:
This function makes a copy of newText and uses the copy as the text string to display. The
string must be a standard null-terminated string and cannot be more than 256 bytes long
(not including the null terminator). Unicode, multicode, and the AutoCAD special characters
(%%d, %%p, etc.) are supported in the same fashion as they are when entering a text string
at the AutoCAD command line for the text or dtext commands. The text string is used for DXF
group code 1. Returns Acad::eOk if successful or Acad::eInvalidInput if the data passed in
is not acceptable.
def setTextStyle(self, val: ObjectId) -> None:
This function sets styleId as the object ID of the AcDbTextStyleTableRecord to be
referenced by the AcDbText object. styleId must be the object ID of an
AcDbTextStyleTableRecord in the same AcDbDatabase as the AcDbText object. The text style
name within the AcDbTextStyleTableRecord specified by the text style object ID is used for
DXF group code 7.
def setThickness(self, val: float) -> None:
This function sets thickness to be the thickness for the text. The thickness is the text's
dimension along its normal vector direction (sometimes called the extrusion direction). The
thickness value is used for DXF group code 39. Returns Acad::eOk if successful or
Acad::eInvalidInput if the data passed in is not acceptable.
def setVerticalMode(self, val: PyDb.TextVertMode) -> None:
This function sets vMode to be the vertical mode of the text. The allowable values for
vMode are: AcDb::kTextBase AcDb::kTextBottom AcDb::kTextVertMid AcDb::kTextTop The vertical
mode is used for DXF group code 73. Returns Acad::eOk if successful or Acad::eInvalidInput
if the data passed in is not acceptable. WarningIf verticalMode is set to any value other
than AcDb::kTextBase, then the text object's alignment point is used to determine the
text's position. The position point is recalculated based on the text string and the
alignment point's value. If verticalMode is AcDb::kTextBase, then the position point is
used to determine the text's position. The alignment point is recalculated based on the
text string and the position point's value.
def setWidthFactor(self, val: float) -> None:
This function sets width to be the width factor (also referred to as the relative X-scale
factor) for the text. The widthFactor is applied to the text's width to allow the width to
be adjusted independently of the height. For example, if the widthFactor value is 0.8, then
the text is drawn with a width that is 80% of its normal 'unadjusted' width. For text
created by AutoCAD, the width factor is used to adjust the text width if the text is
referencing a text style that has a width other than 1.0, or the text's horizontal mode is
AcDb::kTextFit. The width factor value is used for DXF group code 41. Returns Acad::eOk if
successful or Acad::eInvalidInput if the data passed in is not acceptable.
def textString(self) -> str:
This function returns a copy of the null-terminated text string used by the AcDbText
object. The text string can be up to 256 bytes long (not including the null terminator).
The application calling this function is responsible for releasing the memory used by the
returned string. The text string is used for DXF group code 1.
def textStyle(self) -> ObjectId:
This function returns the object ID of the AcDbTextStyleTableRecord in used by the AcDbText
object. If no text style has been set yet, then AcDbObjectId::kNull is returned.
def thickness(self) -> float:
This function returns the thickness of the text. The thickness is the text's dimension
along its normal vector direction (sometimes called the extrusion direction). The thickness
value is used for DXF group code 39.
def verticalMode(self) -> TextVertMode:
This function returns the vertical mode of the text. The possible return values
are:AcDb::kTextBaseAcDb::kTextBottomAcDb::kTextVertMidAcDb::kTextTopThe vertical mode is
used for DXF group code 73.
def widthFactor(self) -> float:
This function returns the width factor (also referred to as the relative X-scale factor)
for the text. The widthFactor is applied to the text's width to allow the width to be
adjusted independently of the height. For example, if the widthFactor value is 0.8, then
the text is drawn with a width that is 80% of its normal 'unadjusted' width. For text
created by AutoCAD, the width factor is used to adjust the text width if the text is
referencing a text style that has a width other than 1.0, or if the text's horizontal mode
is AcDb::kTextFit. The width factor value is used for DXF group code 41.
class TextAlignment Class
kTextAlignmentLeft: ClassVar[Self]
kTextAlignmentCenter: ClassVar[Self]
kTextAlignmentRight: ClassVar[Self]
kTextAlignmentAligned: ClassVar[Self]
kTextAlignmentMiddle: ClassVar[Self]
kTextAlignmentFit: ClassVar[Self]
kTextAlignmentTopLeft: ClassVar[Self]
kTextAlignmentTopCenter: ClassVar[Self]
kTextAlignmentTopRight: ClassVar[Self]
kTextAlignmentMiddleLeft: ClassVar[Self]
kTextAlignmentMiddleCenter: ClassVar[Self]
kTextAlignmentMiddleRight: ClassVar[Self]
kTextAlignmentBottomLeft: ClassVar[Self]
kTextAlignmentBottomCenter: ClassVar[Self]
kTextAlignmentBottomRight: ClassVar[Self]
class TextHorzMode Class
kTextLeft: ClassVar[Self]
kTextCenter: ClassVar[Self]
kTextRight: ClassVar[Self]
kTextAlign: ClassVar[Self]
kTextMid: ClassVar[Self]
kTextFit: ClassVar[Self]
class TextStyleTable Class
def __init__(self, id: PyDb.ObjectId, mode: PyDb.OpenMode, erased: bool) -> None:
def __reduce__(self) -> Any:
def add(self, val: PyDb.TextStyleTableRecord) -> ObjectId:
This function adds the record pointed to by pRecord to both the database containing the
table and the table itself. Possible return ErrorStatus codes are: Acad::eOk,
Acad::eOutOfMemory, Acad::eDuplicateRecordName, Acad::eNoDatabase (if the TextStyleTable is
not in a database).
def cast(otherObject: PyRx.RxObject) -> TextStyleTable:
def className() -> str:
def cloneFrom(otherObject: PyRx.RxObject) -> TextStyleTable:
def desc() -> PyRx.RxClass:
Returns a pointer to the AcRxClass object representing the specific class, or most recent
parent class explicitly registered with ObjectARX of either the pointer type used to invoke
it or the class qualifier used with it. (Remember that when a static member function is
invoked via a pointer, the pointer type, not the object type, determines which
implementation of the function is invoked.) When working with a pointer to an object and
the proper AcRxClass object for the class of the object pointed to is desired, the
AcRxObject::isA() function should be used, since it is a virtual non-static method and is
therefore not pointer type dependent. Caching the value of the pointer returned by this
method is acceptable, provided the application knows that the AcRxClass object pointed to
by the returned pointer was created by an ObjectARX application that will not be unloaded.
class TextStyleTableRecord Class
def __init__(self) -> None:
Objects of this class represent the records that are found in the AcDbTextStyleTable (known
as the 'Style' table in DXF). Each of these records represents a specific set of text
parameters such as font, default size, relative x scaling, vertical or horizontal, etc.
def __init__(self, id: PyDb.ObjectId) -> None:
Objects of this class represent the records that are found in the AcDbTextStyleTable (known
as the 'Style' table in DXF). Each of these records represents a specific set of text
parameters such as font, default size, relative x scaling, vertical or horizontal, etc.
def __init__(self, id: PyDb.ObjectId, mode: PyDb.OpenMode) -> None:
Objects of this class represent the records that are found in the AcDbTextStyleTable (known
as the 'Style' table in DXF). Each of these records represents a specific set of text
parameters such as font, default size, relative x scaling, vertical or horizontal, etc.
def __init__(self, id: PyDb.ObjectId, mode: PyDb.OpenMode, erased: bool) -> None:
Objects of this class represent the records that are found in the AcDbTextStyleTable (known
as the 'Style' table in DXF). Each of these records represents a specific set of text
parameters such as font, default size, relative x scaling, vertical or horizontal, etc.
def __init__(*args) -> None:
Objects of this class represent the records that are found in the AcDbTextStyleTable (known
as the 'Style' table in DXF). Each of these records represents a specific set of text
parameters such as font, default size, relative x scaling, vertical or horizontal, etc.
def __reduce__(self) -> Any:
def bigFontFileName(self) -> str:
Returns the name of the big font file for this text style. The bigfont file name is used
for DXF group code 4.
def cast(otherObject: PyRx.RxObject) -> TextStyleTableRecord:
def className() -> str:
def cloneFrom(otherObject: PyRx.RxObject) -> TextStyleTableRecord:
def desc() -> PyRx.RxClass:
Returns a pointer to the AcRxClass object representing the specific class, or most recent
parent class explicitly registered with ObjectARX of either the pointer type used to invoke
it or the class qualifier used with it. (Remember that when a static member function is
invoked via a pointer, the pointer type, not the object type, determines which
implementation of the function is invoked.) When working with a pointer to an object and
the proper AcRxClass object for the class of the object pointed to is desired, the
AcRxObject::isA() function should be used, since it is a virtual non-static method and is
therefore not pointer type dependent. Caching the value of the pointer returned by this
method is acceptable, provided the application knows that the AcRxClass object pointed to
by the returned pointer was created by an ObjectARX application that will not be unloaded.
def fileName(self) -> str:
Returns the name of the font file for this text style. The font file name is used for DXF
group code 3.
def flagBits(self) -> int:
Returns the textStyleflagBits value. Only the second and third bits are used. If the second
bit is set it indicates that the text is drawn backward (that is, mirrored in X). If the
third bit is set it indicates that the text is drawn upside down (that is, mirrored in Y).
The flagBits are used for DXF group code 71.
def font(self) -> tuple:
Returns the font definition data from the text style record. The returned values are the
typeface, the bold and italics style attributes, the character set, and the pitch and
family attributes. If the TextStyleTableRecord is not using a Windows font (that is, if
it's using an SHX font), then sTypeface is NULL, bold and italic are Adesk::kFalse, and
charset and pitchAndFamily are 0.
def isShapeFile(self) -> bool:
This returns Adesk::kTrue when the text font file is interpreted as a shape record,
otherwise it returns Adesk::kFalse when it is interpreted as a text record. The isShapeFile
value is represented in bit 1 of DXF group code 70 (if bit 1 is set then the style
describes a shape).
def isVertical(self) -> bool:
Returns Adesk::kTrue if and only if text drawn with this text style is drawn vertically.
The isVertical value is represented in bit 3 of DXF group code 70 (if bit 3 is set then the
text is vertical).
def obliquingAngle(self) -> float:
Returns the obliquing angle for the TextStyleTableRecord. The obliquing angle is the angle
from the text's vertical; that is, the top of the text 'slants' relative to the bottom--the
same as the slope in this italic text. Positive angles slant characters forward at their
tops. Negative angles have 2pi added to them to convert them to their positive equivalent.
The obliquing angle is used for DXF group code 50.
def priorSize(self) -> float:
Returns the text height used for the last text created using this Text Style. This value is
updated automatically by AutoCAD after the creation of any text object that references this
TextStyleTableRecord. If the textSize value for this textStyle is 0, then the priorSize
value is used by AutoCAD as the default text height for the next text created using this
Text Style. This value is not changed by an entmake of text nor by an entmod. It is
automatically changed by the use of the text command. It will only be automatically changed
if the textSize is set to 0 so that users are prompted for a height. The priorSize value is
used for DXF group code 42
def setBigFontFileName(self, val: str) -> None:
Sets the TextStyleRecord to use a copy of the string pointed to by filename as the name of
the big font file for this text style. Returns Acad::eOk if successful. If there is
insufficient memory for the string copy, then Acad::eOutOfMemory is returned. The bigfont
file name is used for DXF group code 4.
def setFileName(self, val: str) -> None:
Sets the TextStyleRecord to use a copy of the string pointed to by filename as the name of
the font file for this text style in the case that the big font file is not supplied.
Returns Acad::eOk if successful. If there is insufficient memory for the string copy, then
Acad::eOutOfMemory is returned. The font file name is used for DXF group code 3.
def setFlagBits(self, flag: int) -> None:
Sets flagBits to be the TextStyleTableRecord's flagBits value. Only the second and third
bits are used. If the second bit is set it indicates that the text is drawn backward (that
is, mirrored in X). If the third bit is set it indicates that the text is drawn upside down
(that is, mirrored in Y). The flagBits are used for DXF group code 71!
def setFont(self, tFace: str, bold: bool, italic: bool, charset: int, pitch: int, family: int, allowMissing: bool) -> None:
This method sets the TextStyleTableRecord to use the Windows font as specified by the
passed in arguments. If pTypeFace == NULL or points to an empty string, and the other
arguments are Adesk::kFalse or 0 (as appropriate), then all existing Windows font
information in this TextStyleTableRecord is removed from the record. If the font is not
installed on the system, then the bAllowMissingFont argument determines whether or not this
method will set the font information into the TextStyleTableRecord.WarningThis method
should not be used to set an old style SHX font. To set the TextStyleTableRecord to use an
SHX font, you need to use the AcDbTextStyleTableRecord::setFileName() method.
def setIsShapeFile(self, val: bool) -> None:
Passing Adesk::kTrue causes the text font file to be interpreted at as a shape file,
otherwise passing Adesk::kFalse causes it to be interpreted as a text font file. The
isShapeFile value is represented in bit 1 of DXF group code 70 (if bit 1 is set then the
style describes a shape).
def setIsVertical(self, val: bool) -> None:
Passing Adesk::kTrue causes text drawn with this text style to be drawn vertically. Passing
Adesk::kFalse causes text to be drawn horizontally. The isVertical value is represented in
bit 3 of DXF group code 70 (if bit 3 is set then the text is vertical).
def setObliquingAngle(self, val: float) -> None:
This function sets obliquingAngle (in radians) to be the obliquing angle for the
TextStyleTableRecord. The obliquing angle is the angle from the text's vertical; that is,
the top of the text 'slants' relative to the bottom--the same as the slope in this italic
text. Positive angles slant characters forward at their tops. Negative angles have 2pi
added to them to convert them to their positive equivalent. The obliquing angle is used for
DXF group code 50. Returns Acad::eOk if successful. Returns Acad::eInvalidInput if
obliquingAngle is not a valid value.
def setPriorSize(self, val: int) -> None:
Sets priorSize to be the priorSize value for the TextStyleTableRecord. This value
represents the text height used for the last text created using this Text Style. This value
is updated automatically by AutoCAD after the creation of any text object that references
this TextStyleTableRecord. If the textSize value for this Text Style is 0, then the
priorSize value is used by AutoCAD as the default text height for the next text created
using this Text Style. The priorSize value is used for DXF group code 42 Returns Acad::eOk
if successful. Returns Acad::eInvalidInput if obliquingAngle is not a valid value.
def setTextSize(self, val: float) -> None:
Sets size to be the default size of the text drawn with this textStyle. If the text size is
set to 0, then each use of the AutoCAD text and dtext commands prompt for a text height to
use in creating the text entity. If textSize is non-zero, the text and dtext commands will
not prompt for a text height and will use this value. The text size is used for DXF group
code 40. If size is negative, the function returns Acad::eInvalidInput.
def setXScale(self, val: float) -> None:
This function sets xScale to be the width factor (also referred to as the relative X-scale
factor) for the TextStyleTableRecord. The widthFactor is applied to the text's width to
allow the width to be adjusted independently of the height. For example, if the widthFactor
value is 0.8, then the text is drawn with a width that is 80% of its normal 'unadjusted'
width. The X-scale factor is used for DXF group code 41. If xScale is not positive, the
function returns Acad::eInvalidInput.
def textSize(self) -> float:
Returns the default text size for text drawn with this textStyle. If the text size value is
0, then each use of the AutoCAD text and dtext commands prompt for a text height to use in
creating the text entity. If textSize is non-zero, the text and dtext commands will not
prompt for a text height and will use this value. The text size is used for DXF group code
40.
def xScale(self) -> float:
This function returns the width factor (also referred to as the relative X-scale factor)
for the TextStyleTableRecord. The widthFactor is applied to the text's width to allow the
width to be adjusted independently of the height. For example, if the widthFactor value is
0.8, then the text is drawn with a width that is 80% of its normal 'unadjusted' width. The
X-scale factor is used for DXF group code 41.
class TextVertMode Class
kTextBase: ClassVar[Self]
kTextBottom: ClassVar[Self]
kTextVertMid: ClassVar[Self]
kTextTop: ClassVar[Self]
class TimeZone Class
kInternationalDateLine: ClassVar[Self]
kMidwayIsland: ClassVar[Self]
kHawaii: ClassVar[Self]
kAlaska: ClassVar[Self]
kPacific: ClassVar[Self]
kMountain: ClassVar[Self]
kArizona: ClassVar[Self]
kMazatlan: ClassVar[Self]
kCentral: ClassVar[Self]
kCentralAmerica: ClassVar[Self]
kMexicoCity: ClassVar[Self]
kSaskatchewan: ClassVar[Self]
kEastern: ClassVar[Self]
kIndiana: ClassVar[Self]
kBogota: ClassVar[Self]
kAtlanticCanada: ClassVar[Self]
kCaracas: ClassVar[Self]
kSantiago: ClassVar[Self]
kNewfoundland: ClassVar[Self]
kBrasilia: ClassVar[Self]
kBuenosAires: ClassVar[Self]
kGreenland: ClassVar[Self]
kMidAtlantic: ClassVar[Self]
kAzores: ClassVar[Self]
kCapeVerde: ClassVar[Self]
kUTC: ClassVar[Self]
kGMT: ClassVar[Self]
kMonrovia: ClassVar[Self]
kBerlin: ClassVar[Self]
kParis: ClassVar[Self]
kPrague: ClassVar[Self]
kSarajevo: ClassVar[Self]
kWestCentralAfrica: ClassVar[Self]
kAthens: ClassVar[Self]
kEasternEurope: ClassVar[Self]
kCairo: ClassVar[Self]
kHarare: ClassVar[Self]
kHelsinki: ClassVar[Self]
kJerusalem: ClassVar[Self]
kMoscow: ClassVar[Self]
kRiyadh: ClassVar[Self]
kBaghdad: ClassVar[Self]
kEastAfrica: ClassVar[Self]
kTehran: ClassVar[Self]
kAbuDhabi: ClassVar[Self]
kCaucasus: ClassVar[Self]
kKabul: ClassVar[Self]
kEkaterinburg: ClassVar[Self]
kIslamabad: ClassVar[Self]
kKolkata: ClassVar[Self]
kKathmandu: ClassVar[Self]
kAlmaty: ClassVar[Self]
kDhaka: ClassVar[Self]
kSriLanka: ClassVar[Self]
kRangoon: ClassVar[Self]
kBangkok: ClassVar[Self]
kKrasnoyarsk: ClassVar[Self]
kBeijing: ClassVar[Self]
kSingapore: ClassVar[Self]
kTaipei: ClassVar[Self]
kIrkutsk: ClassVar[Self]
kPerth: ClassVar[Self]
kTokyo: ClassVar[Self]
kSeoul: ClassVar[Self]
kYakutsk: ClassVar[Self]
kAdelaide: ClassVar[Self]
kDarwin: ClassVar[Self]
kSydney: ClassVar[Self]
kGuam: ClassVar[Self]
kBrisbane: ClassVar[Self]
kHobart: ClassVar[Self]
kVladivostock: ClassVar[Self]
kMagadan: ClassVar[Self]
kWellington: ClassVar[Self]
kFiji: ClassVar[Self]
kTonga: ClassVar[Self]
class Trace Class
def __init__(self) -> None:
The AcDbTrace class is the representation for the TRACE entity within AutoCAD.
def __init__(self, pnt0: PyGe.Point3d, pnt1: PyGe.Point3d, pnt2: PyGe.Point3d, pnt3: PyGe.Point3d) -> None:
The AcDbTrace class is the representation for the TRACE entity within AutoCAD.
def __init__(self, id: PyDb.ObjectId) -> None:
The AcDbTrace class is the representation for the TRACE entity within AutoCAD.
def __init__(self, id: PyDb.ObjectId, mode: PyDb.OpenMode) -> None:
The AcDbTrace class is the representation for the TRACE entity within AutoCAD.
def __init__(self, id: PyDb.ObjectId, mode: PyDb.OpenMode, erased: bool) -> None:
The AcDbTrace class is the representation for the TRACE entity within AutoCAD.
def __init__(*args) -> None:
The AcDbTrace class is the representation for the TRACE entity within AutoCAD.
def __reduce__(self) -> Any:
def cast(otherObject: PyRx.RxObject) -> Trace:
def className() -> str:
def cloneFrom(otherObject: PyRx.RxObject) -> Trace:
def desc() -> PyRx.RxClass:
Returns a pointer to the AcRxClass object representing the specific class, or most recent
parent class explicitly registered with ObjectARX of either the pointer type used to invoke
it or the class qualifier used with it. (Remember that when a static member function is
invoked via a pointer, the pointer type, not the object type, determines which
implementation of the function is invoked.) When working with a pointer to an object and
the proper AcRxClass object for the class of the object pointed to is desired, the
AcRxObject::isA() function should be used, since it is a virtual non-static method and is
therefore not pointer type dependent. Caching the value of the pointer returned by this
method is acceptable, provided the application knows that the AcRxClass object pointed to
by the returned pointer was created by an ObjectARX application that will not be unloaded.
def getPointAt(self, idx: int) -> PyGe.Point3d:
This function fills in pntRes with the value of the point in the trace whose index is
index. index can have a value of 0, 1, 2, or 3, depending on which point is desired (that
is, 0 for the first point, 1 for the second point, etc.). The returned point is in WCS
coordinates. Returns Acad::eOk if successful. If the index is not between 0 and 3, then
Acad::eInvalidIndex is returned. Point one is the WCS equivalent of DXF group code 10 Point
two is the WCS equivalent of DXF group code 11 Point three is the WCS equivalent of DXF
group code 12 Point four is the WCS equivalent of DXF group code 13
def normal(self) -> PyGe.Vector3d:
This function returns the unit normal vector of the plane containing the trace. The normal
value is used for DXF group code 210.
def setNormal(self, vec: PyGe.Vector3d) -> None:
This function sets normal to be the normal vector for the plane containing the trace.
normal must be non-zero in length. The normal value is used for DXF group code 210.
def setPointAt(self, idx: int, pt: PyGe.Point3d) -> None:
This function sets the idx'th point in the trace to the value pt. idx must be 0, 1, 2, or
3. pt must be in WCS coordinates. Returns Acad::eOk if successful. If the index is not
between 0 and 3 then Acad::eInvalidIndex is returned. Point one is the WCS equivalent of
DXF group code 10 Point two is the WCS equivalent of DXF group code 11 Point three is the
WCS equivalent of DXF group code 12 Point four is the WCS equivalent of DXF group code 13
def setThickness(self, val: float) -> None:
This function sets thickness to be the thickness for the trace. The thickness is the
trace's dimension along its normal vector direction (sometimes called the extrusion
direction). The thickness value is used for DXF group code 39.
def thickness(self) -> float:
This function returns the thickness of the trace. The thickness is the trace's dimension
along its normal vector direction (sometimes called the extrusion direction). The thickness
value is used for DXF group code 39.
class Transaction Class
def __init__() -> None:
Raises an exception.
This class cannot be instantiated from Python.
def __reduce__(self) -> Any:
def className() -> str:
def desc() -> PyRx.RxClass:
Returns a pointer to the AcRxClass object representing the specific class, or most recent
parent class explicitly registered with ObjectARX of either the pointer type used to invoke
it or the class qualifier used with it. (Remember that when a static member function is
invoked via a pointer, the pointer type, not the object type, determines which
implementation of the function is invoked.) When working with a pointer to an object and
the proper AcRxClass object for the class of the object pointed to is desired, the
AcRxObject::isA() function should be used, since it is a virtual non-static method and is
therefore not pointer type dependent. Caching the value of the pointer returned by this
method is acceptable, provided the application knows that the AcRxClass object pointed to
by the returned pointer was created by an ObjectARX application that will not be unloaded.
def getAllObjects(self) -> list[PyDb.DbObject]:
def getObject(self, id: ObjectId, mode: OpenMode, openErasedObject: bool) -> DbObject:
def numOpenedObjects(self) -> int:
class TransactionManager Class
def __init__(self) -> None:
There is a single object of class AcDbTransactionManager created by the ObjectARX system
when AutoCAD first starts up. This AcDbTransactionManager object is globally available to
all ObjectARX applications. The system AcDbTransactionManager object is used to start, end,
or terminate transactions. In addition, it provides functionality to manage transactions
and the objects within them. For more information on the transaction mechanism, see the
transaction section in the ObjectARX Developer's Guide.
def __reduce__(self) -> Any:
def abortTransaction(self) -> None:
def addNewlyCreatedDBRObject(self, obj: DbObject, add: bool) -> None:
def className() -> str:
def desc() -> PyRx.RxClass:
Returns a pointer to the AcRxClass object representing the specific class, or most recent
parent class explicitly registered with ObjectARX of either the pointer type used to invoke
it or the class qualifier used with it. (Remember that when a static member function is
invoked via a pointer, the pointer type, not the object type, determines which
implementation of the function is invoked.) When working with a pointer to an object and
the proper AcRxClass object for the class of the object pointed to is desired, the
AcRxObject::isA() function should be used, since it is a virtual non-static method and is
therefore not pointer type dependent. Caching the value of the pointer returned by this
method is acceptable, provided the application knows that the AcRxClass object pointed to
by the returned pointer was created by an ObjectARX application that will not be unloaded.
def endTransaction(self) -> None:
def getAllObjects(self) -> list[PyDb.DbObject]:
def getObject(self, id: ObjectId, mode: OpenMode, openErasedObject: bool) -> DbObject:
def numActiveTransactions(self) -> int:
def numOpenedObjects(self) -> int:
def queueForGraphicsFlush(self) -> None:
def startTransaction(self) -> Transaction:
def topTransaction(self) -> Transaction:
class Transparency Class
def __init__(self, alpha: int | float) -> None:
def __ne__(self) -> bool:
def __reduce__(self) -> Any:
def alpha(self) -> int:
def alphaPercent(self) -> float:
def isByAlpha(self) -> bool:
def isByBlock(self) -> bool:
def isByLayer(self) -> bool:
def isClear(self) -> bool:
def isInvalid(self) -> bool:
def isSolid(self) -> bool:
def setAlpha(self, alpha: int) -> None:
def setAlphaPercent(self, alphaPercent: float) -> None:
def setMethod(self, method: PyDb.TransparencyMethod) -> None:
class TransparencyMethod Class
kByLayer: ClassVar[Self]
kByBlock: ClassVar[Self]
kByAlpha: ClassVar[Self]
kErrorValue: ClassVar[Self]
class UCSTable Class
def __init__(self, id: PyDb.ObjectId, mode: PyDb.OpenMode, erased: bool) -> None:
def __reduce__(self) -> Any:
def add(self, val: PyDb.UCSTableRecord) -> ObjectId:
This function adds the record pointed to by pRecord to both the database containing the
table and the table itself. Possible return ErrorStatus codes are: Acad::eOk,
Acad::eOutOfMemory, Acad::eDuplicateRecordName, Acad::eNoDatabase (if the UCSTable is not
in a database).
def cast(otherObject: PyRx.RxObject) -> UCSTable:
def className() -> str:
def cloneFrom(otherObject: PyRx.RxObject) -> UCSTable:
def desc() -> PyRx.RxClass:
Returns a pointer to the AcRxClass object representing the specific class, or most recent
parent class explicitly registered with ObjectARX of either the pointer type used to invoke
it or the class qualifier used with it. (Remember that when a static member function is
invoked via a pointer, the pointer type, not the object type, determines which
implementation of the function is invoked.) When working with a pointer to an object and
the proper AcRxClass object for the class of the object pointed to is desired, the
AcRxObject::isA() function should be used, since it is a virtual non-static method and is
therefore not pointer type dependent. Caching the value of the pointer returned by this
method is acceptable, provided the application knows that the AcRxClass object pointed to
by the returned pointer was created by an ObjectARX application that will not be unloaded.
class UCSTableRecord Class
def __init__(self) -> None:
Objects of this class represent records in the AcDbUCSTable. Each of these records contains
the information about a user coordinate system (UCS) that has been saved in the drawing
database.
def __init__(self, id: PyDb.ObjectId) -> None:
Objects of this class represent records in the AcDbUCSTable. Each of these records contains
the information about a user coordinate system (UCS) that has been saved in the drawing
database.
def __init__(self, id: PyDb.ObjectId, mode: PyDb.OpenMode) -> None:
Objects of this class represent records in the AcDbUCSTable. Each of these records contains
the information about a user coordinate system (UCS) that has been saved in the drawing
database.
def __init__(self, id: PyDb.ObjectId, mode: PyDb.OpenMode, erased: bool) -> None:
Objects of this class represent records in the AcDbUCSTable. Each of these records contains
the information about a user coordinate system (UCS) that has been saved in the drawing
database.
def __init__(*args) -> None:
Objects of this class represent records in the AcDbUCSTable. Each of these records contains
the information about a user coordinate system (UCS) that has been saved in the drawing
database.
def __reduce__(self) -> Any:
def cast(otherObject: PyRx.RxObject) -> UCSTableRecord:
def className() -> str:
def cloneFrom(otherObject: PyRx.RxObject) -> UCSTableRecord:
def desc() -> PyRx.RxClass:
Returns a pointer to the AcRxClass object representing the specific class, or most recent
parent class explicitly registered with ObjectARX of either the pointer type used to invoke
it or the class qualifier used with it. (Remember that when a static member function is
invoked via a pointer, the pointer type, not the object type, determines which
implementation of the function is invoked.) When working with a pointer to an object and
the proper AcRxClass object for the class of the object pointed to is desired, the
AcRxObject::isA() function should be used, since it is a virtual non-static method and is
therefore not pointer type dependent. Caching the value of the pointer returned by this
method is acceptable, provided the application knows that the AcRxClass object pointed to
by the returned pointer was created by an ObjectARX application that will not be unloaded.
def origin(self) -> PyGe.Point3d:
Returns an AcGePoint3d, which contains WCS coordinates of the origin of the UCS that the
AcDbUCSTableRecord represents. The origin value is used for DXF group code 10.
def setOrigin(self, val: PyGe.Point3d) -> None:
Sets the AcDbUCSTableRecord to use newOrigin as the UCS origin point for the UCS it
represents. newOrigin must be in WCS coordinates. The newOrigin value is used for DXF group
code 10.
def setUcsBaseOrigin(self, val: PyGe.Point3d, view: PyDb.OrthographicView) -> None:
Sets the origin point of the input orthographic view when UCSBASE is set to this UCS. For
instance, if this UCS is named 'MYUCS' and UCSBASE is set to 'MYUCS', then after this
function has been called the command UCS/FRONT will change the UCS to the orthographic view
'FRONT' (relative to MYUCS) and the origin of the new UCS will be the origin point that is
passed into this function with the second parameter set to AcDb::kFrontView.
def setXAxis(self, val: PyGe.Vector3d) -> None:
Sets the AcDbUCSTableRecord to use xAxis as the new X axis for the UCS it represents. xAxis
must be in WCS coordinates and must have non-zero in length. The xAxis value is used for
DXF group code 11.
def setYAxis(self, val: PyGe.Vector3d) -> None:
Sets the AcDbUCSTableRecord to use yAxis as the new Y axis for the UCS it represents. yAxis
must be in WCS coordinates and must be non-zero in length. The yAxis value is used for DXF
group code 12.
def ucsBaseOrigin(self, view: PyDb.OrthographicView) -> PyGe.Point3d:
Returns the origin point of the input orthographic view when UCSBASE is set to this UCS.
For instance if this UCS is named 'MYUCS' and UCSBASE is set to 'MYUCS', then the command
UCS/FRONT will change the UCS to the orthographic view 'FRONT' (relative to MYUCS) and the
origin of the new UCS will be the point that is returned by this function when called with
the parameter AcDb::kFrontView.
def xAxis(self) -> PyGe.Vector3d:
Returns the X axis vector (in WCS coordinates) of the UCS that the AcDbUCSTableRecord
represents. The xAxis value is used for DXF group code 11.
def yAxis(self) -> PyGe.Vector3d:
Returns the Y axis vector (in WCS coordinates) of the UCS that the AcDbUCSTableRecord
represents. The yAxis value is used for DXF group code 12.
class UnderlayDefinition Class
def __init__(self, id: PyDb.ObjectId, mode: PyDb.OpenMode) -> None:
This abstract class handles the linkage to external underlay content. Underlays are similar
to raster images, except that users can snap to the content of an underlay. An
AcDbUnderlayDefinition object is referenced by zero or more AcDbUnderlayReferences. The
AcDbUnderlayReference class is responsible for the placement of content within the drawing,
while the AcDbUnderlayDefinition class handles the linkage to the underlay content.
Instances of AcDbUnderlayReference-derived concrete classes are inserted in a block table
record. Instances of AcDbUnderlayDefinition-derived concrete classes are inserted into a
dictionary within the named object dictionary.
def __reduce__(self) -> Any:
def cast(otherObject: PyRx.RxObject) -> UnderlayDefinition:
def className() -> str:
def cloneFrom(otherObject: PyRx.RxObject) -> UnderlayDefinition:
def desc() -> PyRx.RxClass:
Returns a pointer to the AcRxClass object representing the specific class, or most recent
parent class explicitly registered with ObjectARX of either the pointer type used to invoke
it or the class qualifier used with it. (Remember that when a static member function is
invoked via a pointer, the pointer type, not the object type, determines which
implementation of the function is invoked.) When working with a pointer to an object and
the proper AcRxClass object for the class of the object pointed to is desired, the
AcRxObject::isA() function should be used, since it is a virtual non-static method and is
therefore not pointer type dependent. Caching the value of the pointer returned by this
method is acceptable, provided the application knows that the AcRxClass object pointed to
by the returned pointer was created by an ObjectARX application that will not be unloaded.
def dictionaryKey(underlayDefinitionType: PyRx.RxClass) -> str:
Returns the name of the dictionary that holds the AcDbUnderlayDefinition objects in the
named objects dictionary.
def getActiveFileName(self) -> str:
Gets the name of the file that this underlay references and returns it through the file
parameter. This name is always a full path. Returns Acad::eOk if successful.
def getItemName(self) -> str:
Returns a pointer to the internal data member that holds the name of the underlay item that
this underlay currently references. WarningThe returned string should not be modified or
freed. Also, it may be invalidated if modifications are made to the underlay definition.
def getSourceFileName(self) -> str:
Returns a pointer to the internal data member that holds the name of the file that this
underlay references. This name is in the form (relative or full path) that the user
specified. WarningThe returned string should not be modified or freed. Also, it may be
invalidated if modifications are made to the underlay definition.
def isLoaded(self) -> bool:
Gets a Boolean value indicating whether the underlay is currently loaded. Returns true if
the underlay is loaded.
def load(self, passwd: str) -> None:
Attempts to load the file returned by the getActiveFileName() function. If password is null
but is necessary to open the file, this function will prompt the user. Returns Acad::eOk if
successful.
def setItemName(self, item: str) -> None:
Sets the name of the underlay item that this underlay should reference. Returns Acad::eOk
if successful.
def setSourceFileName(self, file: str) -> None:
Sets the name of the file that this underlay references. This name can be expressed in any
of the following forms: relative path (relative to the host drawing)file name only (will be
searched on the support search path)full path Returns Acad::eOk if succesful.
def unload(self) -> None:
Unloads the underlay file. References will behave as if the file was never loaded.
class UnderlayLayer Class
def __init__(self) -> None:
An abstract class that represents underlay layers in the drawing. Underlays are similar to
raster images but their content is snappable. An AcDbUnderlayReference must reference a
compatible AcDbUnderlayDefinition. The AcDbUnderlayReference is responsible for the
placement of the content within the drawing while AcDbUnderlayDefinition handles the
linkage to the underlay content. Instances of AcDbUnderlayReference derived concrete
classes are inserted in a block table record. Instances of AcDbUnderlayDefinition derived
concrete classes are inserted into a dictionary of the named object .
def __reduce__(self) -> Any:
def name(self) -> str:
Returns the name of the underlay layer as an AcString.
def setName(self, name: str) -> None:
Sets the name for the underlay layer.
def setState(self, state: bool) -> None:
Sets the state of the underlay layer.
def state(self) -> bool:
Returns the state of the underlay later.
class UnderlayReference Class
def __init__(self) -> None:
Abstract class that represents underlays in the drawing. Underlays are similar to raster
images, but their content is snappable. An AcDbUnderlayReference object must reference a
compatible AcDbUnderlayDefinition object. The AcDbUnderlayReference object is responsible
for the placement of the content within the drawing, while the AcDbUnderlayDefinition
object handles the linkage to the underlay content. Instances of
AcDbUnderlayReference-derived concrete classes are inserted into a block table record.
Instances of AcDbUnderlayDefinition-derived concrete classes are inserted into a dictionary
under the named object dictionary.
def __init__(self, id: PyDb.ObjectId) -> None:
Abstract class that represents underlays in the drawing. Underlays are similar to raster
images, but their content is snappable. An AcDbUnderlayReference object must reference a
compatible AcDbUnderlayDefinition object. The AcDbUnderlayReference object is responsible
for the placement of the content within the drawing, while the AcDbUnderlayDefinition
object handles the linkage to the underlay content. Instances of
AcDbUnderlayReference-derived concrete classes are inserted into a block table record.
Instances of AcDbUnderlayDefinition-derived concrete classes are inserted into a dictionary
under the named object dictionary.
def __init__(self, id: PyDb.ObjectId, mode: PyDb.OpenMode) -> None:
Abstract class that represents underlays in the drawing. Underlays are similar to raster
images, but their content is snappable. An AcDbUnderlayReference object must reference a
compatible AcDbUnderlayDefinition object. The AcDbUnderlayReference object is responsible
for the placement of the content within the drawing, while the AcDbUnderlayDefinition
object handles the linkage to the underlay content. Instances of
AcDbUnderlayReference-derived concrete classes are inserted into a block table record.
Instances of AcDbUnderlayDefinition-derived concrete classes are inserted into a dictionary
under the named object dictionary.
def __init__(self, id: PyDb.ObjectId, mode: PyDb.OpenMode, erased: bool) -> None:
Abstract class that represents underlays in the drawing. Underlays are similar to raster
images, but their content is snappable. An AcDbUnderlayReference object must reference a
compatible AcDbUnderlayDefinition object. The AcDbUnderlayReference object is responsible
for the placement of the content within the drawing, while the AcDbUnderlayDefinition
object handles the linkage to the underlay content. Instances of
AcDbUnderlayReference-derived concrete classes are inserted into a block table record.
Instances of AcDbUnderlayDefinition-derived concrete classes are inserted into a dictionary
under the named object dictionary.
def __init__(*args) -> None:
Abstract class that represents underlays in the drawing. Underlays are similar to raster
images, but their content is snappable. An AcDbUnderlayReference object must reference a
compatible AcDbUnderlayDefinition object. The AcDbUnderlayReference object is responsible
for the placement of the content within the drawing, while the AcDbUnderlayDefinition
object handles the linkage to the underlay content. Instances of
AcDbUnderlayReference-derived concrete classes are inserted into a block table record.
Instances of AcDbUnderlayDefinition-derived concrete classes are inserted into a dictionary
under the named object dictionary.
def __reduce__(self) -> Any:
def cast(otherObject: PyRx.RxObject) -> UnderlayReference:
def className() -> str:
def clipBoundary(self) -> list[PyGe.Point2d]:
Returns an array of points that specify the clip boundary of the underlay. The boundary is
defined in model coordinates. You must use the transformation matrix returned by the
transform() function to obtain WCS points.
def cloneFrom(otherObject: PyRx.RxObject) -> UnderlayReference:
def contrast(self) -> int:
Returns the contrast value for the underlay ([0-100]).
def contrastDefault() -> int:
Returns the default contrast value.
def contrastLowerLimit() -> int:
Returns the lower limit of the legal contrast values.
def definitionId(self) -> ObjectId:
Returns the object ID of the AcDbUnderlayDefinition that this underlay references.
def desc() -> PyRx.RxClass:
Returns a pointer to the AcRxClass object representing the specific class, or most recent
parent class explicitly registered with ObjectARX of either the pointer type used to invoke
it or the class qualifier used with it. (Remember that when a static member function is
invoked via a pointer, the pointer type, not the object type, determines which
implementation of the function is invoked.) When working with a pointer to an object and
the proper AcRxClass object for the class of the object pointed to is desired, the
AcRxObject::isA() function should be used, since it is a virtual non-static method and is
therefore not pointer type dependent. Caching the value of the pointer returned by this
method is acceptable, provided the application knows that the AcRxClass object pointed to
by the returned pointer was created by an ObjectARX application that will not be unloaded.
def fade(self) -> int:
Returns the fade value for the underlay ([0-100]).
def fadeDefault() -> int:
Returns the default fade value.
def fadeLowerLimit() -> int:
Returns the lower limit of the legal fade values.
def fadeUpperLimit() -> int:
Returns the upper limit of the legal fade values.
def generateClipBoundaryFromPline(self, val: PyDb.ObjectId) -> None:
Generates the clip boundary from a polyline.
def getUnderlayLayer(self, val: int) -> UnderlayLayer:
Get underlay layer information (layer name and layer on/off state) for the layer name
passed in. Returns Acad::eOk if successful
def height(self) -> float:
This is height, a member of class AcDbUnderlayReference.
def isAdjustedForBackground(self) -> bool:
Returns a value indicating whether the underlay content is adjusted for the current
background color. Not all underlay types observe this setting.
def isClipInverted(self) -> bool:
Checks if the clip is inverted.
def isClipped(self) -> bool:
Returns a Boolean value indicating whether the clip boundary should be used.
def isFramePlottable(self) -> bool:
Returns true if the frame is plottable.
def isFrameVisible(self) -> bool:
Returns true if the frame is visible.
def isMonochrome(self) -> bool:
Returns a Boolean value indicating whether the underlay content is shown inmonochrome.
def isOn(self) -> bool:
Returns a value indicating whether the underlay content is shown. This variable governs the
visibilty of the underlay content, not its frame or clipping boundary.
def normal(self) -> PyGe.Vector3d:
Returns the normal of the underlay.
def position(self) -> PyGe.Point3d:
Returns the position of the underlay in WCS (or block space coordinates if the reference is
part of a block).
def rotation(self) -> float:
Returns the rotation value around the axis defined by the point returned by position() and
the vector returned by normal().
def scaleFactors(self) -> PyGe.Scale3d:
Returns the scale factors used to scale the underlay.
def setClipBoundary(self, pnts: list[PyGe.Point2d]) -> None:
Sets the clip boundary of the underlay. The boundary is defined in model coordinates. (i.e.
Given WCS points one must use the inverse of the transformation matrix return by tranform()
to obtain points that can be passed to this function.) Returns Acad::eOk if succesful.
def setClipInverted(self, val: bool) -> None:
Sets whether the clip is inverted.
def setContrast(self, val: int) -> None:
Sets the contrast value for the underlay ([0-100]). Returns Acad::eOk if succesful.
def setDefinitionId(self, val: PyDb.ObjectId) -> None:
Sets the object ID of the AcDbUnderlayDefinition that this underlay references.
def setFade(self, val: int) -> None:
Sets the fade value for the underlay ([0-100]). Returns Acad::eOk if succesful.
def setHeight(self, val: float) -> None:
This is setHeight, a member of class AcDbUnderlayReference.
def setIsAdjustedForBackground(self, val: bool) -> None:
Sets a value indicating whether the underlay content is adjusted for the current background
color. Not all underlay types observe this setting. Returns Acad::eOk if successful.
def setIsClipped(self, val: bool) -> None:
Sets a Boolean indicating whether the clip boundary should be used. Returns Acad::eOk if
succesful.
def setIsMonochrome(self, val: bool) -> None:
Sets a value indicating whether the underlay content is shown in monochrome. Returns
Acad::eOk if succesful.
def setIsOn(self, val: bool) -> None:
Sets a value indicating whether the underlay content is shown. This variable governs the
visibilty of the underlay content, not its frame or clipping boundary. Returns Acad::eOk if
succesful.
def setNormal(self, val: PyGe.Vector3d) -> None:
Sets the normal of the underlay. Returns Acad::eOk if successful.
def setPosition(self, val: PyGe.Point3d) -> None:
Sets the position of the underlay in WCS (or block space coordinates if the reference is
part of a block). Returns Acad::eOk if successful.
def setRotation(self, val: float) -> None:
Sets the rotation value around the axis defined by the point returned by position() and the
vector returned by normal(). Returns Acad::eOk if successful.
def setScaleFactors(self, val: PyGe.Scale3d) -> None:
Sets the scale factors used to scale the underlay. Most underlays only allow uniform
scaling. Returns Acad::eOk if successful.
def setTransform(self, val: PyGe.Matrix3d) -> None:
Sets the transformation matrix of the underlay. Returns Acad::eOk if succesful.
def setUnderlayLayer(self, val: int, layer: PyDb.UnderlayLayer) -> None:
Sets the underlay layer information (layer name and layer on/off state). Returns Acad::eOk
if successful
def setWidth(self, val: float) -> None:
This is setWidth, a member of class AcDbUnderlayReference.
def transform(self) -> PyGe.Matrix3d:
Gets the transformation matrix from the underlay coordinate system to the world coordinate
system (or block space coordinates if the underlay is part of a block). the transformation
is defined by position(), normal(), and rotatation(). Returns the model to WCS
transformation of the underlay.
def underlayLayerCount(self) -> int:
Returns 0 if underlay has no layer information.
def width(self) -> float:
This is width, a member of class AcDbUnderlayReference.
class UnitsValue Class
kUnitsUndefined: ClassVar[Self]
kUnitsInches: ClassVar[Self]
kUnitsFeet: ClassVar[Self]
kUnitsMiles: ClassVar[Self]
kUnitsMillimeters: ClassVar[Self]
kUnitsCentimeters: ClassVar[Self]
kUnitsMeters: ClassVar[Self]
kUnitsKilometers: ClassVar[Self]
kUnitsMicroinches: ClassVar[Self]
kUnitsMils: ClassVar[Self]
kUnitsYards: ClassVar[Self]
kUnitsAngstroms: ClassVar[Self]
kUnitsNanometers: ClassVar[Self]
kUnitsMicrons: ClassVar[Self]
kUnitsDecimeters: ClassVar[Self]
kUnitsDekameters: ClassVar[Self]
kUnitsHectometers: ClassVar[Self]
kUnitsGigameters: ClassVar[Self]
kUnitsAstronomical: ClassVar[Self]
kUnitsLightYears: ClassVar[Self]
kUnitsParsecs: ClassVar[Self]
kUnitsUSSurveyFeet: ClassVar[Self]
kUnitsUSSurveyInch: ClassVar[Self]
kUnitsUSSurveyYard: ClassVar[Self]
kUnitsUSSurveyMile: ClassVar[Self]
kUnitsMax: ClassVar[Self]
class UpdateDirection Class
kUpdateDirSourceToData: ClassVar[Self]
kUpdateDirDataToSource: ClassVar[Self]
class UpdateOption Class
kUpdateOptionNone: ClassVar[Self]
kUpdateOptionSkipFormat: ClassVar[Self]
kUpdateOptionUpdateRowHeight: ClassVar[Self]
kUpdateOptionUpdateColumnWidth: ClassVar[Self]
kUpdateOptionAllowSourceUpdate: ClassVar[Self]
kUpdateOptionForceFullSourceUpdate: ClassVar[Self]
kUpdateOptionOverwriteContentModifiedAfterUpdate: ClassVar[Self]
kUpdateOptionOverwriteFormatModifiedAfterUpdate: ClassVar[Self]
kUpdateOptionForPreview: ClassVar[Self]
kUpdateOptionIncludeXrefs: ClassVar[Self]
kSkipFormatAfterFirstUpdate: ClassVar[Self]
class ValueDataType Class
kUnknown: ClassVar[Self]
kLong: ClassVar[Self]
kDouble: ClassVar[Self]
kString: ClassVar[Self]
kDate: ClassVar[Self]
kPoint: ClassVar[Self]
k3dPoint: ClassVar[Self]
kObjectId: ClassVar[Self]
kBuffer: ClassVar[Self]
kResbuf: ClassVar[Self]
kGeneral: ClassVar[Self]
kColor: ClassVar[Self]
class ValueFormatOption Class
kFormatOptionNone: ClassVar[Self]
kForEditing: ClassVar[Self]
kForExpression: ClassVar[Self]
kUseMaximumPrecision: ClassVar[Self]
kIgnoreMtextFormat: ClassVar[Self]
class ValueParseOption Class
kParseOptionNone: ClassVar[Self]
kSetDefaultFormat: ClassVar[Self]
kPreserveMtextFormat: ClassVar[Self]
kConvertTextToValue: ClassVar[Self]
kChangeDataType: ClassVar[Self]
kParseTextForFieldCode: ClassVar[Self]
class ValueUnitType Class
kUnitless: ClassVar[Self]
kDistance: ClassVar[Self]
kAngle: ClassVar[Self]
kArea: ClassVar[Self]
kVolume: ClassVar[Self]
kCurrency: ClassVar[Self]
kPercentage: ClassVar[Self]
kAngleNotTransformed: ClassVar[Self]
class Vertex Class
def __init__(self) -> None:
The AcDbVertex class is the base class for all the vertex types used by the AcDb2dPolyline,
AcDb3dPolyline, AcDbPolyFaceMesh, and AcDbPolygonMesh classes within AutoCAD. This class
provides no methods other than a default constructor and destructor. It is not intended
that objects of this class need ever be instantiated by ObjectARX applications, or that
this class ever be derived from.
def __init__(self, id: PyDb.ObjectId) -> None:
The AcDbVertex class is the base class for all the vertex types used by the AcDb2dPolyline,
AcDb3dPolyline, AcDbPolyFaceMesh, and AcDbPolygonMesh classes within AutoCAD. This class
provides no methods other than a default constructor and destructor. It is not intended
that objects of this class need ever be instantiated by ObjectARX applications, or that
this class ever be derived from.
def __init__(self, id: PyDb.ObjectId, mode: PyDb.OpenMode) -> None:
The AcDbVertex class is the base class for all the vertex types used by the AcDb2dPolyline,
AcDb3dPolyline, AcDbPolyFaceMesh, and AcDbPolygonMesh classes within AutoCAD. This class
provides no methods other than a default constructor and destructor. It is not intended
that objects of this class need ever be instantiated by ObjectARX applications, or that
this class ever be derived from.
def __init__(self, id: PyDb.ObjectId, mode: PyDb.OpenMode, erased: bool) -> None:
The AcDbVertex class is the base class for all the vertex types used by the AcDb2dPolyline,
AcDb3dPolyline, AcDbPolyFaceMesh, and AcDbPolygonMesh classes within AutoCAD. This class
provides no methods other than a default constructor and destructor. It is not intended
that objects of this class need ever be instantiated by ObjectARX applications, or that
this class ever be derived from.
def __init__(*args) -> None:
The AcDbVertex class is the base class for all the vertex types used by the AcDb2dPolyline,
AcDb3dPolyline, AcDbPolyFaceMesh, and AcDbPolygonMesh classes within AutoCAD. This class
provides no methods other than a default constructor and destructor. It is not intended
that objects of this class need ever be instantiated by ObjectARX applications, or that
this class ever be derived from.
def __reduce__(self) -> Any:
def cast(otherObject: PyRx.RxObject) -> PyDb.Vertex:
def className() -> str:
def cloneFrom(otherObject: PyRx.RxObject) -> PyDb.Vertex:
def desc() -> PyRx.RxClass:
Returns a pointer to the AcRxClass object representing the specific class, or most recent
parent class explicitly registered with ObjectARX of either the pointer type used to invoke
it or the class qualifier used with it. (Remember that when a static member function is
invoked via a pointer, the pointer type, not the object type, determines which
implementation of the function is invoked.) When working with a pointer to an object and
the proper AcRxClass object for the class of the object pointed to is desired, the
AcRxObject::isA() function should be used, since it is a virtual non-static method and is
therefore not pointer type dependent. Caching the value of the pointer returned by this
method is acceptable, provided the application knows that the AcRxClass object pointed to
by the returned pointer was created by an ObjectARX application that will not be unloaded.
class Vertex2d Class
def __init__(self) -> None:
The AcDb2dVertex class represents the vertices in 2D polylines. AcDb2dVertex is the only
ObjectARX API entity that still passes its position in OCS. This is because the Z
coordinate is kept in its owning AcDb2dPolyline for historical purposes. If you are not
working in two dimensions, it may be better to use an AcDb3dPolyline, or an AcDbSpline.
def __init__(self, pos: PyGe.Point3d, bulge: float, startWidth: float, endWidth: float, tangent: float, vertexId: int) -> None:
The AcDb2dVertex class represents the vertices in 2D polylines. AcDb2dVertex is the only
ObjectARX API entity that still passes its position in OCS. This is because the Z
coordinate is kept in its owning AcDb2dPolyline for historical purposes. If you are not
working in two dimensions, it may be better to use an AcDb3dPolyline, or an AcDbSpline.
def __init__(self, id: PyDb.ObjectId) -> None:
The AcDb2dVertex class represents the vertices in 2D polylines. AcDb2dVertex is the only
ObjectARX API entity that still passes its position in OCS. This is because the Z
coordinate is kept in its owning AcDb2dPolyline for historical purposes. If you are not
working in two dimensions, it may be better to use an AcDb3dPolyline, or an AcDbSpline.
def __init__(self, id: PyDb.ObjectId, mode: PyDb.OpenMode) -> None:
The AcDb2dVertex class represents the vertices in 2D polylines. AcDb2dVertex is the only
ObjectARX API entity that still passes its position in OCS. This is because the Z
coordinate is kept in its owning AcDb2dPolyline for historical purposes. If you are not
working in two dimensions, it may be better to use an AcDb3dPolyline, or an AcDbSpline.
def __init__(self, id: PyDb.ObjectId, mode: PyDb.OpenMode, erased: bool) -> None:
The AcDb2dVertex class represents the vertices in 2D polylines. AcDb2dVertex is the only
ObjectARX API entity that still passes its position in OCS. This is because the Z
coordinate is kept in its owning AcDb2dPolyline for historical purposes. If you are not
working in two dimensions, it may be better to use an AcDb3dPolyline, or an AcDbSpline.
def __init__(*args) -> None:
The AcDb2dVertex class represents the vertices in 2D polylines. AcDb2dVertex is the only
ObjectARX API entity that still passes its position in OCS. This is because the Z
coordinate is kept in its owning AcDb2dPolyline for historical purposes. If you are not
working in two dimensions, it may be better to use an AcDb3dPolyline, or an AcDbSpline.
def __reduce__(self) -> Any:
def bulge(self) -> float:
Returns the vertex's bulge value. The bulge is the tangent of 1/4 of the included angle for
the arc between the selected vertex and the next vertex in the polyline's vertex list. A
negative bulge value indicates that the arc goes clockwise from the selected vertex to the
next vertex. The bulge value is used for DXF group code 42.
def cast(otherObject: PyRx.RxObject) -> Vertex2d:
def className() -> str:
def cloneFrom(otherObject: PyRx.RxObject) -> Vertex2d:
def desc() -> PyRx.RxClass:
Returns a pointer to the AcRxClass object representing the specific class, or most recent
parent class explicitly registered with ObjectARX of either the pointer type used to invoke
it or the class qualifier used with it. (Remember that when a static member function is
invoked via a pointer, the pointer type, not the object type, determines which
implementation of the function is invoked.) When working with a pointer to an object and
the proper AcRxClass object for the class of the object pointed to is desired, the
AcRxObject::isA() function should be used, since it is a virtual non-static method and is
therefore not pointer type dependent. Caching the value of the pointer returned by this
method is acceptable, provided the application knows that the AcRxClass object pointed to
by the returned pointer was created by an ObjectARX application that will not be unloaded.
def endWidth(self) -> float:
Returns the end width for the vertex. The end width is used as the width at the end of the
polyline segment from this vertex to the next vertex. The end width value is used for DXF
group code 41.
def ignoreTangent(self) -> None:
Sets the vertex to ignore the tangent direction value when involved in a curve-fit
operation. This function clears the second bit of the vertex's DXF group code 70. Returns
Acad::eOk if successful, or Acad::eInvalidInput if the data passed in is not acceptable.
def isTangentUsed(self) -> bool:
Returns Adesk::kTrue if the curve-fit tangent direction is in use by this vertex;
otherwise, returns Adesk::kFalse.
def position(self) -> PyGe.Point3d:
Returns the position value of the vertex. The position point value must be in OCS
coordinates (the OCS of the polyline containing the vertex), not WCS. The Z coordinate is
kept in the owning AcDb2dPolyline only for historical purposes. To find the WCS position of
the vertex use AcDb2dPolyline::vertexPosition(), which takes a pointer to the vertex as an
argument. To get the OCS Z coordinate, use the owning polyline's
AcDb2dPolyline::elevation() method. The position value is used for DXF group code 10.
def setBulge(self, val: float) -> None:
Sets newVal to be the vertex's bulge value. The bulge is the tangent of 1/4 of the included
angle for the arc between the vertex and the next vertex in the polyline's vertex list. A
negative bulge value indicates that the arc goes clockwise from this vertex to the next.
The bulge value is used for DXF group code 42. Returns Acad::eOk if successful, or
Acad::eInvalidInput if the data passed in is not acceptable.
def setEndWidth(self, val: float) -> None:
Sets newVal to be the end width for the vertex. The end width is used as the width at the
end of the polyline segment from this vertex to the next vertex. The end width value is
used for DXF group code 41. Returns Acad::eOk if successful, or Acad::eInvalidInput if the
data passed in is not acceptable.
def setPosition(self, val: PyGe.Point3d) -> None:
Sets pt to be the position value of the vertex. The Z value in pt is not used. pt must be
in OCS coordinates (the OCS of the polyline containing the vertex), not WCS. The Z
coordinate is kept in the owning AcDb2dPolyline only for historical purposes. The position
value is used for DXF group code 10. Returns Acad::eOk if successful, or
Acad::eInvalidInput if the data passed in is not acceptable.
def setStartWidth(self, val: float) -> None:
Sets newVal to be the start width for the vertex. The start width is used as the width at
this vertex for the polyline segment between this vertex and the next vertex. The end width
value is used for DXF group code 40. Returns Acad::eOk if successful, or
Acad::eInvalidInput if the data passed in is not acceptable.
def setTangent(self, val: float) -> None:
Sets newVal to be the curve-fit tangent direction for the vertex. This is the angle (in
radians) between the OCS axis for the polyline containing the vertex and the tangent
direction vector. The tangent direction value is used for DXF group code 50. Returns
Acad::eOk if successful, or Acad::eInvalidInput if the data passed in is not acceptable.
def setTangentUsed(self, val: bool) -> None:
This is setTangentUsed, a member of class AcDb2dVertex.
def setVertexIdentifier(self, val: int) -> None:
def startWidth(self) -> float:
Returns the start width for the vertex. The start width is used as the width at this vertex
for the polyline segment from this vertex to the next vertex. The end width value is used
for DXF group code 40.
def tangent(self) -> float:
Returns the curve-fit tangent direction for the vertex. This is the angle (in radians)
between the OCS X axis for the polyline containing the vertex and the tangent direction
vector. The tangent direction value is used for DXF group code 50.
def useTangent(self) -> None:
Sets the vertex to use the tangent direction value when involved in a curve-fit operation.
This function sets the second bit of the vertex's DXF group code 70. Returns Acad::eOk if
successful, or Acad::eInvalidInput if the data passed in is not acceptable.
def vertexIdentifier(self) -> int:
def vertexType(self) -> Vertex2dType:
Returns the AcDb::Vertex2dType of this vertex. The possible AcDbVertex2dType values are:
AcDb::k2dVertex A standard vertex within a 2D polyline. AcDb::k2dSplineCtlVertex A control
point for a spline or curve-fit polyline. AcDb::k2dSplineFitVertex A vertex that was
automatically generated as the result of a spline-fit operation. This type of vertex can go
away or change automatically during subsequent editing operations on the polyline.
AcDb::k2dCurveFitVertex A vertex that was automatically generated as the result of a
curve-fit operation. This type of vertex can go away or change automatically during
subsequent editing operations on the polyline. The vertex type value is used to determine
the value for the DXF group code 70 as follows: Return Values Group Code 70 (bit value)
k2dVertex 0 k2dSplineCtlVertex 16 k2dSplineFitVertex 8 k2dCurveFitVertex 1
class Vertex2dType Class
k2dVertex: ClassVar[Self]
k2dSplineCtlVertex: ClassVar[Self]
k2dSplineFitVertex: ClassVar[Self]
k2dCurveFitVertex: ClassVar[Self]
class ViewTable Class
def __init__(self, id: PyDb.ObjectId, mode: PyDb.OpenMode, erased: bool) -> None:
def __reduce__(self) -> Any:
def add(self, val: PyDb.AbstractViewTableRecord) -> ObjectId:
This function adds the record pointed to by pRecord to both the database containing the
table and the table itself. Possible return ErrorStatus codes are: Acad::eOk,
Acad::eOutOfMemory, Acad::eDuplicateRecordName, Acad::eNoDatabase (if the ViewTable is not
in a database).
def cast(otherObject: PyRx.RxObject) -> AbstractViewTable:
def className() -> str:
def cloneFrom(otherObject: PyRx.RxObject) -> AbstractViewTable:
def desc() -> PyRx.RxClass:
Returns a pointer to the AcRxClass object representing the specific class, or most recent
parent class explicitly registered with ObjectARX of either the pointer type used to invoke
it or the class qualifier used with it. (Remember that when a static member function is
invoked via a pointer, the pointer type, not the object type, determines which
implementation of the function is invoked.) When working with a pointer to an object and
the proper AcRxClass object for the class of the object pointed to is desired, the
AcRxObject::isA() function should be used, since it is a virtual non-static method and is
therefore not pointer type dependent. Caching the value of the pointer returned by this
method is acceptable, provided the application knows that the AcRxClass object pointed to
by the returned pointer was created by an ObjectARX application that will not be unloaded.
class ViewTableRecord Class
def __init__(self) -> None:
Objects of this class represent stored views within AutoCAD. The AcDbViewTable object
(referred to in the AutoCAD and DXF documentation as the VIEW table) within each database
is the container or owner of objects of this class. Most of the data and functionality of
this class is inherited from its AcDbAbstractViewTableRecord parent class. Within AutoCAD,
objects of this class are created whenever the VIEW command's 'save' option is used to save
a view with a name that does not already exist.
def __init__(self, id: PyDb.ObjectId) -> None:
Objects of this class represent stored views within AutoCAD. The AcDbViewTable object
(referred to in the AutoCAD and DXF documentation as the VIEW table) within each database
is the container or owner of objects of this class. Most of the data and functionality of
this class is inherited from its AcDbAbstractViewTableRecord parent class. Within AutoCAD,
objects of this class are created whenever the VIEW command's 'save' option is used to save
a view with a name that does not already exist.
def __init__(self, id: PyDb.ObjectId, mode: PyDb.OpenMode) -> None:
Objects of this class represent stored views within AutoCAD. The AcDbViewTable object
(referred to in the AutoCAD and DXF documentation as the VIEW table) within each database
is the container or owner of objects of this class. Most of the data and functionality of
this class is inherited from its AcDbAbstractViewTableRecord parent class. Within AutoCAD,
objects of this class are created whenever the VIEW command's 'save' option is used to save
a view with a name that does not already exist.
def __init__(self, id: PyDb.ObjectId, mode: PyDb.OpenMode, erased: bool) -> None:
Objects of this class represent stored views within AutoCAD. The AcDbViewTable object
(referred to in the AutoCAD and DXF documentation as the VIEW table) within each database
is the container or owner of objects of this class. Most of the data and functionality of
this class is inherited from its AcDbAbstractViewTableRecord parent class. Within AutoCAD,
objects of this class are created whenever the VIEW command's 'save' option is used to save
a view with a name that does not already exist.
def __init__(*args) -> None:
Objects of this class represent stored views within AutoCAD. The AcDbViewTable object
(referred to in the AutoCAD and DXF documentation as the VIEW table) within each database
is the container or owner of objects of this class. Most of the data and functionality of
this class is inherited from its AcDbAbstractViewTableRecord parent class. Within AutoCAD,
objects of this class are created whenever the VIEW command's 'save' option is used to save
a view with a name that does not already exist.
def __reduce__(self) -> Any:
def annotationScale(self) -> AnnotationScale:
This function returns a pointer to the AcDbAnnotationScale object associated with the
viewport. The controlling application must explicitly delete the memory of the returned
pointer to AcDbAnnotationScale. Otherwise, a small memory leak will result.
def camera(self) -> ObjectId:
Returns the object ID of the camera for this view.
def cast(otherObject: PyRx.RxObject) -> ViewTableRecord:
def className() -> str:
def cloneFrom(otherObject: PyRx.RxObject) -> ViewTableRecord:
def desc() -> PyRx.RxClass:
Returns a pointer to the AcRxClass object representing the specific class, or most recent
parent class explicitly registered with ObjectARX of either the pointer type used to invoke
it or the class qualifier used with it. (Remember that when a static member function is
invoked via a pointer, the pointer type, not the object type, determines which
implementation of the function is invoked.) When working with a pointer to an object and
the proper AcRxClass object for the class of the object pointed to is desired, the
AcRxObject::isA() function should be used, since it is a virtual non-static method and is
therefore not pointer type dependent. Caching the value of the pointer returned by this
method is acceptable, provided the application knows that the AcRxClass object pointed to
by the returned pointer was created by an ObjectARX application that will not be unloaded.
def disassociateUcsFromView(self) -> None:
Disassociates the ucs from this view. If this function is called, then no ucs will be
associated with the view and the ucs will not change when the view is restored.
def getCategoryName(self) -> str:
Gets the name of the category of the view, initialized to null if no category has been
assigned.
def getLayerState(self) -> str:
Gets the name of the layer state of the view. The string will be empty if no layer state
information has been set. The layer state itself is accessed through the
AcDbLayerStateManager and the ACAD_LAYERSTATES dictionary.
def getLayout(self) -> ObjectId:
Gets the layout of the view. layoutId will be set to AcDbObjectId::kNull if the layout of
the view has not been set. Returns eOk on success. Returns an error if the layout ID could
not be retrieved. Because paperspace layouts refer to a position on a specific layout
rather than just an arbitrary paper region, this field is required to accurately restore a
paperspace view.
def isCameraPlottable(self) -> bool:
Returns a Boolean indicating whether the camera can be plotted.
def isPaperspaceView(self) -> bool:
Returns true if this ViewTableRecord is a Paper Space view. Otherwise it returns false.
Within AutoCAD, if a Paper Space view is restored while in Model Space, AutoCAD
automatically switches to Paper Space. If a Model Space view is restored while in
PaperSpace, AutoCAD prompts the end user to determine which Model Space viewport to restore
it to. The isPaperSpaceView flag is represented as bit 1 of DXF group code 70 (if bit 1 is
set, then the view is a Paper Space view).
def isUcsAssociatedToView(self) -> bool:
Returns true if this view table record has an associated ucs. If this function returns
true, then the ucs that is associated with this view will become active whenever this view
is restored. The associated ucs can be obtained by calling getUcs() (defined in
AcDbAbstractViewTableRecord parent class). A ucs can be associated to this view by calling
one of the setUcs() functions in the AcDbAbstractViewTableRecord class.
def isViewAssociatedToViewport(self) -> bool:
This function reports whether or not the view is associated with a paperspace viewport. If
so, it is considered a 'sheet view.' Legacy views will report false for this.
def liveSection(self) -> ObjectId:
Returns the live section ID associated with a view.
def setAnnotationScale(self, val: PyDb.AnnotationScale) -> None:
Sets the AcDbAnnotationScale object to be the annotation scale of the viewport.Returns
Acad::eOk if successful.
def setCamera(self, val: PyDb.ObjectId) -> None:
Sets the camera for this view. Return Acad::eOk if successful.
def setCategoryName(self, val: str) -> None:
Sets the name of the category of the view. Returns eOk on success. Returns an error if the
category information could not be stored.
def setIsCameraPlottable(self, val: bool) -> None:
Sets the flag indicating whether the camera can be plotted. Returrns Acad::eOk if
successful.
def setIsPaperspaceView(self, val: bool) -> None:
If pspace == true, then the ViewTableRecord is set to be a Paper Space view. If pspace ==
false, then the ViewTableRecord is set to be a Model Space view. The isPaperSpaceView flag
is represented as bit 1 of DXF group code 70 (if bit 1 is set, then the view is a Paper
Space view).
def setLayerState(self, val: str) -> None:
Sets the name of the layer state. The caller is responsible for creating the layer state
and storing it into the ACAD_LAYERSTATES dictionary. Passing in null will clear the layer
state from the view. Returns eOk on success. Returns an error if the layer state name could
not be stored.
def setLayout(self, val: PyDb.ObjectId) -> None:
Sets the layout of the view. Returns eOk on success. Returns an error if the layout ID
could not be stored. Because paperspace views refer to a position on a specific layout
rather than just an arbitrary paper region, this field is required to accurately restore a
paperspace view.
def setLiveSection(self, val: PyDb.ObjectId) -> None:
Sets a live section to be associated with a view. During the restoration of a view, it's
associated live section is enabled. Returns Acad::eOk if successful.
def setParametersFromViewport(self, id: PyDb.ObjectId) -> None:
This function uses the parameters of the AcDbViewport object identified by objId to update
the parameters of this AcDbViewtableRecord. If the AcDbViewTableRecord was successfully
updated, the return value will be Acad::eOk. If the viewport cannot be opened, the call
will fail and return one of the following error codes: Acad::eInvalidObjectId,
Acad::eWasErased, Acad::eAtMaxReaders, Acad::eWasNotifying, Acad::eWasOpenForUndo, or
Acad::eNullObjectId.
def setSun(self, retId: PyDb.ObjectId, pSun: PyDb.Object, eraseOldSun: bool) -> None:
Sets the object Id of the AcDbSun object associated with this viewport. Returns Acad::eOk
if the object isn't already associated with another viewport.
def setViewAssociatedToViewport(self, val: bool) -> None:
Sets a flag to indicate whether or not the view is associated with a paperspace viewport.
Returns eOk on success. Returns an error if the flag could not be stored.
def sunId(self) -> ObjectId:
Returns the object ID of the sun used by this background.
class Viewport Class
def __init__(self) -> None:
The AcDbViewport class represents the VIEWPORT entity within AutoCAD.
def __init__(self, id: PyDb.ObjectId) -> None:
The AcDbViewport class represents the VIEWPORT entity within AutoCAD.
def __init__(self, id: PyDb.ObjectId, mode: PyDb.OpenMode) -> None:
The AcDbViewport class represents the VIEWPORT entity within AutoCAD.
def __init__(self, id: PyDb.ObjectId, mode: PyDb.OpenMode, erased: bool) -> None:
The AcDbViewport class represents the VIEWPORT entity within AutoCAD.
def __init__(*args) -> None:
The AcDbViewport class represents the VIEWPORT entity within AutoCAD.
def __reduce__(self) -> Any:
def ambientLightColor(self) -> Color:
Returns the ambient light color for the viewport.
def annotationScale(self) -> AnnotationScale:
Returns a pointer to object of AcDbAnnotationScale associated with the viewport The
controlling application must explicitly delete the memory of the returned pointer to
AcDbAnnotationScale, Otherwise, a small memory leak will result.
def backClipDistance(self) -> float:
This function returns the distance (along the camera-target line) from the target to the
back clipping plane. Positive values indicate that the clipping plane is in front of the
target (that is, between the target and the camera) whereas negative values indicate the
clipping plane is behind the target. See DVIEW in the AutoCAD Command Reference for more
information on clipping planes. The back clipping plane distance value is used for the
seventh DXF group code 1040 in the 'ACAD' appId xdata attached to the viewport.
def background(self) -> ObjectId:
Returns the object ID for the background of the current viewport. Returns NULL if no
background has been defined.
def brightness(self) -> float:
Returns the brightness factor for this viewport.
def cast(otherObject: PyRx.RxObject) -> Viewport:
def centerPoint(self) -> PyGe.Point3d:
This function returns the center point of the viewport entity in WCS coordinates (within
Paper Space). The center point value is used for DXF group code 10.
def circleSides(self) -> int:
This function returns the circle zoom percent for the viewport. The circle zoom percent
controls the number of sides to the tessellation used when displaying curves. The value can
be between 1 and 20000, with higher settings using more sides in the curve tessellation.
See VIEWRES in the AutoCAD Command Reference for more information on circle zoom percent.
The circle zoom percent value is used for the third DXF group code 1070 in the 'ACAD' appId
xdata attached to the viewport.
def className() -> str:
def cloneFrom(otherObject: PyRx.RxObject) -> Viewport:
def contrast(self) -> float:
Returns the contrast factor for the viewport.
def copied(self, obj: PyDb.Object, newObj: PyDb.Object) -> None:
This is one of the persistent reactor notification functions that can be overridden in a
custom class derived from AcDbObject. The default implementation for this function is a
return, so unless it is overridden it does nothing. This particular function is called
whenever the object sending notification has been copied (that is, its clone() member
function has been called) and is now in the process of being closed. When this function is
called, dbObj points to the object sending the notification and newObj points the newly
made copy. Both objects are open in a read-only state.
def customScale(self) -> float:
This function returns the custom scale for the viewport. The custom scale defines the
relationship of units in paperspace to units in the viewport. For example, a custom scale
of 0.5 would indicate that 1 unit in the viewport maps to 0.5 units in paperspace.
def defaultLightingType(self) -> PyGi.DefaultLightingType:
Returns the type of default lighting being used in the viewport.
def desc() -> PyRx.RxClass:
Returns a pointer to the AcRxClass object representing the specific class, or most recent
parent class explicitly registered with ObjectARX of either the pointer type used to invoke
it or the class qualifier used with it. (Remember that when a static member function is
invoked via a pointer, the pointer type, not the object type, determines which
implementation of the function is invoked.) When working with a pointer to an object and
the proper AcRxClass object for the class of the object pointed to is desired, the
AcRxObject::isA() function should be used, since it is a virtual non-static method and is
therefore not pointer type dependent. Caching the value of the pointer returned by this
method is acceptable, provided the application knows that the AcRxClass object pointed to
by the returned pointer was created by an ObjectARX application that will not be unloaded.
def effectivePlotStyleSheet(self) -> str:
This method returns the layout's plot style table name.
def elevation(self) -> float:
This function returns the elevation of the ucs plane for this viewport.
def erased(self, obj: PyDb.Object, val: bool) -> None:
This is one of the persistent reactor notification functions that can be overridden in a
custom class derived from AcDbObject. The default implementation for this function is a
return, so unless it is overridden it does nothing. This particular function is called
whenever the object sending notification has had its erase bit toggled and is now in the
process of being closed . When this function is called, dbObj points to the object sending
the notification. The sending object is open in a read-only state. If erasing ==
Adesk::kTrue then the object is being erased. If erasing == Adesk::kFalse, then the object
is being unerased.
def freezeLayersInViewport(self, ids: list[PyDb.ObjectId]) -> None:
This function Freezes, in this viewport only, the layers whose ids are in layerIds. Returns
Acad::eOk if successful.
def frontClipDistance(self) -> float:
This function returns the distance (along the camera-target line) from the target to the
front clipping plane. Positive values indicate that the clipping plane is in front of the
target (that is, between the target and the camera) whereas negative values indicate the
clipping plane is behind the target. See DVIEW in the AutoCAD Command Reference for more
information on clipping planes. The front clipping plane distance value is used for the
sixth DXF group code 1040 in the 'ACAD' appId xdata attached to the viewport.
def getFrozenLayerList(self) -> list[PyDb.ObjectId]:
This function appends to ids, the objectIds of all AcDbLayerTableRecords currently frozen
in the viewport. Returns Acad::eOk if successful.
def getLabelBlock(self) -> ObjectId:
This function returns the object ID of the label block associated with this viewport. The
label block is an AcDbBlockReference. Possible return values are Acad::eOk if successful,
Acad::eNoLabelBlock if no label block is associated with this viewport, or
Acad::eUnableToGetLabelBlock if the call is unsuccessful because the application is unable
to retrieve the label block.
def getModelView(self) -> XrefObjectId:
This function returns the xref'd object ID of the model view associated this AcDbViewport.
The model view is an AcDbViewTableRecord. Possible return values are Acad::eOk if
successful, Acad::eNoViewAssociation if no view association of this type is stored in this
AcDbViewport, or Acad::eUnableToGetViewAssociation if the call is unsuccessful because the
application is unable to retrieve the view table record.
def getSheetView(self) -> ObjectId:
This function returns the object ID of the sheet view associated with this viewport. The
sheet view is an AcDbViewTableRecord. Possible return values are Acad::eOk if successful,
Acad::eNoViewAssociation if no view association of this type stored with this viewport, or
Acad::eUnableToGetViewAssociation if the call is unsuccessful because the application is
unable to retrieve the view table record.
def getUcs(self) -> tuple[PyGe.Point3d, PyGe.Vector3d, PyGe.Vector3d]:
This function returns the origin, x-axis, and y-axis of the ucs for this viewport. Returns
Acad::eOk if successful.
def gridIncrement(self) -> PyGe.Vector2d:
Returns an AcGeVector2d in which the X value represents the X spacing (in drawing units) of
the grid and the Y value represents the Y spacing of the grid. For information on what the
grid is and how it's used, see GRID in the AutoCAD Command Reference. The X spacing value
is used for the thirteenth DXF group code 1040 in the 'ACAD' appId xdata attached to the
viewport. The Y spacing value is used for the fourteenth DXF group code 1040 in the 'ACAD'
appId xdata attached to the viewport.
def gridMajor(self) -> int:
Returns the number of minor grid lines between each major grid line in the viewport.
def height(self) -> float:
This function returns the height of the viewport entity's window in drawing units. The
viewport height is used for DXF group code 41.
def hiddenLinesRemoved(self) -> bool:
This function returns true if the viewport is set to remove hidden lines during plotting,
otherwise false is returned. For more information on viewport specific hidden line removal
during plotting, see MVIEW and the Hideplot option in the AutoCAD Command Reference. The
hidden lines removed Boolean is reflected in the tenth DXF group code 1070 in the 'ACAD'
appId xdata attached to the viewport (a value of 1 indicates hidden line removal is on).
def isBackClipOn(self) -> bool:
This function returns true if the back clipping plane is currently turned on in the
viewport, otherwise false is returned. See DVIEW in the AutoCAD Command Reference for more
information on clipping planes. The back clipping plane on or off setting is reflected in
the second DXF group code 1070 in the 'ACAD' appId xdata attached to the viewport.
def isDefaultLightingOn(self) -> bool:
Returns true if any kind of default light is on.
def isFastZoomOn(self) -> bool:
This function always returns true and is obsolete and will be removed in a future release.
def isFrontClipAtEyeOn(self) -> bool:
This function returns true if the front clipping plane is currently located at the camera,
otherwise false is returned. See DVIEW in the AutoCAD Command Reference for more
information on clipping planes. The clipping plane at Eye setting is reflected in the
second DXF group code 1070 in the 'ACAD' appId xdata attached to the viewport.
def isFrontClipOn(self) -> bool:
This function returns true if the front clipping plane is currently turned on in the
viewport, otherwise false is returned. See DVIEW in the AutoCAD Command Reference for more
information on clipping planes. The front clipping plane on or off setting is reflected in
the second DXF group code 1070 in the 'ACAD' appId xdata attached to the viewport.
def isGridAdaptive(self) -> bool:
Returns true if the grid adapts to display fewer lines in the viewport than the GRIDUNIT
setting.
def isGridBoundToLimits(self) -> bool:
Returns true if the grid is drawn beyond limits for the WCS and user-defined UCS in the
viewport, otherwise false is returned.
def isGridFollow(self) -> bool:
Returns true if the grid will follow a dynamic UCS change in the viewport.
def isGridOn(self) -> bool:
This function returns true if the grid is currently turned on in the viewport, otherwise
false is returned. See GRID in the AutoCAD Command Reference for more information. The grid
on or off setting is reflected in the seventh DXF group code 1070 in the 'ACAD' appId xdata
attached to the viewport.
def isGridSubdivisionRestricted(self) -> bool:
Returns true if subdivisions are allowed below the minor grid spacing in the viewport. This
setting is ignored if isGridAdaptive() returns false.
def isLayerFrozenInViewport(self, val: PyDb.ObjectId) -> bool:
This function returns true if the AcDbLayerTableRecord with objectId layerId is frozen in
the viewport. Otherwise false is returned.
def isLocked(self) -> bool:
This function returns true if a viewport's scale is locked. When a viewport is locked, its
zoom factor relative to paperspace cannot be changed via AutoCAD commands such as ZOOM and
VIEW.
def isNonRectClipOn(self) -> bool:
This function returns true if non-rectangular clipping is currently turned on for this
viewport.
def isOn(self) -> bool:
This function returns false for any viewport in an inactive layout's paperspace. The layout
of interest should be set to be current before checking the on/off status of its viewport
entities.
def isPerspectiveOn(self) -> bool:
This function returns true if the perspective mode is currently turned on in the viewport,
otherwise false is returned. See DVIEW in the AutoCAD Command Reference for more
information on perspective mode. The perspective mode on or off setting is reflected in the
first bit of the second DXF group code 1070 in the 'ACAD' appId xdata attached to the
viewport (if the bit is set, perspective mode is on).
def isSnapIsometric(self) -> bool:
This function returns true if snap mode is currently set to isometric in the viewport,
otherwise false is returned. See SNAP in the AutoCAD Command Reference for more information
on the isometric snap mode. The snap Isometric setting is reflected in the eighth DXF group
code 1070 in the 'ACAD' appId xdata attached to the viewport (0 == standard, 1 ==
isometric).
def isSnapOn(self) -> bool:
This function returns true if snap mode is currently turned on in the viewport, otherwise
false is returned. See SNAP in the AutoCAD Command Reference for more information on snap.
The snap on or off setting is reflected in the sixth DXF group code 1070 in the 'ACAD'
appId xdata attached to the viewport.
def isTransparent(self) -> bool:
Returns true if the viewport is set to be transparent. Otherwise, returns false.
def isUcsFollowModeOn(self) -> bool:
This function returns true if the viewport is set to generate and display a plan view
whenever the UCS changes in the viewport, otherwise false is returned. See UCSFOLLOW in
Appendix B (System Variables) of the AutoCAD Command Reference for more information on
UCSFOLLOW mode. The UCSFOLLOW setting is reflected in the fourth bit of the second DXF
group code 1070 in the 'ACAD' appId xdata attached to the viewport (if the bit is set, then
follow mode is on).
def isUcsIconAtOrigin(self) -> bool:
This function returns true if the viewport is currently set to have the UCS icon follow the
current UCS origin, as long as the origin is far enough within the viewport to allow the
icon to display properly. If the icon is not set to follow the UCS origin in the viewport,
then false is returned. See UCSICON in the AutoCAD Command Reference for more information
on the UCS icon following origin. The UCS icon setting is reflected in the fifth DXF group
code 1070 in the 'ACAD' appId xdata attached to the viewport.
def isUcsIconVisible(self) -> bool:
This function returns true if the viewport is currently set to have the UCS icon display,
otherwise false is returned. See UCSICON in the AutoCAD Command Reference for more
information on the UCS icon visibility. The UCS icon visibility setting is reflected in the
fifth DXF group code 1070 in the 'ACAD' appId xdata attached to the viewport.
def isUcsOrthographic(self) -> tuple[bool, PyDb.OrthographicView]:
Returns false if this viewport's UCS does not have an orthographic view whose reference UCS
matches the database's UCSBASE system variable. If this function returns true, then view is
set to the orthographic view of the UCS. For more information about UCS orthographic views,
see AcDbUcsTableRecord::setUcsBaseOrigin(), AcDbUcsTableRecord::ucsBaseOrigin(), and the
UCS command's Orthographic option documentation in the AutoCAD Command Reference.
WarningThe database pointer returned by AcDbHostApplicationServices::workingDatabase() at
the time this function is called must point to the pertinent AcDbDatabase object.
Otherwise, this function generates incorrect results.
def isUcsSavedWithViewport(self) -> bool:
This function sets the viewport to use vec (in Model Space WCS coordinates) as the vector
from the view's target to the view's camera (the camera is moved to reflect the new
setting). This also represents the point coordinate set by the AutoCAD VPOINT command. See
VPOINT in the AutoCAD Command Reference for more information on view direction. Returns
Acad::eOk if successful. The view direction X value is used for the second DXF group code
1010 in the 'ACAD' appId xdata attached to the viewport. The view direction Y value is used
for the second DXF group code 1020 in the 'ACAD' appId xdata attached to the viewport. The
view direction Z value is used for the second DXF group code 1030 in the 'ACAD' appId xdata
attached to the viewport.
def isViewOrthographic(self) -> tuple[bool, PyDb.OrthographicView]:
Returns true if the view direction is orthographic relative to UCSBASE. If this function
returns true, view is set to the orthographic view. For example, if the current view
represents a right view of the UCS specified by UCSBASE, view is set to AcDb::kRightView.
If this function returns false, view is set to AcDb::kNonOrthoView.
def lensLength(self) -> float:
This function returns the lens length used when perspective mode is on in the viewport. See
DVIEW in the AutoCAD Command Reference for more information on perspective mode and lens
length. The lens length value is used for the fifth DXF group code 1040 in the 'ACAD' appId
xdata attached to the viewport.
def modified(self, obj: PyDb.Object) -> None:
def nonRectClipEntityId(self) -> ObjectId:
def number(self) -> int:
This function returns the viewport ID number. This is the number that is reported by the
AutoCAD CVPORT system variable when the viewport is the current viewport in the AutoCAD
editor. If the viewport is inactive, -1 is returned. This value is not saved with the
drawing, and changes each time the drawing is opened. The viewport ID number is used for
DXF group code 69.
def plotAsRaster(self) -> bool:
Determines whether or not the viewport will plot as a raster based on the viewport's
current shade plot settings.
def plotStyleSheet(self) -> str:
Returns the plot style name applied to objects in the viewport.
def plotWireframe(self) -> bool:
Determines whether or not the viewport will plot as a vector output based on the viewport's
current shade plot settings.
def previousBackground(self, type: PyGi.DrawableType) -> ObjectId:
Returns the viewport's previously set background of the specified type.
def previousBackgroundForcedSwitch(self) -> bool:
Returns true if the previous background has been forced to switch.
def removeHiddenLines(self, val: bool) -> None:
This function sets the viewport to remove hidden lines during plotting. For more
information on viewport specific hidden line removal during plotting, see MVIEW and the
Shadeplot option in the AutoCAD Command Reference. Turning hidden line removal on sets the
tenth DXF group code 1070 in the 'ACAD' appId xdata attached to the viewport to 1.
def removeLabelBlock(self) -> None:
This function removes the label block association stored with the viewport. Returns
Acad::eOk if successful or Acad::eUnableToRemoveAssociation if unsuccessful.
def removeModelView(self) -> None:
This function removes the model view association stored with the viewport. Returns
Acad::eOk if successful or Acad::eUnableToRemoveAssociation if unsuccessful.
def removeSheetView(self) -> None:
This function removes the sheet view association stored with the viewport. Returns
Acad::eOk if successful or Acad::eUnableToRemoveAssociation if unsuccessful.
def setAmbientLightColor(self, clr: PyDb.AcCmColor) -> None:
Sets the ambient light color for this viewport. A color of black (RGB 0,0,0) is equivalent
to no ambient light. Returns Acad::eOk on success.
def setAnnotationScale(self, val: PyDb.AnnotationScale) -> None:
Sets the AcDbAnnotationScale object to be the annotation scale of the viewport. Returns
Acad::eOk if successful.
def setBackClipDistance(self, val: float) -> None:
This function sets the viewport to use newVal as the distance (along the camera-target
line) from the target to the back clipping plane. Positive values indicate that the
clipping plane is in front of the target (that is, between the target and the camera),
whereas negative values indicate the clipping plane is behind the target. Returns Acad::eOk
if successful. See DVIEW in the AutoCAD Command Reference for more information on clipping
planes. The back clipping plane distance value is used for the seventh DXF group code 1040
in the 'ACAD' appId xdata attached to the viewport.
def setBackClipOff(self) -> None:
This function turns the back clipping plane off in the viewport. Returns Acad::eOk if
successful. See DVIEW in the AutoCAD Command Reference for more information on clipping
planes. Turning the back clipping plane off clears the third bit in the second DXF group
code 1070 in the 'ACAD' appId xdata attached to the viewport.
def setBackClipOn(self, val: bool) -> None:
This function turns the back clipping plane on in the viewport. See DVIEW in the AutoCAD
Command Reference for more information on clipping planes. Turning the back clipping plane
on sets the third bit in the second DXF group code 1070 in the 'ACAD' appId xdata attached
to the viewport.
def setBackground(self, val: PyDb.ObjectId) -> None:
Sets a new viewport background. To unset, pass in a NULL object ID. Returns Acad::eOk on
success.
def setBrightness(self, val: float) -> None:
Sets the brightness factor for this viewport. Returns Acad::eOk on success.
def setCenterPoint(self, val: PyGe.Point3d) -> None:
This function sets pt (in Paper Space WCS coordinates) to be the center point of the
viewport. Returns Acad::eOk if successful. The center point value is used for DXF group
code 10.
def setCircleSides(self, val: int) -> None:
This function sets newVal to be the circle zoom percent for the viewport. newVal must be
between 1 and 20000 The circle zoom percent controls the number of sides to the
tessellation used when displaying curves. The value can be between 1 and 20000 (the default
within AutoCAD is 100) with higher settings using more sides in the curve tessellation. See
the AutoCAD Command Reference for more information on circle zoom percent. Returns
Acad::eOk if successful. The circle zoom percent value is used for the third DXF group code
1070 in the 'ACAD' appId xdata attached to the viewport.
def setContrast(self, val: float) -> None:
Sets the contrast factor for the viewport. Returns Acad::eOk on success.
def setCustomScale(self, val: float) -> None:
This function sets the custom scale for the viewport. The custom scale defines the
relationship of units in paperspace to units in the viewport. For example, a custom scale
of 0.5 would indicate that 1 unit in the viewport maps to 0.5 units in paperspace.
def setDefaultLightingOn(self, val: bool) -> None:
Sets the state of default lighting for the viewport. Returns Acad::eOk on success.
def setDefaultLightingType(self, val: PyGi.DefaultLightingType) -> None:
Sets the type of default lighting to be used in the viewport. Returns Acad::eOk on success.
def setElevation(self, val: float) -> None:
This method sets the elevation of the UCS used in the viewport. Returns Acad::eOk if
successful.
def setFastZoomOff(self) -> None:
This function always returns Acad::eOk. It is obsolete and will be removed in a future
release.
def setFastZoomOn(self, val: bool) -> None:
This function always returns Acad::eOk. It is obsolete and will be removed in a future
release.
def setFrontClipAtEyeOff(self) -> None:
This function sets the front clipping plane to use the front clip distance setting
regardless of whether or not this happens to cause it to pass through the camera in the
viewport. This does not turn the front clipping plane on if it is currently off. Returns
Acad::eOk if successful. See DVIEW in the AutoCAD Command Reference for more information on
clipping planes. Turning the front clipping plane off clears the fifth bit in the second
DXF group code 1070 in the 'ACAD' appId xdata attached to the viewport.
def setFrontClipAtEyeOn(self, val: bool) -> None:
This function sets the front clipping plane to ignore the front clip distance and instead
pass through the camera in the viewport. This does not turn the front clipping plane on if
it is currently off. See DVIEW in the AutoCAD Command Reference for more information on
clipping planes. Turning the front clipping plane off clears the fifth bit in the second
DXF group code 1070 in the 'ACAD' appId xdata attached to the viewport.
def setFrontClipDistance(self, val: float) -> None:
This function sets the viewport to use newVal as the distance (along the camera-target
line) from the target to the front clipping plane. Positive values indicate that the
clipping plane is in front of the target (that is, between the target and the camera),
whereas negative values indicate the clipping plane is behind the target. Returns Acad::eOk
if successful. See DVIEW in the AutoCAD Command Reference for more information on clipping
planes. The front clipping plane distance value is used for the sixth DXF group code 1040
in the 'ACAD' appId xdata attached to the viewport.
def setFrontClipOff(self) -> None:
This function turns the front clipping plane off in the viewport. Returns Acad::eOk if
successful. See DVIEW in the AutoCAD Command Reference for more information on clipping
planes. Turning the front clipping plane off clears the second bit in the second DXF group
code 1070 in the 'ACAD' appId xdata attached to the viewport.
def setFrontClipOn(self, val: bool) -> None:
This function turns the front clipping plane on in the viewport. See DVIEW in the AutoCAD
Command Reference for more information on clipping planes. Turning the front clipping plane
on sets the second bit in the second DXF group code 1070 in the 'ACAD' appId xdata attached
to the viewport.
def setGridAdaptive(self, val: bool) -> None:
This function determines whether or not the grid adapts to display fewer lines in the
viewport than specified by the GRIDUNIT setting. When zooming out, the grid gets too dense
so fewer lines are displayed. When zooming in the gridlines may be too sparce, so more
lines are displayed. The gridlines always adhere to a multiple of the XY grid spacing
values. Returns Acad::eOk if successful.
def setGridBoundToLimits(self, val: bool) -> None:
This function determines whether or not the grid is drawn beyond the limits for the WCS and
user-defined UCS in the viewport. Returns Acad::eOK if successful.
def setGridFollow(self, val: bool) -> None:
This function determines whether or not the grid is drawn when dynamic UCS switching occurs
after a point is specified for a command that support dynamic UCS switching. This setting
is ignored if the UCSDETECT system variable is off. Returns Acad::eOk if succcessful.
def setGridIncrement(self, val: PyGe.Vector2d) -> None:
This function sets the viewport to use vec.x as the X spacing (in drawing units) of the
grid and vec.y as the Y spacing of the grid. Returns Acad::eOk if successful. For
information on what the grid is and how it's used, see GRID in the AutoCAD Command
Reference. The X spacing value is used for the thirteenth DXF group code 1040 in the 'ACAD'
appId xdata attached to the viewport. The Y spacing value is used for the fourteenth DXF
group code 1040 in the 'ACAD' appId xdata attached to the viewport.
def setGridMajor(self, val: int) -> None:
This function sets the number of major grid lines that are displayed for every nGridLines
number of minor grid lines. For example, if nGridLines is set to 5, a major grid line will
be dispalyed every 5th minor grid line. Returns Acad::eOk if successful.
def setGridOff(self) -> None:
This function turns the grid off in the viewport. Returns Acad::eOk if successful. See GRID
in the AutoCAD Command Reference for more information about the grid. Turning the grid off
sets the seventh DXF group code 1070 in the 'ACAD' appId xdata attached to the viewport to
0.
def setGridOn(self, val: bool) -> None:
This function turns the grid on in the viewport. For more information about the grid, see
GRID in the AutoCAD Command Reference. Turning the grid on sets the seventh DXF group code
1070 in the 'ACAD' appId xdata attached to the viewport to 1.
def setGridSubdivisionRestricted(self, val: bool) -> None:
This function determines whether or not the grid adapts to display more lines in the
viewport than specified by the GRIDUNIT setting. This suddivisdes the grid when zooming in.
The gridlines always adhere to a multiple of the XY grid spacing values. This setting is
ignored if isGridAdaptive() returns false. Returns Acad::eOk if successful.
def setHeight(self, val: float) -> None:
This function sets the viewport's window to be height drawing units high. Returns Acad::eOk
if successful. The viewport height is used for DXF group code 41.
def setIsOn(self, val: bool) -> None:
Sets the visibility state of the viewport. If viewport is not in a database, then the call
fails and returns Acad::eNotInDatabase. If the viewport is not owned by the Paper Space
BlockTableRecord, then the call fails and returns Acad::eNotInPaperspace. The current
visibility state of the viewport is stored in the DXF group 68.
def setLabelBlock(self, val: PyDb.ObjectId) -> None:
This function associates a label block with this viewport. The label block is an
AcDbBlockReference. Possible return values are Acad::eOk if successful,
Acad::eInvalidObjectId if objId is not a valid AcDbObjectId for an object in this database,
or Acad::eUnableToSetViewAssociation if the application is unable to associate the label
block with this viewport.
def setLensLength(self, val: float) -> None:
This function sets the viewport to use length as the lens length when perspective mode is
on in the viewport. Returns Acad::eOk if successful. See DVIEW in the AutoCAD Command
Reference for more information on perspective mode and lens length. The lens length value
is used for the fifth DXF group code 1040 in the 'ACAD' appId xdata attached to the
viewport.
def setLocked(self, val: bool) -> None:
This function locks a viewport's scale. When a viewport is locked, its zoom factor relative
to Paper Space cannot be changed via AutoCAD commands such as ZOOM and VIEW.
def setModelView(self, val: PyDb.XrefObjectId) -> None:
This function associates a model view with this viewport. The model view is identified by
an xref object ID. The viewport will retain reference to the AcDbViewTableRecord of the
xref'd object. The AcDbXrefObjectId identifier will be unique across drawings and can be
used to retrieve the AcDbViewTableRecord that is the model view. Possible return values are
Acad::eOk if successful, Acad::eInvalidObjectId if xrefObjId is not a valid AcDbObjectId in
this database, Acad::eInvalidXrefObjectId if xrefObjId is not a valid AcDbXrefObjectId, or
Acad::eUnableToSetViewAssociation if the application is unable to associate the view with
this viewport.
def setNonRectClipEntityId(self, id: PyDb.ObjectId) -> None:
This function returns the ID of the clipping entity associated with a viewport. For a
clipping entity to be valid, it must be contained in the same paperspace as the viewport
entity and must be one of the following types of entities: AcDbCircle AcDbPolyline
AcDb2dPolyline AcDb3dPolyline AcDbEllipse AcDbRegion AcDbSpline AcDbFace
def setNonRectClipOff(self) -> None:
This function disables non-rectangular clipping for this viewport.
def setNonRectClipOn(self, val: bool) -> None:
This function enables non-rectangular clipping for this viewport. In order for
non-rectangular clipping to be enabled, a clipping entity must have been assigned to this
viewport using setNonRectClipEntityId().
def setOff(self) -> None:
This function turns the viewport off so that the view within it is not displayed on screen.
Returns Acad::eOk if successful with no special conditions. If the viewport is in Paper
Space of the drawing currently in the AutoCAD editor, TILEMODE == 0, and the ObjectARX
function calling setOff() has been executed as a transparent command (that is, there's
another command already in progress), then the call succeeds, but
Acad::eCommandWasInProgress is returned. If viewport is not in a database, then the call
fails and returns Acad::eNotInDatabase. If the viewport is not owned by the Paper Space
BlockTableRecord, then the call fails and returns Acad::eNotInPaperspace. Turning off the
viewport sets the DXF group 68 to 0.
def setOn(self) -> None:
This function turns the viewport on so that the view within it is displayed on screen as
long as this viewport is active (only certain number of viewports can be active at any
time. This number is reported by the MAXACTVP system variable). Returns Acad::eOk if
successful with no special conditions. If the viewport is in Paper Space of the drawing
currently in the AutoCAD editor, TILEMODE == 0, and the ObjectARX function calling setOn()
has been executed as a transparent command (that is, there's another command already in
progress), then the call succeeds, but Acad::eCommandWasInProgress is returned. If viewport
is not in a database, then the call fails and returns Acad::eNotInDatabase. If the viewport
is not owned by the Paper Space BlockTableRecord, then the call fails and returns
Acad::eNotInPaperspace. Turning on the viewport sets the DXF group code 68 to a non-zero
value.
def setOpaque(self) -> None:
Not implemented. Returns Acad::eNotImplemented.
def setPerspectiveOff(self) -> None:
This function turns perspective mode off in the viewport. If perspective mode is already
off, then calling this function does no harm. Returns Acad::eOk if successful. See DVIEW in
the AutoCAD Command Reference for more information on perspective mode. Turning perspective
mode off clears the first bit in the second DXF group code 1070 in the 'ACAD' appId xdata
attached to the viewport.
def setPerspectiveOn(self, val: bool) -> None:
This function turns perspective mode on in the viewport. If perspective mode is already on,
then calling this function does no harm. See DVIEW in the AutoCAD Command Reference for
more information on perspective mode. Turning perspective mode on sets the first bit in the
second DXF group code 1070 in the 'ACAD' appId xdata attached to the viewport.
def setPlotStyleSheet(self, val: str) -> None:
This function has not been implemented. Returns eNotImplimentedYet.
def setPreviousBackground(self, id: PyDb.ObjectId, type: PyGi.DrawableType, force: bool) -> None:
Sets the the previous background for the viewport. Returns Acad::eOk if a valid object ID
is passed in.
def setShadePlot(self, type: PyDb.VpShadePlotType, id: PyDb.ObjectId) -> None:
Sets the shade plot mode and shade plot object associated with this viewport. The shade
plot object is a visual style or render preset that defines how the current viewport will
plot. If shade plot mode is set to kAsDisplayed or kRendered, the shadePlotId parameter is
ignored and the shade plot object ID is automatically set to AcDbObjectId::kNull. If the
shade plot mode is set to kVisualStyle or kRenderPreset, the shade plot object ID must
point to a valid AcDbVisualStyle or AcDbRenderSettings object. Returns Acad::eOk on
success.
def setSheetView(self, val: PyDb.ObjectId) -> None:
This function associates a sheet view with this viewport. The input parameter objId is an
identifier for an AcDbViewTableRecord. Possible return values are Acad::eOk if successful,
Acad::eInvalidObjectId if objId is not a valid AcDbObjectId for an object in this database,
or Acad::eUnableToSetViewAssociation if the application is unable to associate the view
with this viewport.
def setSnapAngle(self, val: float) -> None:
This function sets the viewport to use angle (in radians) as the snap angle setting. The
snap angle is measured within the UCS XY plane, with zero being the UCS X axis, and
positive angles going counterclockwise when looking down the UCS Z axis towards the UCS
origin. Returns Acad::eOk if successful. For more information about snap angle, see SNAPANG
in Appendix B (System Variables) of the AutoCAD Command Reference and SNAP in the AutoCAD
Command Reference. The snap angle value is used for the eighth DXF group code 1040 in the
'ACAD' appId xdata attached to the viewport.
def setSnapBasePoint(self, val: PyGe.Point2d) -> None:
This function sets pt (in UCS coordinates) as the viewport's snap basepoint. Returns
Acad::eOk if successful. For more information about snap basepoint, see SNAPBASE in
Appendix B (System Variables) of the AutoCAD Command Reference and SNAP in the AutoCAD
Command Reference. The snap basepoint X and Y coordinates are used for the ninth and tenth
(respectively) DXF group code 1040s in the 'ACAD' appId xdata attached to the viewport.
def setSnapIncrement(self, val: PyGe.Vector2d) -> None:
This function sets the viewport to use vec.x as the X spacing of the snap grid and vec.y as
the Y spacing of the snap grid. Both values are in drawing units. Returns Acad::eOk if
successful. For information on the snap grid, see SNAP in the AutoCAD Command Reference.
The X spacing value is used for the eleventh DXF group code 1040 in the 'ACAD' appId xdata
attached to the viewport. The Y spacing value is used for the twelfth DXF group code 1040
in the 'ACAD' appId xdata attached to the viewport.
def setSnapIsoPair(self, val: int) -> None:
This function sets the viewport to use newVal as the snap IsoPair setting. The snap IsoPair
indicates the current isometric plane for the viewport. Valid values for newVal are: 0 Left
isoplane 1 Top isoplane 2 Right isoplane Returns Acad::eOk if successful. The snap IsoPair
value is used for the ninth DXF group code 1070 in the 'ACAD' appId xdata attached to the
viewport.
def setSnapIsometric(self, val: bool) -> None:
This function sets the viewport's snap mode to isometric. See SNAP in the AutoCAD Command
Reference for more information on the isometric snap mode. Setting snap to Isometric sets
the eighth DXF group code 1070 in the 'ACAD' appId xdata attached to the viewport to 1.
def setSnapOff(self) -> None:
This function turns snap mode off in the viewport. Returns Acad::eOk if successful. See
SNAP in the AutoCAD Command Reference for more information on snap. Turning snap off sets
the sixth DXF group code 1070 in the 'ACAD' appId xdata attached to the viewport to 0.
def setSnapOn(self, val: bool) -> None:
This function turns snap mode on in the viewport. See SNAP in the AutoCAD Command Reference
for more information on snap. Turning snap on sets the sixth DXF group code 1070 in the
'ACAD' appId xdata attached to the viewport to 1.
def setSnapStandard(self) -> None:
This function sets the viewport's snap mode to standard (that is, non-isometric). Returns
Acad::eOk if successful. See SNAP in the AutoCAD Command Reference for more information on
the standard or isometric snap modes. Setting snap to standard sets the eighth DXF group
code 1070 in the 'ACAD' appId xdata attached to the viewport to 0.
def setStandardScale(self, val: PyDb.StandardScaleType) -> None:
This function sets the scale of a viewport by using a standard scale defined by the
StandardScaleType enumeration. Possible values are: Name Usage Name Usage kCustomScale
Scale is not a standard scale k1_1 1:1 k1_128in_1ft 1/128'= 1' k1_64in_1ft 1/64'= 1'
k1_32in_1ft 1/32'= 1' k1_16in_1ft 1/16'= 1' k3_32in_1ft 3/32'= 1' k1_8in_1ft 1/8' = 1'
k3_16in_1ft 3/16'= 1' k1_4in_1ft 1/4' = 1' k3_8in_1ft 3/8' = 1' k1_2in_1ft 1/2' = 1'
k3_4in_1ft 3/4' = 1' k1in_1ft 1'= 1' k3in_1ft 3'= 1' k6in_1ft 6'= 1' k1ft_1ft 1'= 1' k1_2
1:2 k1_4 1:4 k1_8 1:8 k1_10 1:10 k1_16 1:16 k1_20 1:20 k1_30 1:30 k1_40 1:40 k1_50 1:50
k1_100 1:100 k2_1 2:1 k4_1 4:1 k8_1 8:1 k10_1 10:1 k100_1 100:1 k1000_1 1000:1 This call
sets the scale in a manner similar to the setCustomScale() method except that only standard
scales are accepted. If you call standardScale() on a viewport whose scale doesn't match
any of the standard scales, the kCustomScale is returned. Calling setCustomScale() with a
scale of kCustomScale is an invalid operation.
def setSun(self, retid: PyDb.ObjectId, sun: PyDb.Object, erase: bool) -> None:
Sets the object Id of the AcDbSun object associated with this viewport. Returns Acad::eOk
if the object isn't already associated with another viewport.
def setTransparent(self, val: bool) -> None:
Returns the current transparency state of the viewport.
def setTwistAngle(self, val: float) -> None:
This function sets the viewport to use angle (in radians) as the twist angle of the view in
the viewport. The twist angle is a rotation around the view's line of sight (that is, the
vector from camera to target, which is always perpendicular to the display, looking from
the front of the display towards the back). The zero angle is horizontally to the right
(that is, the display coordinate system's positive X axis). For more information about the
view twist angle, see DVIEW in the AutoCAD Command Reference. Returns Acad::eOk if
successful. The view twist angle is used for the first DXF group code 1040 in the 'ACAD'
appId xdata attached to the viewport.
def setUcs(self, origin: PyGe.Point3d, xAxis: PyGe.Vector3d, yAxis: PyGe.Vector3d) -> None:
This function sets the UCS for this viewport as defined by origin, xAxis, and yAxis. The
resulting UCS will be unnamed.
def setUcs(self, view: PyDb.OrthographicView) -> None:
This function sets the UCS for this viewport as defined by origin, xAxis, and yAxis. The
resulting UCS will be unnamed.
def setUcs(self, ucsId: PyDb.ObjectId) -> None:
This function sets the UCS for this viewport as defined by origin, xAxis, and yAxis. The
resulting UCS will be unnamed.
def setUcs(*args) -> None:
This function sets the UCS for this viewport as defined by origin, xAxis, and yAxis. The
resulting UCS will be unnamed.
def setUcsFollowModeOff(self) -> None:
This function turns off UCS follow mode in the viewport. This means that the viewport will
not change the view to planview whenever the UCS changes in the viewport See UCSFOLLOW in
Appendix B (System Variables) of the AutoCAD Command Reference for more information on
UCSFOLLOW mode. Returns Acad::eOk if successful. Turning off UCS follow mode clears the
fourth bit of the second DXF group code 1070 in the 'ACAD' appId xdata attached to the
viewport.
def setUcsFollowModeOn(self, val: bool) -> None:
This function turns on UCS follow mode in the viewport. This means that the viewport will
generate and display a plan view whenever the UCS changes in the viewport See UCSFOLLOW in
the AutoCAD Command Reference for more information on UCSFOLLOW mode. Turning on UCS follow
mode sets the fourth bit of the second DXF group code 1070 in the 'ACAD' appId xdata
attached to the viewport.
def setUcsIconAtCorner(self) -> None:
This function sets the viewport to have the UCS icon stay in the lower left-hand corner of
the viewport instead of following the current UCS origin. See UCSICON in the AutoCAD
Command Reference for more information on the UCS icon. Returns Acad::eOk if successful.
Setting the UCS icon to stay in the lower left corner clears the second bit in the fifth
DXF group code 1070 in the 'ACAD' appId xdata attached to the viewport.
def setUcsIconAtOrigin(self, val: bool) -> None:
This function sets the viewport to have the UCS icon follow the current UCS origin, as long
as the origin is far enough within the viewport to allow the icon to display properly. See
UCSICON in the AutoCAD Command Reference for more information on the UCS icon following
origin. Setting the UCS icon to float with the UCS origin sets the second bit in the fifth
DXF group code 1070 in the 'ACAD' appId xdata attached to the viewport.
def setUcsIconInvisible(self) -> None:
This function turns off the UCS icon in the viewport (that is, it does not display in the
view). See UCSICON in the AutoCAD Command Reference for more information on the UCS icon.
Returns Acad::eOk if successful. Turning off the UCS icon clears the first bit in the fifth
DXF group code 1070 in the 'ACAD' appId xdata attached to the viewport.
def setUcsIconVisible(self, val: bool) -> None:
This function turns on the UCS icon in the viewport so that it displays in the view. See
UCSICON in the AutoCAD Command Reference for more information on the UCS icon. Turning on
the UCS icon sets the first bit in the fifth DXF group code 1070 in the 'ACAD' appId xdata
attached to the viewport.
def setUcsPerViewport(self, val: bool) -> None:
This function sets the value of UCSVP for the viewport. If ucsvp is true, then the UCS that
is saved with this viewport will become active whenever the viewport is made active.
def setUcsToWorld(self) -> None:
This function sets the ucs for this viewport to the world ucs.
def setUnlocked(self) -> None:
This method unlocks a viewport's scale. When a viewport is locked, its zoom factor relative
to paperspace cannot be changed via AutoCAD commands such as ZOOM and VIEW.
def setViewCenter(self, val: PyGe.Point2d) -> None:
This function sets pt to be the new center point of the viewport's view. Returns Acad::eOk
if successful.
def setViewDirection(self, view: PyDb.OrthographicView) -> None:
This function sets the viewport to use vec (in Model Space WCS coordinates) as the vector
from the view's target to the view's camera (the camera is moved to reflect the new
setting). This also represents the point coordinate set by the AutoCAD VPOINT command. See
VPOINT in the AutoCAD Command Reference for more information on view direction. Returns
Acad::eOk if successful. The view direction X value is used for the second DXF group code
1010 in the 'ACAD' appId xdata attached to the viewport. The view direction Y value is used
for the second DXF group code 1020 in the 'ACAD' appId xdata attached to the viewport. The
view direction Z value is used for the second DXF group code 1030 in the 'ACAD' appId xdata
attached to the viewport.
def setViewDirection(self, dir: PyGe.Vector3d) -> None:
This function sets the viewport to use vec (in Model Space WCS coordinates) as the vector
from the view's target to the view's camera (the camera is moved to reflect the new
setting). This also represents the point coordinate set by the AutoCAD VPOINT command. See
VPOINT in the AutoCAD Command Reference for more information on view direction. Returns
Acad::eOk if successful. The view direction X value is used for the second DXF group code
1010 in the 'ACAD' appId xdata attached to the viewport. The view direction Y value is used
for the second DXF group code 1020 in the 'ACAD' appId xdata attached to the viewport. The
view direction Z value is used for the second DXF group code 1030 in the 'ACAD' appId xdata
attached to the viewport.
def setViewDirection(*args) -> None:
This function sets the viewport to use vec (in Model Space WCS coordinates) as the vector
from the view's target to the view's camera (the camera is moved to reflect the new
setting). This also represents the point coordinate set by the AutoCAD VPOINT command. See
VPOINT in the AutoCAD Command Reference for more information on view direction. Returns
Acad::eOk if successful. The view direction X value is used for the second DXF group code
1010 in the 'ACAD' appId xdata attached to the viewport. The view direction Y value is used
for the second DXF group code 1020 in the 'ACAD' appId xdata attached to the viewport. The
view direction Z value is used for the second DXF group code 1030 in the 'ACAD' appId xdata
attached to the viewport.
def setViewHeight(self, val: float) -> None:
This function sets ht to be the new viewport view height. Returns Acad::eOk if successful.
def setViewTarget(self, val: PyGe.Point3d) -> None:
This function sets the viewport to use pt (in Model Space WCS coordinates) as the location
of the view's target. Returns Acad::eOk if successful. The view target X coordinate is used
for the first DXF group code 1010 in the 'ACAD' appId xdata attached to the viewport. The
view target Y coordinate is used for the first DXF group code 1020 in the 'ACAD' appId
xdata attached to the viewport. The view target Z coordinate is used for the first DXF
group code 1030 in the 'ACAD' appId xdata attached to the viewport.
def setVisualStyle(self, val: PyDb.ObjectId) -> None:
Sets the visual style for the viewport. Returns Acad::eOk if successful.
def setWidth(self, val: float) -> None:
This function sets width to be the width of the viewport entity's window in drawing units.
This is the width in paperspace of the viewport itself, not the width of the model space
view within the viewport. Returns Acad::eOk if successful. The viewport height is used for
DXF group code 40.
def shadePlot(self) -> VpShadePlotType:
This method returns the shade plot mode of the current viewport. The shade plot mode
specifies how the current viewport will plot.
def shadePlotId(self) -> ObjectId:
Get the shade object associated with this viewport. The shade object is a visual style or
render preset that defines how the current viewport will plot. Returns the AcDbObjectId of
the AcDbVisualStyle or AcDbRenderSettings object referenced by this viewport.
def showHiddenLines(self) -> None:
This function sets the viewport to show hidden lines during plotting (that is, no hidden
line removal during plotting). For more information on viewport-specific hidden line
removal during plotting, see MVIEW and the Hideplot option in the AutoCAD Command
Reference. Turning hidden line removal off sets the tenth DXF group code 1070 in the 'ACAD'
appId xdata attached to the viewport to 0.
def snapAngle(self) -> float:
This function returns the snap angle setting (in radians) for the viewport. The snap angle
is within the UCS XY plane, with zero being the UCS X axis and positive angles going
counterclockwise when looking down the UCS Z axis towards the UCS origin. For more
information about snap angle, see SNAPANG in Appendix B (System Variables) of the AutoCAD
Command Reference and SNAP in the AutoCAD Command Reference. The snap angle value is used
for the eighth DXF group code 1040 in the 'ACAD' appId xdata attached to the viewport.
def snapBasePoint(self) -> PyGe.Point2d:
This function returns the snap basepoint (in UCS coordinates) for the viewport. For more
information about snap basepoint, see SNAPBASE in Appendix B (System Variables) of the
AutoCAD Command Reference and SNAP in the AutoCAD Command Reference. The snap basepoint X
and Y coordinates are used for the ninth and tenth (respectively) DXF group code 1040s in
the 'ACAD' appId xdata attached to the viewport.
def snapIncrement(self) -> PyGe.Vector2d:
This function returns an AcGeVector2d in which the X value represents the X spacing of the
snap grid and the Y value represents the Y spacing of the snap grid. Both values are in
drawing units. For information on the snap grid, see SNAP in the AutoCAD Command Reference.
The X spacing value is used for the eleventh DXF group code 1040 in the 'ACAD' appId xdata
attached to the viewport. The Y spacing value is used for the twelfth DXF group code 1040
in the 'ACAD' appId xdata attached to the viewport.
def snapIsoPair(self) -> int:
This function returns the snap IsoPair setting for the viewport. The snap IsoPair indicates
the current isometric plane for the viewport. Possible values are: 0 Left isoplane 1 Top
isoplane 2 Right isoplane The snap IsoPair value is used for the ninth DXF group code 1070
in the 'ACAD' appId xdata attached to the viewport.
def standardScale(self) -> StandardScaleType:
This function returns the scale of a viewport by using a standard scale defined by the
StandardScaleType enumeration. Possible values are: Name Usage Name Usage kCustomScale
Scale is not a standard scale k1_1 1:1 k1_128in_1ft 1/128'= 1' k1_64in_1ft 1/64'= 1'
k1_32in_1ft 1/32'= 1' k1_16in_1ft 1/16'= 1' k3_32in_1ft 3/32'= 1' k1_8in_1ft 1/8' = 1'
k3_16in_1ft 3/16'= 1' k1_4in_1ft 1/4' = 1' k3_8in_1ft 3/8' = 1' k1_2in_1ft 1/2' = 1'
k3_4in_1ft 3/4' = 1' k1in_1ft 1'= 1' k3in_1ft 3'= 1' k6in_1ft 6'= 1' k1ft_1ft 1'= 1' k1_2
1:2 k1_4 1:4 k1_8 1:8 k1_10 1:10 k1_16 1:16 k1_20 1:20 k1_30 1:30 k1_40 1:40 k1_50 1:50
k1_100 1:100 k2_1 2:1 k4_1 4:1 k8_1 8:1 k10_1 10:1 k100_1 100:1 k1000_1 1000:1 If you call
standardScale() on a viewport whose scale doesn't match any of the standard scales, the
kCustomScale is returned. Calling setCustomScale() with a scale of kCustomScale is an
invalid operation.
def subObjModified(self, obj: PyDb.Object, subObj: PyDb.Object) -> None:
This function is invoked on reactors attached to the main object dbObj when the sub-object
pointed to by subObj is opened for write and one of its methods is called which calls
AcDbObject::assertWriteEnabled(). The notification takes place when the object's close() or
cancel() method is called.
def sunId(self) -> ObjectId:
Returns the Id for the AcDbSun object associated with this viewport. If not sun object has
been set, it returns kNull.
def syncModelView(self) -> None:
This function updates the parameters of the AcDbViewport with parameters in the associated
view. The view is an AcDbViewTableRecord. Returns Acad::eOk if successful. Otherwise,
returns Acad::eNoViewAssociation if no model view is associated with this viewport or
Acad::eUnableToSyncModelView if the call is unsuccessful.
def thawAllLayersInViewport(self) -> None:
This function thaws, in this viewport only, all the layers currently frozen in the
viewport. Returns Acad::eOk if successful.
def thawLayersInViewport(self, ids: list[PyDb.ObjectId]) -> None:
This function thaws, in this viewport only, the layers whose IDs are in layerIds. Returns
Acad::eOk if successful.
def twistAngle(self) -> float:
This function returns the twist angle (in radians) of the view in the viewport. The twist
angle is a rotation around the view's line of sight (that is, the vector from camera to
target, which is always perpendicular to the display, looking from the front of the display
toward the back). The zero angle is horizontally to the right (that is, the display
coordinate system's positive X axis). For more information about the view twist angle, see
DVIEW in the AutoCAD Command Reference. The view twist angle is used for the first DXF
group code 1040 in the 'ACAD' appId xdata attached to the viewport.
def ucsName(self) -> ObjectId:
This function returns the object id of an AcDbUcsTableRecord if this viewport's ucs is a
named ucs, otherwise it returns a null id.
def updateDisplay(self) -> None:
This function updates the onscreen display to reflect any changes made to the viewport's
view parameters. If no changes have been made, or the viewport is not on, or is not
onscreen, then this function does nothing. This function is automatically called when the
viewport is closed, so the only time this function should need to be explicitly called is
when the viewport is in a transaction and the onscreen graphics need to be updated before
the outermost transaction is ended. Returns Acad::eOk if successful.
def viewCenter(self) -> PyGe.Point2d:
This function returns the view center (in display coordinate system coordinates) of the
view in the viewport. The view center X coordinate value is used for the third DXF group
code 1040 in the 'ACAD' appId xdata attached to the viewport. The view center Y coordinate
value is used for the fourth DXF group code 1040 in the 'ACAD' appId xdata attached to the
viewport.
def viewDirection(self) -> PyGe.Vector3d:
This function returns an AcGeVector3d, which is the vector (in Model Space WCS coordinates)
from the view's target to the view's camera. This also represents the point coordinate set
by the AutoCAD VPOINT command. For more information on view direction, see VPOINT in the
AutoCAD Command Reference. The view direction X value is used for the second DXF group code
1010 in the 'ACAD' appId xdata attached to the viewport. The view direction Y value is used
for the second DXF group code 1020 in the 'ACAD' appId xdata attached to the viewport. The
view direction Z value is used for the second DXF group code 1030 in the 'ACAD' appId xdata
attached to the viewport.
def viewHeight(self) -> float:
This function returns the height (in display coordinate system coordinates) of the Model
Space view within the viewport. Zooming the view out within the viewport increases this
value and zooming in decreases this value. The viewHeight is used for the second DXF group
code 1040 in the 'ACAD' appId xdata attached to the viewport.
def viewTarget(self) -> PyGe.Point3d:
This function returns an AcGePoint3d which is the location (in Model Space WCS coordinates)
of the view's target. The view target X coordinate is used for the first DXF group code
1010 in the 'ACAD' appId xdata attached to the viewport. The view target Y coordinate is
used for the first DXF group code 1020 in the 'ACAD' appId xdata attached to the viewport.
The view target Z coordinate is used for the first DXF group code 1030 in the 'ACAD' appId
xdata attached to the viewport.
def visualStyle(self) -> ObjectId:
Returns the object ID of the visual style in effect for this viewport.
def width(self) -> float:
This function returns the width of the viewport entity's window in drawing units. This is
the width in Paper Space of the viewport itself, not the width of the Model Space view
within the viewport. The viewport height is used for DXF group code 40.
class ViewportTable Class
def __init__(self, id: PyDb.ObjectId, mode: PyDb.OpenMode, erased: bool) -> None:
def __reduce__(self) -> Any:
def add(self, val: PyDb.AbstractViewTableRecord) -> ObjectId:
This function adds the record pointed to by pRecord to both the database containing the
table and the table itself. Possible return ErrorStatus codes are: Acad::eOk,
Acad::eOutOfMemory, Acad::eDuplicateRecordName, Acad::eNoDatabase (if the ViewportTable is
not in a database).
def cast(otherObject: PyRx.RxObject) -> ViewportTable:
def className() -> str:
def cloneFrom(otherObject: PyRx.RxObject) -> ViewportTable:
def desc() -> PyRx.RxClass:
Returns a pointer to the AcRxClass object representing the specific class, or most recent
parent class explicitly registered with ObjectARX of either the pointer type used to invoke
it or the class qualifier used with it. (Remember that when a static member function is
invoked via a pointer, the pointer type, not the object type, determines which
implementation of the function is invoked.) When working with a pointer to an object and
the proper AcRxClass object for the class of the object pointed to is desired, the
AcRxObject::isA() function should be used, since it is a virtual non-static method and is
therefore not pointer type dependent. Caching the value of the pointer returned by this
method is acceptable, provided the application knows that the AcRxClass object pointed to
by the returned pointer was created by an ObjectARX application that will not be unloaded.
class ViewportTableRecord Class
def __init__(self) -> None:
Objects of this class represent viewport arrangements when TILEMODE == 1 within AutoCAD
(the ViewportTable and its records are not used when TILEMODE == 0). The AcDbViewportTable
(referred to in AutoCAD and DXF documentation as the VPORT table) is the container or owner
of objects of this class. The AcDbViewportTable is unique in that it can contain multiple
AcDbViewportTableRecords with the same name. This is necessary because when a multiple
viewport configuration is saved, all viewports in the configuration must share the name,
but each viewport has its own AcDbViewportTableRecord created to save the data for that
viewport.
def __init__(self, id: PyDb.ObjectId) -> None:
Objects of this class represent viewport arrangements when TILEMODE == 1 within AutoCAD
(the ViewportTable and its records are not used when TILEMODE == 0). The AcDbViewportTable
(referred to in AutoCAD and DXF documentation as the VPORT table) is the container or owner
of objects of this class. The AcDbViewportTable is unique in that it can contain multiple
AcDbViewportTableRecords with the same name. This is necessary because when a multiple
viewport configuration is saved, all viewports in the configuration must share the name,
but each viewport has its own AcDbViewportTableRecord created to save the data for that
viewport.
def __init__(self, id: PyDb.ObjectId, mode: PyDb.OpenMode) -> None:
Objects of this class represent viewport arrangements when TILEMODE == 1 within AutoCAD
(the ViewportTable and its records are not used when TILEMODE == 0). The AcDbViewportTable
(referred to in AutoCAD and DXF documentation as the VPORT table) is the container or owner
of objects of this class. The AcDbViewportTable is unique in that it can contain multiple
AcDbViewportTableRecords with the same name. This is necessary because when a multiple
viewport configuration is saved, all viewports in the configuration must share the name,
but each viewport has its own AcDbViewportTableRecord created to save the data for that
viewport.
def __init__(self, id: PyDb.ObjectId, mode: PyDb.OpenMode, erased: bool) -> None:
Objects of this class represent viewport arrangements when TILEMODE == 1 within AutoCAD
(the ViewportTable and its records are not used when TILEMODE == 0). The AcDbViewportTable
(referred to in AutoCAD and DXF documentation as the VPORT table) is the container or owner
of objects of this class. The AcDbViewportTable is unique in that it can contain multiple
AcDbViewportTableRecords with the same name. This is necessary because when a multiple
viewport configuration is saved, all viewports in the configuration must share the name,
but each viewport has its own AcDbViewportTableRecord created to save the data for that
viewport.
def __init__(*args) -> None:
Objects of this class represent viewport arrangements when TILEMODE == 1 within AutoCAD
(the ViewportTable and its records are not used when TILEMODE == 0). The AcDbViewportTable
(referred to in AutoCAD and DXF documentation as the VPORT table) is the container or owner
of objects of this class. The AcDbViewportTable is unique in that it can contain multiple
AcDbViewportTableRecords with the same name. This is necessary because when a multiple
viewport configuration is saved, all viewports in the configuration must share the name,
but each viewport has its own AcDbViewportTableRecord created to save the data for that
viewport.
def __reduce__(self) -> Any:
def cast(otherObject: PyRx.RxObject) -> ViewportTableRecord:
def circleSides(self) -> int:
This function returns the circle zoom percent of the ViewportTableRecord. The circle zoom
percent controls the number of sides to the tessellation used when displaying curves. The
value can be between 1 and 20000, with higher settings using more sides in the curve
tessellation. See VIEWRES in the AutoCAD Command Reference for more information on circle
zoom percent. The circle zoom percent value is used for DXF group code 72.
def className() -> str:
def cloneFrom(otherObject: PyRx.RxObject) -> ViewportTableRecord:
def desc() -> PyRx.RxClass:
Returns a pointer to the AcRxClass object representing the specific class, or most recent
parent class explicitly registered with ObjectARX of either the pointer type used to invoke
it or the class qualifier used with it. (Remember that when a static member function is
invoked via a pointer, the pointer type, not the object type, determines which
implementation of the function is invoked.) When working with a pointer to an object and
the proper AcRxClass object for the class of the object pointed to is desired, the
AcRxObject::isA() function should be used, since it is a virtual non-static method and is
therefore not pointer type dependent. Caching the value of the pointer returned by this
method is acceptable, provided the application knows that the AcRxClass object pointed to
by the returned pointer was created by an ObjectARX application that will not be unloaded.
def fastZoomsEnabled(self) -> bool:
This function always returns true. It is obsolete and will be removed in a future release.
def gridEnabled(self) -> bool:
This function returns true if the grid is set on in the ViewportTableRecord; otherwise,
returns false. See GRID in the AutoCAD Command Reference for more information about the
grid. The grid on or off setting is reflected in DXF group code 76.
def gridIncrements(self) -> PyGe.Point2d:
Returns an AcGeVector2d in which the X value represents the X spacing (in drawing units) of
the grid and the Y value represents the Y spacing of the grid. For information on what the
grid is and how it's used, see GRID in the AutoCAD Command Reference. The X spacing value
is used for DXF group code 15. The Y spacing value is used for DXF group code 25.
def gridMajor(self) -> int:
Returns the number of minor grid lines between each major grid line in the viewport.
def gsView(self) -> PyGs.GsView:
Returns the AcGsView associated with this ViewportTableRecord (if one has been set via
setGsView).
def iconAtOrigin(self) -> bool:
This function returns true if the ViewportTableRecord is currently set to have the UCS icon
follow the current UCS origin (as long as the origin is far enough within the viewport to
allow the icon to display properly). If the icon is not set to follow the UCS origin in the
viewport, then false is returned. See UCSICON in the AutoCAD Command Reference for more
information on the UCS icon following origin. The UCS icon setting is reflected in the
second bit DXF group code 74 (if the bit is set, then the icon will follow the origin).
def iconEnabled(self) -> bool:
This function returns true if the ViewportTableRecord is currently set to have the UCS icon
display; otherwise, returns false. See UCSICON in the AutoCAD Command Reference for more
information on the UCS icon visibility. The UCS icon visibility setting is reflected in the
first bit of DXF group code 74 (if set, the icon will display).
def isGridAdaptive(self) -> bool:
Returns true if the grid adapts to display fewer lines in the viewport than specified by
the GRIDUNIT setting.
def isGridBoundToLimits(self) -> bool:
Returns true if the grid is drawn beyond the limits for the WCS and user-defined UCS in the
viewport.
def isGridFollow(self) -> bool:
Returns true of the grid will follow a dynamic UCS change in the viewport.
def isGridSubdivisionRestricted(self) -> bool:
Returns true if the grid adapts to display more lines that specified in the GRIDUNIT
setting. When zooming in the gridlines may get too sparse, so more lines are diplayed.
def isUcsSavedWithViewport(self) -> bool:
This function returns the value of UCSVP for the viewport. If this function returns true,
then the ucs that is saved with this viewport will become active whenever the viewport is
made active.
def isometricSnapEnabled(self) -> bool:
This function returns true if snap mode is currently set to isometric in the
ViewportTableRecord; otherwise, returns false. See SNAP in the AutoCAD Command Reference
for more information on the isometric snap mode. The snap Isometric setting is reflected in
DXF group code 77.
def lowerLeftCorner(self) -> PyGe.Point2d:
This function returns an AcGePoint2d object containing the lower left corner of the
viewport window. The X and Y values of this point are expressed as a value between (0.0,
0.0) for the lower left corner of the AutoCAD graphics area and (1.0, 1.0) for upper right
corner of the AutoCAD graphics area. For example, a lower left corner value of (0.5, 0.0)
indicates that the viewport's lower left corner is along the bottom of the AutoCAD graphics
area, midway between the left and right edges of the graphics area. The lower left corner
is used for DXF group code 10.
def number(self) -> int:
Returns the viewport number if the viewport table record corresponds to an active tilemode
window in the AutoCAD editor. Otherwise it returns 0.
def previousBackground(self, val: PyGi.DrawableType) -> ObjectId:
Returns the viewport's previously set background of the specified type .
def previousBackgroundForcedSwitch(self) -> bool:
Returns true if the previous background was forced to switch.
def setBackground(self, val: PyDb.ObjectId) -> None:
Sets a new background to be associated with this view. To unset, pass in NULL as the object
ID. Returns Acad::eOk on success.
def setCircleSides(self, val: int) -> None:
This function sets circleSides to be the circle zoom percent for the ViewportTableRecord.
circleSides must be between 1 and 20000. The circle zoom percent controls the number of
sides to the tessellation used when displaying curves. The value can be between 1 and 20000
(the default within AutoCAD is 100), with higher settings using more sides in the curve
tessellation. See VIEWRES in the AutoCAD Command Reference for more information on circle
zoom percent. The circle zoom percent value is used for DXF group code 72.
def setFastZoomsEnabled(self, val: bool) -> None:
This function is obsolete and will be removed in a future release. It is a no-op, currently
for backwards compatablity.
def setGridAdaptive(self, val: bool) -> None:
This function determines whether or not the grid adapts to display fewer lines in the
viewport than the GRIDUNIT setting. When zooming out the grid gets too dense, so fewer
lines are displayed. The gridlines always adhere to a multiple of the XY grid spacing
values. Returns Acad::eOk if successful.
def setGridBoundToLimits(self, val: bool) -> None:
This function determines whether or not the grid is drawn beyond the limits for the WCS and
user-defined UCS in the viewport. Returns Acad::eOk if successful.
def setGridEnabled(self, val: bool) -> None:
This function turns the grid on or off in the ViewportTableRecord. If enabled == true, the
grid is turned on. If enabled == false, the grid is turned off. See GRID in the AutoCAD
Command Reference for more information on grids. The grid on or off setting is reflected in
DXF group code 76.
def setGridFollow(self, val: bool) -> None:
This function determines whether or not the grid is drawn when dynamic UCS switching occurs
after a point is specified for a command that supports dynamic UCS switching. This setting
is ignored it the UCSDETECT system variable is off. Returns Acad::eOk if successful.
def setGridIncrements(self, val: PyGe.Point2d) -> None:
This function sets the ViewportTableRecord to use base.x as the X spacing (in drawing
units) of the grid and base.y as the Y spacing of the grid. For information on what the
grid is and how it's used, see GRID in the AutoCAD Command Reference. The X spacing value
is used for DXF group code 15. The Y spacing value is used for DXF group code 25.
def setGridMajor(self, val: int) -> None:
This function sets the number of major grid lines that are displayed. A major grid lines
will be displayed for every nGridLines number of minor grid lines. Returns Acad::eOk if
successful.
def setGridSubdivisionRestricted(self, val: bool) -> None:
This function determines whether or not the grid adapts to display more lines in the
viewport than specified by the GRIDUNIT setting. When zooming in, the gridlines may become
too sparse, so more lines are displayed. The gridlines will always adhere to a multiple of
the XY grid spacing values. This setting is ignored if isGridAdaptive() returns false.
Returns Acad::eOk if succesful.
def setGsView(self, val: PyGs.GsView) -> None:
This release of AutoCAD does nothing with the specified pointer other than return it in
gsView.
def setIconAtOrigin(self, val: bool) -> None:
If atOrigin == true, this function sets the ViewportTableRecord to have the UCS icon follow
the current UCS origin as long as the origin is far enough within the viewport to allow the
icon to display properly. If atOrigin == false, the icon stays in the lower left corner of
the viewport. See UCSICON in the AutoCAD Command Reference for more information on the UCS
icon following origin. The UCS icon setting is reflected in the second bit DXF group code
74 (if the bit is set, then the icon will follow the origin).
def setIconEnabled(self, val: bool) -> None:
This function turns the UCS icon on or off in the ViewportTableRecord. If enabled == true,
the UCS icon is turned on. If enabled == false, the UCS icon is turned off. See UCSICON in
the AutoCAD Command Reference for more information on the UCS icon visibility. The UCS icon
visibility setting is reflected in the first bit of DXF group code 74 (if set, the icon
displays).
def setIsometricSnapEnabled(self, val: bool) -> None:
This function sets the snap mode to be isometric or standard in the ViewportTableRecord. If
enabled == true, isometric snap is used. If enabled == false, standard snap is used. See
SNAP in the AutoCAD Command Reference for more information on the isometric snap mode. The
snap Isometric setting is reflected in DXF group code 77.
def setLowerLeftCorner(self, val: PyGe.Point2d) -> None:
This function sets the ViewportTableRecord to use pt as the lower left corner for the
ViewportTableRecord. The X and Y values of pt must be expressed as a value between (0.0,
0.0) for the lower left corner of the AutoCAD graphics area and (1.0, 1.0) for upper right
corner of the AutoCAD graphics area.. For example, a lower left corner value of (0.5, 0.0)
indicates that the viewport's lower left corner is along the bottom of the AutoCAD graphics
area midway between the left and right edges of the graphics area. The lower left corner is
used for DXF group code 10.
def setPreviousBackground(self, id: PyDb.ObjectId) -> None:
Sets the the previous background for the viewport. Returns Acad::eOk if a valid object ID
is passed in.
def setPreviousBackground(self, id: PyDb.ObjectId, stype: PyGi.DrawableType, bForcedSwitch: bool) -> None:
Sets the the previous background for the viewport. Returns Acad::eOk if a valid object ID
is passed in.
def setPreviousBackground(*args) -> None:
Sets the the previous background for the viewport. Returns Acad::eOk if a valid object ID
is passed in.
def setSnapAngle(self, val: float) -> None:
This function sets the ViewportTableRecord to use angle (in radians) as the snap angle
setting. The snap angle is within the UCS XY plane with zero being the UCS X axis and
positive angles going counterclockwise when looking down the UCS Z axis towards the UCS
origin. For more information about snap angle, see SNAPANG in the AutoCAD system variable
documentation and SNAP in the AutoCAD Command Reference. The snap angle value is used for
DXF group code 50.
def setSnapBase(self, val: PyGe.Point2d) -> None:
This function sets base the snap basepoint (in UCS coordinates) for the
ViewportTableRecord. For more information about snap basepoint, see SNAPBASE in the AutoCAD
system variable documentation and SNAP in the AutoCAD Command Reference. The snap basepoint
is used for DXF group code 13.
def setSnapEnabled(self, val: bool) -> None:
This function sets the snap to be on or off in the ViewportTableRecord. If enabled == true,
snap mode is turned on. If enabled == false, snap mode is turned off. See SNAP in the
AutoCAD Command Reference for more information on snap. The snap on or off setting is
reflected in DXF group code 75.
def setSnapIncrements(self, val: PyGe.Point2d) -> None:
This function sets the ViewportTableRecord to use base.x as the X spacing of the snap grid
and base.y as the Y spacing of the snap grid. Both values are in drawing units. For
information on the snap grid, see SNAP in the AutoCAD Command Reference. The X spacing
value is used for DXF group code 14. The Y spacing value is used for DXF group code 24.
def setSnapPair(self, val: int) -> None:
This function sets the ViewportTableRecord to use pairType as the snap IsoPair setting. The
snap IsoPair indicates the current isometric plane for the ViewportTableRecord. Possible
values are: 0 Left isoplane 1 Top isoplane 2 Right isoplane The snap IsoPair value is used
for DXF group code 78.
def setUcsFollowMode(self, val: bool) -> None:
This function sets the UCS follow mode to be on or off in the ViewportTableRecord. If
enabled == true, UCS follow mode is turned on. If enabled == false, UCS follow mode is
turned off. See UCSFOLLOW in the AutoCAD system variable documentation for more information
on UCSFOLLOW mode. The UCSFOLLOW setting is reflected in the fourth bit of DXF group code
71 (if the bit is set, then follow mode is on).
def setUcsPerViewport(self, val: bool) -> None:
This function sets the value of UCSVP for the viewport. If ucsvp is true, then the UCS that
is saved with this viewport will become active whenever the viewport is made active.
def setUpperRightCorner(self, val: PyGe.Point2d) -> None:
This function sets the ViewportTableRecord to use pt as the upper right corner for the
ViewportTableRecord. The X and Y values of pt must be expressed as a value between (0.0,
0.0) for the lower left corner of the AutoCAD graphics area and (1.0, 1.0) for upper right
corner of the AutoCAD graphics area. For example, an upper right corner value of (0.5, 1.0)
indicates that the viewport's upper right corner is along the top of the AutoCAD graphics
area, midway between the left and right edges of the graphics area. The upper right corner
is used for DXF group code 11.
def snapAngle(self) -> float:
This function returns the snap angle setting (in radians) for the ViewportTableRecord. The
snap angle is measured within the UCS XY plane, with zero being the UCS X axis and positive
angles going counterclockwise when looking down the UCS Z axis towards the UCS origin. For
more information about snap angle, see the AutoCAD SNAPANG system variable documentation
and SNAP in the AutoCAD Command Reference. The snap angle value is used for DXF group code
50.
def snapBase(self) -> PyGe.Point2d:
This function returns the snap basepoint (in UCS coordinates) for the ViewportTableRecord.
For more information about snap basepoint, see the AutoCAD SNAPBASE system variable
documentation and SNAP in the AutoCAD Command Reference. The snap basepoint is used for DXF
group code 13.
def snapEnabled(self) -> bool:
This function returns true if snap mode is currently set on in the ViewportTableRecord;
otherwise, returns false. See SNAP in the AutoCAD Command Reference for more information on
snap. The snap on or off setting is reflected in DXF group code 75.
def snapIncrements(self) -> PyGe.Point2d:
This function returns an AcGePoint2d in which the X value represents the X spacing of the
snap grid and the Y value represents the Y spacing of the snap grid. Both values are in
drawing units. For information on the snap grid, see SNAP in the AutoCAD Command Reference.
The X spacing value is used for DXF group code 14. The Y spacing value is used for DXF
group code 24.
def snapPair(self) -> int:
This function returns the snap IsoPair setting for the ViewportTableRecord. The snap
IsoPair indicates the current isometric plane for the ViewportTableRecord. Possible values
are: 0 Left isoplane 1 Top isoplane 2 Right isoplane The snap IsoPair value is used for DXF
group code 78.
def ucsFollowMode(self) -> bool:
This function returns true if the ViewportTableRecord is set to generate and display a plan
view whenever the UCS changes in the viewport; otherwise, returns false. See UCSFOLLOW in
the AutoCAD system variable documentation for more information on UCSFOLLOW mode. The
UCSFOLLOW setting is reflected in the fourth bit of DXF group code 71 (if the bit is set,
then follow mode is on).
def upperRightCorner(self) -> PyGe.Point2d:
This function returns an AcGePoint2d object containing the upper right corner of the
viewport window. The X and Y values of this point are expressed as a value between (0.0,
0.0) for the lower left corner of the AutoCAD graphics area and (1.0, 1.0) for upper right
corner of the AutoCAD graphics area. For example, an upper right corner value of (0.5, 1.0)
indicates that the viewport's upper right corner is along the top of the AutoCAD graphics
area, midway between the left and right edges of the graphics area. The upper right corner
is used for DXF group code 11.
class Visibility Class
kVisible: ClassVar[Self]
kInvisible: ClassVar[Self]
class VpFreezeOps Class
kFreeze: ClassVar[Self]
kThaw: ClassVar[Self]
kReset: ClassVar[Self]
class VpShadePlotType Class
kAsDisplayed: ClassVar[Self]
kWireframe: ClassVar[Self]
kHidden: ClassVar[Self]
kRendered: ClassVar[Self]
kVisualStyle: ClassVar[Self]
kRenderPreset: ClassVar[Self]
class Wipeout Class
def __init__(self) -> None:
Objects of the AcDbWipeout class are polygonally clipped raster entities that are used as
masks to cover parts of other entities in the drawing. The most common use is as a
background mask for text entities. To use this class, acismobj20.dbx must be loaded so that
the AcDbWipeout class implementation code is available.
def __init__(self, points: list[PyGe.Point2d], normal: PyGe.Vector3d) -> None:
Objects of the AcDbWipeout class are polygonally clipped raster entities that are used as
masks to cover parts of other entities in the drawing. The most common use is as a
background mask for text entities. To use this class, acismobj20.dbx must be loaded so that
the AcDbWipeout class implementation code is available.
def __init__(self, id: PyDb.ObjectId) -> None:
Objects of the AcDbWipeout class are polygonally clipped raster entities that are used as
masks to cover parts of other entities in the drawing. The most common use is as a
background mask for text entities. To use this class, acismobj20.dbx must be loaded so that
the AcDbWipeout class implementation code is available.
def __init__(self, id: PyDb.ObjectId, mode: PyDb.OpenMode) -> None:
Objects of the AcDbWipeout class are polygonally clipped raster entities that are used as
masks to cover parts of other entities in the drawing. The most common use is as a
background mask for text entities. To use this class, acismobj20.dbx must be loaded so that
the AcDbWipeout class implementation code is available.
def __init__(self, id: PyDb.ObjectId, mode: PyDb.OpenMode, erased: bool) -> None:
Objects of the AcDbWipeout class are polygonally clipped raster entities that are used as
masks to cover parts of other entities in the drawing. The most common use is as a
background mask for text entities. To use this class, acismobj20.dbx must be loaded so that
the AcDbWipeout class implementation code is available.
def __init__(*args) -> None:
Objects of the AcDbWipeout class are polygonally clipped raster entities that are used as
masks to cover parts of other entities in the drawing. The most common use is as a
background mask for text entities. To use this class, acismobj20.dbx must be loaded so that
the AcDbWipeout class implementation code is available.
def __reduce__(self) -> Any:
def cast(otherObject: PyRx.RxObject) -> Wipeout:
def className() -> str:
def cloneFrom(otherObject: PyRx.RxObject) -> Wipeout:
def desc() -> PyRx.RxClass:
Returns a pointer to the AcRxClass object representing the specific class, or most recent
parent class explicitly registered with ObjectARX of either the pointer type used to invoke
it or the class qualifier used with it. (Remember that when a static member function is
invoked via a pointer, the pointer type, not the object type, determines which
implementation of the function is invoked.) When working with a pointer to an object and
the proper AcRxClass object for the class of the object pointed to is desired, the
AcRxObject::isA() function should be used, since it is a virtual non-static method and is
therefore not pointer type dependent. Caching the value of the pointer returned by this
method is acceptable, provided the application knows that the AcRxClass object pointed to
by the returned pointer was created by an ObjectARX application that will not be unloaded.
def frame(self) -> bool:
def setFrom(self, points: list[PyGe.Point2d], normal: PyGe.Vector3d) -> None:
class Xrecord Class
def __init__(self) -> None:
The AcDbXrecord class is a data storage class that was implemented primarily to allow ADSRX
and AutoLISP programs a means to store data in pieces larger than the xdata's
16KB-per-object limit. Each AcDbXrecord object is capable of storing up to 2GB. By
establishing an object's extension dictionary as the xrecord's owner, it's possible to
associate large amounts of data with that object. The input or output mechanism for the
data is via a linked list of resbuf structures very similar to the way xdata is accessed on
objects. Unlike xdata, however, xrecords work with the standard AutoCAD group codes, which
are all below 1000 in value. All the standard AutoCAD group codes are supported. This means
that, in addition to all the normally used data types, an xrecord is capable of storing
object IDs in any of the four types (hard owner, soft owner, hard pointer, soft pointer)
which allows xrecords to own other objects, including other xrecords.
def __init__(self, id: PyDb.ObjectId) -> None:
The AcDbXrecord class is a data storage class that was implemented primarily to allow ADSRX
and AutoLISP programs a means to store data in pieces larger than the xdata's
16KB-per-object limit. Each AcDbXrecord object is capable of storing up to 2GB. By
establishing an object's extension dictionary as the xrecord's owner, it's possible to
associate large amounts of data with that object. The input or output mechanism for the
data is via a linked list of resbuf structures very similar to the way xdata is accessed on
objects. Unlike xdata, however, xrecords work with the standard AutoCAD group codes, which
are all below 1000 in value. All the standard AutoCAD group codes are supported. This means
that, in addition to all the normally used data types, an xrecord is capable of storing
object IDs in any of the four types (hard owner, soft owner, hard pointer, soft pointer)
which allows xrecords to own other objects, including other xrecords.
def __init__(self, id: PyDb.ObjectId, mode: PyDb.OpenMode) -> None:
The AcDbXrecord class is a data storage class that was implemented primarily to allow ADSRX
and AutoLISP programs a means to store data in pieces larger than the xdata's
16KB-per-object limit. Each AcDbXrecord object is capable of storing up to 2GB. By
establishing an object's extension dictionary as the xrecord's owner, it's possible to
associate large amounts of data with that object. The input or output mechanism for the
data is via a linked list of resbuf structures very similar to the way xdata is accessed on
objects. Unlike xdata, however, xrecords work with the standard AutoCAD group codes, which
are all below 1000 in value. All the standard AutoCAD group codes are supported. This means
that, in addition to all the normally used data types, an xrecord is capable of storing
object IDs in any of the four types (hard owner, soft owner, hard pointer, soft pointer)
which allows xrecords to own other objects, including other xrecords.
def __init__(self, id: PyDb.ObjectId, mode: PyDb.OpenMode, erased: bool) -> None:
The AcDbXrecord class is a data storage class that was implemented primarily to allow ADSRX
and AutoLISP programs a means to store data in pieces larger than the xdata's
16KB-per-object limit. Each AcDbXrecord object is capable of storing up to 2GB. By
establishing an object's extension dictionary as the xrecord's owner, it's possible to
associate large amounts of data with that object. The input or output mechanism for the
data is via a linked list of resbuf structures very similar to the way xdata is accessed on
objects. Unlike xdata, however, xrecords work with the standard AutoCAD group codes, which
are all below 1000 in value. All the standard AutoCAD group codes are supported. This means
that, in addition to all the normally used data types, an xrecord is capable of storing
object IDs in any of the four types (hard owner, soft owner, hard pointer, soft pointer)
which allows xrecords to own other objects, including other xrecords.
def __init__(*args) -> None:
The AcDbXrecord class is a data storage class that was implemented primarily to allow ADSRX
and AutoLISP programs a means to store data in pieces larger than the xdata's
16KB-per-object limit. Each AcDbXrecord object is capable of storing up to 2GB. By
establishing an object's extension dictionary as the xrecord's owner, it's possible to
associate large amounts of data with that object. The input or output mechanism for the
data is via a linked list of resbuf structures very similar to the way xdata is accessed on
objects. Unlike xdata, however, xrecords work with the standard AutoCAD group codes, which
are all below 1000 in value. All the standard AutoCAD group codes are supported. This means
that, in addition to all the normally used data types, an xrecord is capable of storing
object IDs in any of the four types (hard owner, soft owner, hard pointer, soft pointer)
which allows xrecords to own other objects, including other xrecords.
def __reduce__(self) -> Any:
def cast(otherObject: PyRx.RxObject) -> Xrecord:
def className() -> str:
def desc() -> PyRx.RxClass:
Returns a pointer to the AcRxClass object representing the specific class, or most recent
parent class explicitly registered with ObjectARX of either the pointer type used to invoke
it or the class qualifier used with it. (Remember that when a static member function is
invoked via a pointer, the pointer type, not the object type, determines which
implementation of the function is invoked.) When working with a pointer to an object and
the proper AcRxClass object for the class of the object pointed to is desired, the
AcRxObject::isA() function should be used, since it is a virtual non-static method and is
therefore not pointer type dependent. Caching the value of the pointer returned by this
method is acceptable, provided the application knows that the AcRxClass object pointed to
by the returned pointer was created by an ObjectARX application that will not be unloaded.
def isXlateReferences(self) -> bool:
Returns true if the xrecord is currently set to translate any object IDs in its data chain
during deepClone or wblockClone operations. Otherwise it returns false.
def mergeStyle(self) -> DuplicateRecordCloning:
This function returns the merge style of the dictionary. See AcDb::DuplicateRecordCloning.
def rbChain(self, auxDb: PyDb.Database) -> list:
Sets the pointer pointed to by ppRb to point to a linked list of resbuf structures, which
is a copy of the data that this xrecord contains. The application calling this function is
responsible for freeing up the memory used by the resbuf list that *ppRb points to after
this function completes successfully. Object IDs are stored internally in xrecords as
handles. When this function is called, such handles must be exchanged for the appropriate
object IDs so that they can be added to the list of resbufs that *ppRb is set to point to.
If the xrecord is not database-resident, then auxDb is used as the database to ask to
exchange the handles for object IDs. If the xrecord is database-resident, then auxDb is
ignored and the database containing the xrecord is used for exchanging handles for object
IDs. Returns Acad::eOk if successful. If there is insufficient memory to create the
complete resbuf list, then Acad::eOutOfMemory is returned and *ppRb may point to a partial
data list of resbuf structures which need to be freed.
def setFromRbChain(self, resbuf: list, auxDb: PyDb.Database) -> None:
Sets the list whose head is rb to be the data list for the xrecord. Object IDs (group codes
330-369) must be stored in the resbuf's resval.rlname field. Each resbuf must have a valid
AutoCAD DXF group code (in other words, a value under 1000) in its restype field. The
caller may use whatever actual DXF group code value is desired as long as it is appropriate
for the data type (in other words, group codes 1-4 must be text, groups 10-17 must be
ads_points, etc.). Following is a list of the DXF group code ranges and the data types they
represent. From To Data Type 1 4 text 6 9 text 10 17 point or vector (3 reals) 38 59 real
60 79 16-bit integer 90 99 32-bit integer 100 100 subclass data marker 102 102 text 140 149
real 170 179 16-bit integer 210 219 3 reals 270 279 16-bit integer 280 289 8-bit integer
300 309 text 310 319 binary chunk 320 329 handle 330 339 soft pointer ID 340 349 hard
pointer ID 350 359 soft owner ID 360 369 hard owner ID Object IDs (groups 330-369) are
stored in the resval.rlname field as an ads_name. Notice that rb is not a pointer to the
linked list of data resbufs, but rather a reference to the first resbuf in the linked list.
Since pointers are usually used to deal with linked lists of resbufs, this means that the
pointer must be dereferenced when passed into this function, like so: struct resbuf pRb;pRb
= ads_buildlist(40, 1.21, 70, 4500, 0);AcDbXrecord pXrecord = new
AcDbXrecord;pXrecord->setFromRbChain(*pRb);
def setMergeStyle(self, style: PyDb.DuplicateRecordCloning) -> None:
This function sets the merge style for insert operations. See AcDb::DuplicateRecordCloning
for possible styles.
def setXlateReferences(self, val: bool) -> None:
If translate is true, then the xrecord translates any object IDs in its data chain during
any subsequent deepClone or wblockClone operations. Otherwise, the translation is not done.
class XrefGraph Class
def __init__(self) -> None:
AcDbXrefGraph is a derived class for representing xrefs, using the AcDbXrefGraphNode class
to represent one xref database at each node. An AcDbXrefGraph is a representation of the
relationship between a host drawing, its xref'ed drawings, and any nested xref drawings.
Each database or xref block table record is represented by an AcDbXrefGraphNode in the
graph. The host drawing is always the rootNode. Each reference (between databases) is
represented by an edge in the graph, and can be queried by calling AcDbGraphNode::in(idx)
for what is referencing this node, and AcDbGraphNode::out(idx) for what this node
references. While there can be more than one AcDbBlockReference referencing an xref
AcDbBlockTableRecord, only one corresponding edge is created between each XrefNode.
def __reduce__(self) -> Any:
def className() -> str:
def hostDwg(self) -> XrefGraphNode:
def markUnresolvedTrees(self) -> bool:
def xrefNode(self, val: str) -> XrefGraphNode:
def xrefNode(self, val: int) -> XrefGraphNode:
def xrefNode(self, val: PyDb.ObjectId) -> XrefGraphNode:
def xrefNode(self, val: PyDb.Database) -> XrefGraphNode:
def xrefNode(*args) -> XrefGraphNode:
class XrefGraphNode Class
def __init__(self) -> None:
AcDbXrefGraph is a derived class for representing an xref. Each AcDbXrefGraphNode
represents one xref database. An AcDbXrefGraph is a representation of the relationship
between a host drawing, its xref'd drawings, and any nested xref drawings. Each database or
xref BlockTableRecord is represented by an AcDbXrefGraphNode in the graph. The host drawing
is always the rootNode. Each reference (between databases) is represented by an edge in the
graph, and can be queried by calling AcDbGraphNode::in(idx) for what is referencing this
node, and AcDbGraphNode::out(idx) for what this node references. While there can be more
than one AcDbBlockReference referencing an xref AcDbBlockTableRecord, only one
corresponding edge is created between each XrefNode.
def __reduce__(self) -> Any:
def btrId(self) -> ObjectId:
def className() -> str:
def database(self) -> Database:
def isNested(self) -> bool:
def name(self) -> str:
def setBtrId(self, val: PyDb.ObjectId) -> None:
def setDatabase(self, val: PyDb.Database) -> None:
def setName(self, val: str) -> None:
def setXrefNotificationStatus(self, val: PyDb.XrefNotificationStatus) -> None:
def setXrefStatus(self, val: PyDb.XrefStatus) -> None:
def xrefNotificationStatus(self) -> object:
def xrefReadSubstatus(self) -> ErrorStatus:
def xrefStatus(self) -> XrefStatus:
class XrefObjectId Class
def __init__(self) -> None:
def __ne__(self) -> bool:
def __reduce__(self) -> Any:
def getLocalId(self, id: PyDb.ObjectId) -> None:
def getXrefId(self, id: PyDb.ObjectId, hwnd: PyDb.Handle) -> None:
def isNull(self) -> bool:
def isValid(self) -> bool:
def isXref(self) -> bool:
def resolveObjectId(self, id: PyDb.ObjectId) -> None:
def setLocalId(self, id: PyDb.ObjectId) -> None:
def setNull(self) -> None:
def setXrefId(self, id: PyDb.ObjectId, hwnd: PyDb.Handle) -> None:
class XrefStatus Class
kXrfNotAnXref: ClassVar[Self]
kXrfResolved: ClassVar[Self]
kXrfUnloaded: ClassVar[Self]
kXrfUnreferenced: ClassVar[Self]
kXrfFileNotFound: ClassVar[Self]
kXrfUnresolved: ClassVar[Self]