AnsweredAssumed Answered

swselecttype_e to string? (select feature to mate)

Question asked by Jared Ticotin on Jan 28, 2020
Latest reply on Jan 28, 2020 by Artem Taturevych

Is there any way to get the "type" from SelectByID2(name,type,.....) as a string from the Feature object?

 

I've Tried:

 

((SldWorks.Entity) feat).GetType()

 

But this gives an integer. the SelectByID2 requires the type as a string input. I'm looking for the strings listed under Remarks here:

2018 SOLIDWORKS API Help - swSelectType_e Enumeration 

 

I also tried selecting with:

feat.Select2(true,0);

This does select the feature but doesn't seem to work with mate5.

 

Basically I am trying to get a feature object based on some criteria and then select it to mate to something else later. Please let me know if there's some way to do this

Outcomes