fix(com): create linear dimensions with AddDimRotated (#3)
dimension_linear always failed with '<unknown>.AddDimLinear' on the COM backend — pywin32's dynamic dispatch error for a method that does not exist: the AutoCAD ActiveX API has no AddDimLinear. AddDimRotated takes the same arguments (XLine1Point, XLine2Point, DimLineLocation, RotationAngle), so the call site only changes the method name. Adds a mocked regression test asserting AddDimRotated is called with the exact point/rotation arguments and AddDimLinear never is. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Fable 5
parent
d0dfa8cf2d
commit
3a0519724b
@@ -824,7 +824,9 @@ class ComBackend(AutoCADBackend):
|
||||
) -> EntityInfo:
|
||||
def _sync():
|
||||
mspace = _msp()
|
||||
dim = mspace.AddDimLinear(
|
||||
# The ActiveX API has no AddDimLinear — rotated linear dims are
|
||||
# created with AddDimRotated (GH issue #3).
|
||||
dim = mspace.AddDimRotated(
|
||||
_apoint(x1, y1), _apoint(x2, y2),
|
||||
_apoint(dim_x, dim_y), deg2rad(rotation),
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user