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!

CATIA MACRO AddNewHoleFromRefPoint REFERENCE POINT FROM VERTEX

Status
Not open for further replies.

NikoJzzz

Automotive
Joined
Jun 29, 2018
Messages
6
Location
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.
 
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.

Part and Inventory Search

Sponsor

Back
Top