×
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

CATIA automation - macro for renaming

CATIA automation - macro for renaming

CATIA automation - macro for renaming

(OP)
Hi there,

I'm trying to manage to uderstand how catvba works with the follinwg example.

I'm trying to do following action with a macro

  • open all catproduct in a folder
  • for each product :
    - get revision number of each catpart
    - append revision number to partnumber and instance number
    - save as in output folder and rename all catpart and catproduct with "partname_revision.CATPart"

Actually i'm stuck at the very first beginning :
how to get revison number from part properties ?

some help will be really appreciated

RE: CATIA automation - macro for renaming

Quote (boiboi)


how to get revison number from part properties ?

one simple example..

CODE -->

Set productRoot = CATIA.ActiveDocument.Product
Set UserProps = productRoot.Products
Part_Revision = UserProps.Item(1).Revision 

Just iterate on all parts..


Quote (boiboi)


save as in output folder and rename all catpart and catproduct with "partname_revision.CATPart"

You can use CATIA Send To Service

______

Alex ,

RE: CATIA automation - macro for renaming

Is it possible to modify existing auto populate macros in catia?

RE: CATIA automation - macro for renaming


I'm trying to manage to uderstand how catvba works with the follinwg example.

I'm trying to do following action with a macro



learn VBA first, there are many books for Office VBA. that way you will understand what are objects, core of the language and get some experience in reading the developer documentation and programming macros.
then search for V5Automation.chm in the catia install dir and read it first (not all of course, at least documentation about some relevant tasks to you, but before trying to program anything).
in about 3 months you will be well on the way like this.
on the other hand, if you only need something fast (auto populate as mentioned for example), just look for it in this forum, it's one of those tasks, that have been discussed 432898 times already.

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