×
INTELLIGENT WORK FORUMS
FOR ENGINEERING PROFESSIONALS

Log In

Come Join Us!

Are you an
Engineering professional?
Join Eng-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!
  • Students Click Here

*Eng-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

Jobs

MACRO SPLIT SURFACE IMPORTING POINTS FROM TXT FILE AND WRITING AREAS TO XLS FILE

MACRO SPLIT SURFACE IMPORTING POINTS FROM TXT FILE AND WRITING AREAS TO XLS FILE

MACRO SPLIT SURFACE IMPORTING POINTS FROM TXT FILE AND WRITING AREAS TO XLS FILE

(OP)
Hello Everybody,

I am fairly new in Catia macro programming and I am a bit stuck at the moment, I hope you can help me out.
Basically what I need to do is partitioning faces automatically keeping track on how the face area changes (before and after partitioning) by simply writing the areas in an excel file. The valid partition line is defined by a list of points imported from a txt file. I have attached a picture that explains the desired workflow.

So far I know how to import automatically the points. However I am unsure about how to proceed with the rest. In particular, I have problems implementing the following:

Foreach face in the CATPart:
{

If there are points laying on the surface:
{
1- Write Face Name in column A in the excel file (e.g. Face1)
2- Write area of the surface (before partitioning) in column B in the excel file.
3- Create line (spline) that connects the points on the face to create a partition line.
4- Split face.
5- Write Face Name of the split faces in column C in the excel file (e.g. Face1.1 and Face1.2)
6- Write area of the split faces on column D.
}

else (If there are NOT points laying on the surface):
{
1- Write area of the surface (before partitioning) in column A in the excel file.
}

}

Can you help me implementing this?

I have attached the macro for importing the points, an explanatory picture, the excel table where the surface area should be written and a CATPart.

If you could help me I would be very grateful!

Thank you very much!

RE: MACRO SPLIT SURFACE IMPORTING POINTS FROM TXT FILE AND WRITING AREAS TO XLS FILE

once you have the point imported, record the macro that will create the spline and the splits.

With that and some other script from FAQ, you should be able to do what you need.

You can also record some macro in excel when you set some value in some cell... you can use that for your script.

Eric N.
indocti discant et ament meminisse periti

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Eng-Tips Forums free from inappropriate posts.
The Eng-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Eng-Tips forums is a member-only feature.

Click Here to join Eng-Tips and talk with other members!


Resources