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 Macro Sectioning Direction

Status
Not open for further replies.

JBarn

Automotive
Aug 12, 2011
6
Hello All I am using Catia V5 and am attempting to write a macro that increments section cuts along a specified axis and measures the inertial values of each of those sections (but that is another topic)

Using the code that is in the help documentation the sections that are created are only in the Z direction. Does anyone know how to make these sections be taken in any other direction?

Thanks

JB
 
Replies continue below

Recommended for you

Well I have an update. I was able to figure out a way to change the axis that the sections are created. You have to change the Position values

The position array can be obtained by using the GetPosition command and it gives an 12 element array that is as follows

iComponents( 0) is the X component of the X-axis
iComponents( 1) is the Y component of the X-axis
iComponents( 2) is the Z component of the X-axis
iComponents( 3) is the X component of the Y-axis
iComponents( 4) is the Y component of the Y-axis
iComponents( 5) is the Z component of the Y-axis
iComponents( 6) is the X component of the Z-axis
iComponents( 7) is the Y component of the Z-axis
iComponents( 8) is the Z component of the Z-axis
iComponents( 9) is the X component of the origin
iComponents(10) is the Y component of the origin
iComponents(11) is the Z component of the origin


Originally the positions 0,4, and 8 had a value of 1. In order to change the direction these need to be changed. I have found that there always has to be 1 of each the x,y, and z components and they all have to be with respect to different axis. If that is not clear (which is a good possibility) please let me know so that I can try to explain it better.

I hope this helps anyone that may be having trouble with this as I was unable to find any information on it.

-J
 
Hi,

Is it possible to indicate the name of the original script in the help docs?

Thanks for sharing info. Also, did you manage to measure the inertial values of each of those sections?

Regards
Fernando
 
Yeah the script in the help docs is CAASpaSectionNetwork.CATScript

I am still working on measuring the inertial values of each section. The problem that I am having with that is figuring out how to set each section to the active document after it is created so that the value can actually be read. Any ideas there?

-J
 
There is a CATScript in my CATIA Portable Script Center called Inertia in 2D, maybe will give you some ideas.

Regards
Fernando
 
Thanks that Script center is great. It looks like in that CATScript the user selects what to copy. Do you know how to do this without acctually needing and user input? Basically I want the section to be active so that the inertia can be taken for each section.

I am relatively new to VBA so any help would be appriciated.

Thanks

-J
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor