Eng-Tips is the largest engineering community on the Internet

Intelligent Work Forums for Engineering Professionals

Catia V5 - Macros

Status
Not open for further replies.

xPAIVAx

Industrial
Jul 12, 2023
21
0
0
PT
Hi guys,

Im currently working with Catia V5 Macros and i already have a macro to do this in the picture

Base_Extrator_qokygi.png


but in this macro i can only select and do one by one, im trying to improve it to select all the holes i need and than do this in the picture.

Baser_Extrator_wmvfvy.png


Best Regards,

Paiva
 
Replies continue below

Recommended for you

sharing your code could be the best way to get some help.

you need to define what you call a hole, is it the feature in the tree, the cylindrical surface in 3D?

If you work with selection, you just have to adapt your existing code to cycle all selection...
Or you could go in your solid and work with any Hole feature...or...


Eric N.
indocti discant et ament meminisse periti
 
Yes your right, when i mentioned hole i was talking about the feature in the part design

hole_cg4rp3.png


this one.

I told you something wrong too, the pictures above are not macros, they're just something i did with surfaces.

I created this using a UserFeature, something like this.

base_zjgxnv.png
 
so you want to work with knowledge template or VBA ?

or you want to use VBA to instantiate the UDF ?

Eric N.
indocti discant et ament meminisse periti
 
If possible i wnat to work with both, create a macro that let me select as many holes as i want and then i use the knoledge template to insert that base on the top of the hole.
 
well if you work with selection and if your code already manage working with 1 hole the full code should not be a real problem.

To make it simple, you can first create a function that will take hole as input and instantiate the udf.

Then the main code will work on the selection, and get holes from it, then call the function for each one.

Eric N.
indocti discant et ament meminisse periti
 
i can't get the macro to manage 1 hole and the udf doesn't show on the macro code.

I'm trying other things too and one of them is without using the udf.

Its' something like this

Capturar_ewoj6o.png

ds_gvoqjn.png


And i want to create a macro that enters in my product search the components with a certain name and see if inside is something with the name "Base_Extrator", and if it has creates another part and pull everything in.
 
Status
Not open for further replies.
Back
Top