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!

Please help with an Catia vba for making a sketch in a random part

Status
Not open for further replies.

TudorM

Automotive
Mar 30, 2020
100
AT
Hello guys , please help me with a Catia Macro!
Untitled_zpdzex.jpg


So i have to random parts in a product.
What i need is making a sketch in part with L-shape using 2 lateral faces and a support face for the sketch.
The sketch should be a line in construction mode with some points in it.

On the plate i need same macro but with an rectangular sketch 4 points/ or to use first macro for second part (plate) to make the same sketch.
I need this to make holes , i have a lot of this type of connections and i am getting tired to do them. manually so please HELP!

I repeat i need this for RANDOM PARTS,thank you.
 
Replies continue below

Recommended for you

You can do it without macro. Search on this forum for powercopy and part template.

Best regards,
Costin Ruja
 
No license for that one Costin at work , need an vba for this there are some rules for part structure as well...
 
Hello,
OFC It can be done with macro, do you have any code for this, to help you with it.

[link catiavbmacro.com ]catiavbmacro.com [/url]
 
Problem Solved but not entirely, thank you all for answering just need little more help , cause at the moment in makes a random geometrical set and as reference plane is not what i need.


.........
Dim hybridBody1 As HybridBody
Set hybridBody1 = hybridBodies1.Add() ------ here i want to find a geometrical set that i allready have name : Skizzen and if it is not in part to create one with that name

Dim sketches1 As Sketches
Set sketches1 = hybridBody1.HybridSketches

Dim reference1 As Reference
'Set reference1 = part1.CreateReferenceFromName("Selection_RSur:(Face:(Brp:(Pad.1;1);None:();Cf11:());Assemble.32_ResultOUT;Z0;G6284)") ---at the moment i just put it as coment and acts just like reference , how to make this line to create another reference with an input box lets say i want plane XZ from axis system , sorry i am new and trying my best,thanks.

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top