Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations JAE on being selected by the Eng-Tips community for having the most helpful posts in the forums last week. Way to Go!

[API] SelectByID2 trouble

Status
Not open for further replies.

binoyte

Mechanical
Joined
Jan 25, 2016
Messages
2
Location
GB
Hi there

I've the same need and the same issue as reported here : where no solutions was found.

Code:
boolstatus = Assembly.Extension.SelectByID2("Point1@Origine", "EXTSKETCHPOINT", 0, 0, 0, False, 0, Nothing, 0)
    boolstatus = Assembly.Extension.SelectByID2("Point1@Origine@tibia-1@assieme", "EXTSKETCHPOINT", 0, 0, 0, True, 0, Nothing, 0)
    boolstatus = Assembly.Extension.SelectByID2("Point1@Origine@punta-1@assieme", "EXTSKETCHPOINT", 0, 0, 0, True, 0, Nothing, 0)
    
    Set myMate = Assembly.AddMate3(20, 0, False, 0, 0, 0, 0, 0, 0, 0, 0, False, longstatus)
    Assembly.ClearSelection2 True

The trouble is not in the addmate() method, but ins the selectionByID2(). Boolstats is false, and I don't understand why.

Thanks in advance for your help
 
Hi,

Try to avoid using SelectByID2 for selection unless the permanent name is used. Please note that the sketch elements such as sketch segments or sketch points have temporary names. So 'Point1' is assigned dynamically and can change later. Furthermore SelectByID2 is a view specific method for some elements. That means if the selection target is not visible in the view (like out of the view boundary or overlapped by another entity) selection may fail.

You need to use SketchPoint::Select4 method for selecting the points.

Thanks,
Artem
 
ok thanks i'll try this method.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top