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 macros using VB

Status
Not open for further replies.

safouane

Mechanical
Jun 21, 2014
2
TN
Hi everyone,

I'm working on a VB project for catia which consists on a visualization widget that gives customer feedback about a specific part in an assembly product.

When the program starts, a userform will appear with two comboboxes. The first one contains the type of feedback : Functional, Physical, Behavioral and ergonomic. The second one contains the name of all the parts of the assembly.

The user must choose a specific part and a type of feedback, than he clicks on a command button "visualize" and a second window will appear with a text (the corresponding feedback about the choosen part).

My questions:

How to fill in automatically the combobox with the parts name?
When the user choose a part name in the combobox, a 3D browser like the one in Catia must appear to highlight the part. How to do this in the first userform?

Thank you.
 
Replies continue below

Recommended for you

Hi,

Many things to clarify....it will be a vba or vb.net application?
Do you want to see everything as in spec tree (products, parts, components) with levels or only parts?
You want comboboxes or textboxes to see what is in CATIA spec tree?
When you pick something, you want also to be highlighted in CATIA window?
What does it means "3D browser like the one in CATIA" for you?
Just for my curiosity, what do you mean by "Functional, Physical, Behavioral and ergonomic"?


Regards
Fernando

 
hi,

In my company we are starting to use Catia. I will be the first engineer to start use it. We had use Unigraphics since 2004 (i had use it from 2007). I have realized that i need some macros to improve my work.

I will need macros for the following functions,
- Rename parts and attributes in a product
- Creat a part number, according to it's position in sub assembly
- Button for pre defined colors (to paint specific areas in a part)
- creat a rough stock dimensions to generate bill of materials


For part rename, I have found a macro, according to the video that is presented, it looks powerfull, but i don't now why it doesn't work


Can anybody help me?

Greetings from Portugal
 
Hi everyone,
I have to project all the faces of a body on a plane in such a way that the all coordinates (x,y,z) of the body become (x,0,sqrt(y^2+z^2))on the plane.
Is it possible to do this using a law formula? I had a look at this potential possibility but it turns out that I have no idea how to do it so I looked for other options. So far I have tried the following:

1- Create a journal to revolve all the FACES of the body around the Z axis, then cutting this with a plane to get a slice that contains all these points. Problem -> Some faces cannot be revolved (e.g. cylinders, caps etc).

2- Create a journal to project all the EDGES of the body on the plane following (x,y,z) -> (x,0,sqrt(y^2+z^2)). Problem -> Some edges cannot be projected(e.g. cylinders, caps etc).

3- Create a journal to project all the POINTS of the body on the plane following (x,y,z) -> (x,0,sqrt(y^2+z^2))and then trying to fit a surface that pass through those points. Problem -> It is hard to fit a surface in complicated shapes.

4- Save the initial body as VRML in order to get tessellated geometry (triangle coordinates), then create a code to parse the file changing directly the(x,y,z) coordinates of each triangle for (x,0,sqrt(y^2+z^2). It works OK but for some bodies I would need to increase the number of triangles if I want to get a good result (e.g a rectangular face will have only 2 triangles but I would need more triangle for my purpose in some cases).

Do you have any ideas regarding the law formula or how to increase the number of triangles in a face or any other suggestions to help me accomplishing this task?

Please see a picture illustrating the end purpose of this.

Many thanks!
J
 
 http://files.engineering.com/getfile.aspx?folder=552df4fe-8f90-4ef6-adb6-9c740d592ca2&file=bladeBossEX.jpg
Hi,

@ Ferdo: to clarify:
I want to see only the first level of the spec. tree.

Second, I prefer Combobox. But I will limit the possible values to the ones in the list of the Combobox.

When the user choose a Part, it should be highlighted inside the application (inside the Userform) in a 3D browser. I heard about 3DXML player for example. But I don't know how I can automatically highlight a part with this player although the user can manually manipulate the part.
Physical feedback is feedback about the aesthetic or the geometry of the product. Functional feedback is feedback concerning the functions which the product must fulfil. Behavioural feedback describes how the product behaves in certain situations. Finally ergonomic feedback deals with how comfortable or user-friendly the product is.

Thanks.

 
You can get the first level (or even more) by using Bill of Materials produced by CATIA. Of course there are also some other methods...

An example how you can use 3DXML player embedded in a web file you can find in my CATIA_Portable_Script_Center.

For all those feedback...I'm afraid that you will need to put first a user to write them somewhere and then extract in your application.

Regards
Fernando

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Top