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!

CATIA MACRO AddNewHoleFromRefPoint REFERENCE POINT FROM VERTEX

Status
Not open for further replies.

NikoJzzz

Automotive
Jun 29, 2018
6
0
0
ES
Hi all,

Im trying to make a hole using the method AddNewHoleFromRefPoint (point, ref, depth)
The method fails with the point reference.
The reference im using is a vertex. This is becase I use the userpattern to make some holes, and the userpattern needs a sketch with multiple points.
I have done it extracting the brepname, but it only works with sketches with "Sketch.xx" name. I want to make it in all the sketches..

PD: The method AddNewHoleFromSketch is not valid for me, because I want to make the hole in a specific point of the sketch, and this method makes the hole in the first point of the sketch, and sometimes is not valid for me..

Hope you can help me.

Thank you in advance.
 
Replies continue below

Recommended for you

Hi Tiago,

Something like this,
'''''''''''''''''''''
oInputType(0) = "Vertex"
oselection.Clear
oStatus = oselection.SelectElement2(oInputType, "Select a point", True)
If (oStatus = "Cancel") Then
Exit Sub
End If
Set overtex = oselection.Item(1).Value
'''''''''''''''''''''''
Then Im using the vertex brepname to get the reference. I have seen some people using brpname to reference the vertex, so I think I have done it well. Now Im trying to select different type of boundary elements, for example a circle to select it and make the hole in the center of it, but 'selectelement' only allow me to select one type of element... any idea how to solve this problem?
Thanks in advance.
 
Status
Not open for further replies.
Back
Top