ads.textbox(assoc_list) -> (pt1, pt2)
Finds the coordinates of a box that encloses a text entity. If the argument is an acad_ename object specifying an existing text, attdef or attrib entity in the current drawing, then the bounding box of this entity is returned. If the argument is an assoc list (a sequence of ads_cons objects) that describes the properties of a text entity, then the bounding box of this virtual text entity is returned. If the first element of the assoc list specifies an existing text, attdef or attrib entity (with code -1), then the properties of this entity will be used, while each of the following ads_cons objects overrides a overrides the entity's acutal attributes.
If the association list doesn't begin with a -1 ads_cons object, it must begin with a 0 (entity type) element, and it must contain an element that contains the string itself. This is a 1 (value) element for a text or attrib entity, or a 2 (tag string) element for an attdef entity. Other values are assumed to be the default values unless they are explicitly specified. The defaults are as follows:
|Style (7)||the current text style|
|Size (40)||the size of the style if that is fixed; otherwise the current default size of the style|
|Width factor (41)||the default width of the style|
|Obliquing angle (51)||the default angle of the style|
Note: This function does not work with paragraph text (mtext) or mtext formatting characters.
Translates a point or a displacement from one coordinate system into another. The point argument is a 3D point or a 3D displacement vector. The from argument specifies the coordinate system in which pt is expressed, and the to argument specifies the coordinate system of this function's result. If the disp argument is nonzero, pt is treated as a displacement vector; otherwise, it is treated as a point.
The from and to arguments can specify a coordinate system in any of the following ways:
an integer out of:
ads.CS_WCS the world coordinate system ads.CS_UCS the current user coordinate system ads.CS_DCS the display coordinate system. this is:
- the current viewport when the other system is CS_WCS or CS_UCS
- the current model space viewport when the other system is CS_PSDCS
ads.CS_PSDCS the world coordinate system Warning: The paper space DCS (CS_PSDCS) can be transformed only to or from the model space DCS. Therefore, if the from argument equals CS_PSDCS, the to argument must equal CS_DCS, and conversely.
an acad_ename object to specify the entity coordinate system For planar entities, the ECS can differ from the WCS. If the ECS does not differ, conversion between ECS and WCS is an identity operation.
a 3D extrusion vector (a tuple of three floats) Extrusion vectors are always represented in World coordinates; an extrusion vector of (0,0,1) specifies the WCS.