You can! Have you got an example of where you can't?Is it possible yet to dimension between 2 lines?
Well spotted! My bad.this is a question in the AlibreScript Section of the forum...;-)
I could live with that. The logic makes sense.I suspect you'll have to do the same thing in your script, Add reference line on the axis, constrain it fixed (?), then add dimension from reference line to your line.
XLine = Sketch.AddLine([0,0],[50,0], True)
Sketch.AddConstraint([XLine.Start, Sketch.Origin],Sketch.Constraints.Coincident)
Sketch.AddConstraint([XLine],Sketch.Constraints.Vertical)
YLine = Sketch.AddLine([0,0],[0,50], True)
Sketch.AddConstraint([YLine.Start, Sketch.Origin],Sketch.Constraints.Coincident)
Sketch.AddConstraint([YLine],Sketch.Constraints.Vertical)
Do you mean like sketch analysis healing, etc? ... which does work.Does anyone else find that the sketch solver doesn't work with things added by the Alibre Script/API? Meaning it doesn't move objects to make the constraints valid like it does when manually assigning them.
Units.Current = UnitTypes.Inches
prt = CurrentPart()
sk = prt.AddSketch('Test', prt.XYPlane)
Point1 = sk.AddPoint(1,1)
Point2 = sk.AddPoint(5,2)
Point3 = sk.AddPoint(4,3)
print(sk.AddConstraint(Point1,Sketch.Constraints.Fix))
#print(sk.AddConstraint(Point2,Sketch.Constraints.Fix))
sk.AddDimension(Point1, Point2)
sk.AddDimension(Point2, Point3)
sk.AddDimension(Point3, Point1)
Line1 = sk.AddLine(0,-1,5,-1,False)
Line2 = sk.AddLine(0,-2,5,-2,False)
Line3 = sk.AddLine(0,-3,5,-3,False)
print(sk.AddConstraint([Point1, Line1],Sketch.Constraints.Coincident))
print(sk.AddConstraint([Point2, Line1],Sketch.Constraints.Coincident))
print(sk.AddConstraint([Point2, Line2],Sketch.Constraints.Coincident))
print(sk.AddConstraint([Point3, Line2],Sketch.Constraints.Coincident))
print(sk.AddConstraint([Point3, Line3],Sketch.Constraints.Coincident))
print(sk.AddConstraint([Point1, Line3],Sketch.Constraints.Coincident))
#print(sk.AddConstraint(Point2,Sketch.Constraints.Fix))
We need this ability!For example a sketch point at a distance perpendicular from a line.
The vertical distance from sketch point to sketch point.
The horizontal distance from sketch point to sketch point.
I certainly think so. I created support tickets for these issues.We need this ability!