Announcements
Attention for Customers without Multi-Factor Authentication or Single Sign-On - OTP Verification rolls out April 2025. Read all about it here.
WCrihfield
in reply to: Cadkunde.nl

As for the task of creating a series of SketchPoints along a SketchLine...  When creating a SketchPoint, it want a Point2D as input.  We can get some data like that from digging down a few levels under the SketchLine's properties.  The SketchLine.Geometry property returns a LineSegment2D object.  This has the 3 expected properties for start, mid, and end points, but we can dig into its LineSegment2D.Evaluator property to get the Curve2DEvaluator object, which has a lot of nice methods available for more detailed analysis/data.  We can use its GetParamExtents to get its Min & Max parameters.  To use that, you must first create the two Double type variables, with no values set to them yet, then supply those to that method, and the method will fill in their values, and you can use those variables later for certain things.  Now it depends on how you want to specify the locations of the SketchPoints as to which methods we need to use next.  If we used the GetLengthAtParam method, and used those two variables as the first two inputs, it would return the length of the entire SketchLine, but we don't need that, because that was available at a higher level.  Usually by param, they mean a Double representing a percentage of a length, like .5 being equal to 50%.  If we use the GetParamAtLength method, we could use the Min variable as the first input, then a Length for the second input, then the third input would be a pre-declared Double type variable that the method would set the value of to the parameter (percentage) that point along the entity is at.  If we used the GetPointAtParam method, I believe the first input variable (an Array of Double) would be 1 or more params (percentages along the entity), and the other input variable (also an Array of Double) would be set to the sets of 2D point coordinates for each point at the specified parameters.  But I haven't used that one in a while, so I'm a little rusty.

Wesley Crihfield

EESignature

(Not an Autodesk Employee)