Welcome to 3DCADForums

Join our CAD community forums where over 25,000 users interact to solve day to day problems and share ideas. We encourage you to visit, invite you to participate and look forward to your input and opinions. Acrobat 3D, AutoCAD, Catia, Inventor, IronCAD, Creo, Pro/ENGINEER, Solid Edge, SolidWorks, and others.

Register Log in

catia + VB - creating two holes in one face

W

waniak

Guest
Hi!
Why this code doesn't work:

Dim oHoleOPx As Hole
Set oHoleOPx =
oPart.ShapeFactory.AddNewHoleFromPoint(0,0,0,PowierzchniaCzolowaOP, 50)
Dim oHoleOPx1 As Hole
Set oHoleOPx1 =
oPart.ShapeFactory.AddNewHoleFromPoint(0,10,10,PowierzchniaCzolowaOP, 50)

PowierzchniaCzolowaOP is a reference to the face. The sketch is
created at the YZ plane.

What's wrong? CATIA can't create the second hole. It shows an error:
'Colinear directions: cannot build an axis or a plane'.


Best regards,
Michalcatia + VB - creating two holes in one face
 

support

New member
Try updating the first hole ...

Try updating the first hole (calling oPart.UpdateObject oHoleOPx) before attempting to create the next.

The reference to the face is apparently temporarily not valid until this is done.

CliffJohnson, COE CATIA V5 Forum

Thanks.
3DCADTips Support Desk :cool:
 

Sponsor

Top