Continue to Site

Eng-Tips is the largest engineering community on the Internet

Intelligent Work Forums for Engineering Professionals

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

Macro: identifying lines, edges, faces, etc

Status
Not open for further replies.

razzendahcuben

Mechanical
Jan 10, 2009
79
When I record a macro that involves me selecting lines, edges, faces, etc the macro includes the "selectbyid2" member. The problem with this member is that it selects based on X Y Z location and not by a name. So if I try to run the macro again with an entity in a slightly different location the macro fails. Is there anyway to select entities using a name rather than location?

Any help would be very appreciated.
 
Replies continue below

Recommended for you

If you want to have a macro that handles selections, you need to learn how to use the "Selection Manager" object. Recorded macros are exceptionally bad at handling selections in a manner that allows repeated use in other circumstances.

In short, you will need to learn how to program.
 
TheTick: Please try to appreciate the difference between programming syntax and simply knowing member names. I have a perfectly fine grasp of syntax and conditional logic, what I don't know much about are classes and members of the SW API seeing as I am fairly new to it. If I need to explore the Selection Manager, so be it, but the asinine judgments about my programming abilities are a tad unnecessary...
 
Glad to hear you already know how to program. I wasn't intending to pass judgment on your abilities. I just wanted to make it clear that this could not be accomplished by macro-recording.

Step 1 complete. You know how to program. Now all we need is someone who is willing to help you learn selection management objects in SW API. I suggest handleman. I'm done here.
 
I'm very willing to teach myself. Any online resources you would recommend that explain the inner workings of the selection manager? I was hoping to avoid wading through the API help and object browser.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor