Eng-Tips is the largest engineering community on the Internet

Intelligent Work Forums for Engineering Professionals

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

Putting newly created edge into selection without selecting it

Status
Not open for further replies.

Charlie

Mechanical
Dec 28, 2015
15
0
0
IN
I want to create a shaft and add a chamfer on its one edge.
I know the edge on which i want to add chamfer.
So, i only want from user the length of chamfer and edge selected by itself.
Anybody knows how edges can be send to selection without selecting it?
Is There any name method for catia by which i can select it?
for example

Sub catmain()
... ' the sketch creting programming

set shaft1= part1.shapefactory.AddNewShaft(sketch1)
'add new shaft

[highlight #8AE234]set reference1 =[/highlight]
' I want newly created edge reference here
set chamfer1 = part1.shapefactory.AddNewChamfer(reference1, catTangencyChamfer, catLengthAngleChamfer, catNoReverseChamfer, 1#, 45#)

end sub

If anyone know something about it please help asap.
 
Replies continue below

Recommended for you

First I would like to say I really like your request, too many times, developers will just ask user to select the edge and voila... well when the code can be smart, you should look into it, and you do. Thanks.

could you share with us the shape of the shaft and indicate which edge you want to chamfer?

you said you know the edge you want to chamfer. May I ask how do you know? how do you define it? This will help you find the steps in catia.

for instance, if the edge if the foremost edge of a cylinder in the Y direction when Y is also the revolution axis, then you could use extremum to find the end face in the Y direction, then search the edge of that face...

Eric N.
indocti discant et ament meminisse periti
 
or if the script create the sketch for the shaft and the geometry in the sketch always the same then maybe searching for edges in the shaft and picking the n[sup]th[/sup] edge will do... you just have to manually define n

Eric N.
indocti discant et ament meminisse periti
 
Status
Not open for further replies.
Back
Top