Complete the code to apply a horizontal constraint to a line in AutoCAD.
line = acad.model.AddLine(start_point, end_point) line.[1]('Horizontal')
The AddGeometricConstraint method applies geometric constraints like horizontal or vertical to objects.
Complete the code to fix the length of a line using a dimensional constraint.
dim = acad.model.AddDimAligned(point1, point2, dim_location) dim.[1] = 100
The Value property sets the length value of the dimensional constraint.
Fix the error in the code to apply a perpendicular constraint between two lines.
line1 = acad.model.AddLine(p1, p2) line2 = acad.model.AddLine(p3, p4) acad.model.[1](line1, line2, 'Perpendicular')
The AddGeometricConstraint method is used to apply geometric constraints like perpendicularity between objects.
Fill both blanks to create a parametric constraint that fixes the radius of a circle.
circle = acad.model.AddCircle(center_point, [1]) param = circle.Constraints.Add[2]('Radius')
The first blank is the radius value to create the circle. The second blank is the type of constraint to fix the radius dimension.
Fill all three blanks to create a dictionary of constraints with their types and values.
constraints = {
'horizontal': [1],
'vertical': [2],
'length': [3]
}Horizontal and vertical constraints are geometric, while length is a dimensional value set to 100.
