I'm trying to created a referance plane on the end point of a line, however when the point is to close to the part origin point@origin is selected instead of the endpoint.
Here is the code I'm using:
-------------------------------------------
'CREATE PLANE AT START PNT
blnstatus = objPart.Extension.SelectByID2("", "EXTSKETCHPOINT", FirstPntX, FirstPntY, FirstPntZ, True, 0, Nothing, 0)
blnstatus = objPart.Extension.SelectByID2("", "EXTSKETCHSEGMENT", FirstPntX, FirstPntY, FirstPntZ, True, 1, Nothing, 0)
Dim swRefPlane As SldWorks.RefPlane
Set swRefPlane = objPart.FeatureManager.InsertRefPlane(4, 0, 2, 0, 0, 0)
objPart.ClearSelection2 True
--------------------------------------------
Also could anyone explain how the Append, Mark, Callout, SelectOption, and Value do for the SelectByID2 Method?
SolidworksApi macros