Continue to Site

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!

CATIA V5 script - creating mulitple holes on complex surface 3

Status
Not open for further replies.

longhduong

Aerospace
Jan 30, 2012
15
US
thread560-251808

Hi,
I am a beginner with scripts and was wondering.

If I have a complex (non planer) surface with multiple points defined within a geometric set, is there a way to instantiate multiple holes on that complex surface? Similar to user pattern but instead of choosing a sketch as the pattern you would choose the geo set of points.

I've read that this is possible but I have not seen any CATscript file on this.

Thanks for the help!

-Long
 
Replies continue below

Recommended for you

Sorry guys... was tied up for a while with urgent matters. I think I know what the issue is, I believe I was short in my description, you need to have 4 keywords when creating the ARM catalog.

Name (default naming is ok)
Logical Name (PlaneTangent)
Type (UserFeature)
Usage <unset>
 
No problem, we are all busy. Thanks for your help!

Can you upload a picture of your UDF's spec tree and also the Userfeature Definition box? I am curious how you constructed the UDF. Was the UDF constructed on a flat surface? Did you generate a TYPE or rename your inputs in the definition box? If so can you show what you used? I am trying to recreated what you've shown to begin with and then make modifications from there.

 
Hi
I have post "tool for Catia"
with macro
"prise de pression"
create holes in complexe surfaces
This macro is in french but i try to translate and not sure about the english catia words

Camadian
 
This is great I was able to break down your knowledge pattern, ARM, and UDF to determine my mistakes. I am listing the problems I discovered. Hopefully this will help others trying to learn Knowledge pattern avoid the same pitfalls.


1) One thing I did not realize when creating the UDF you could have multiple internal components. My original UDF consisted of 1 internal component (Hole) and 2 Inputs of components (Point and Face). This lead to a UDF creation error. To fix this I added the tangent plane of my hole feature to my internal components. This does not change the number of input components.

2) In the Userfeature Definition, under Inputs tab, I intitially changed my inputs from "point.1" to "point" and "...face.1" to "Surface". IN the knowledge pattern, you have to reference these inputs and using the string "point" was causing an error. I tested this by changing the string to a less generic string "POS" and it works. I've since changed all my strings in my UDF, arm, and knowledge pattern to less generic words to avoid this problem.

3) Creating the catalog was also a challenge if you don't know the requirements. I originally created the catalog within the PKT workbench using the tool "Save in Catalog". This saves all the knowledge templates you currently have loaded in that model into a new or existing catalog. The problem with this method is that the new component created in the catalog does not have the 4 required keywords, "name", "logical name", "usage", and "type". In short I found it easier to create the catalog component from scratch then trying to delete and recreated the necessary keywords.

The knowledge pattern code itself is not that tricky. I found towards the end that most of the errors I had when executing the knowledge pattern was not in the code but rather the root cause was in the UDF and catalog. Just make sure you don't have any typos.


Thanks everyone for your help!
 
I have to give you a star for the breakdown:) noticed during this thread that I took some steps for granted describing the knowledge pattern.

If you didn't know you can now take the knowledge pattern and make a power copy of it (don't forget to get all the necessary components) and store it in a catalog where you publish it so it can be added as a feature in a toolbar.
 
Thanks to both of you for such valuable information.

Eric N.
indocti discant et ament meminisse periti
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Top