How do I get the BOTH ends of a user-created sketch line segment?

dave_cowden
dave_cowden Member, Developers Posts: 484 ✭✭✭
Suppose the user has created a sketch, and on that sketch has created a line segment. Further, assume I have this as an input to my feature :

        annotation { "Name" : "UserLine","Filter" : GeometryType.LINE,"MaxNumberOfPicks" : 1 }
        definition.userLine is Query;

Now, i'd like to access that linesegment from within featureScript.  I can't figure out how to do it.

I can get the sketch Plane on which the line resides:

var sketchPlane = evOwnerSketchPlane ( context, { entity: definition.userLine } ); 

..And I can get the line definition using evLine:

        var line = evLine(context, {
                "edge" : definition.userLine
        });

But this line definition only gives me the starting point of the line segment the user created, not the ending. But i need to get the beginning and ending of the user's line segment. How can I do that?

I have tried toString() to see if I can access properties of the object I get as a result of evaluateQuery, but that doesn't help me.

There do not appear to be any examples in std of getting a sketch entity this way.

Best Answer

Answers

  • dave_cowden
    dave_cowden Member, Developers Posts: 484 ✭✭✭
    Oh yes of course, evEdgeTangentLines, did not think of that one!
    Thanks for the fast answer!