×
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

Hi there I want to create a m

Hi there I want to create a m

Hi there I want to create a m

(OP)
Hi there


I want to create a macro in catia v5 that colored the operation of Part Design, for example :

when you make a "split" the operation will be colored automatically by a defined color.

There is someone who can help me ?

RE: Hi there I want to create a m

i can help

start coding...and explain where is your problem i will help (but I won't do your job)

Eric N.
indocti discant et ament meminisse periti

RE: Hi there I want to create a m

(OP)
hi,

thank you for the answer.
I tried to enter the codes but I want to insert a request if possible, for example:
the macro should be looking in a solid(PartBody) and not in Geometrical Set.
Thank you for your help.

Below an example:

Sub CATMain()

Dim partDocument1 As PartDocument
Set partDocument1 = CATIA.ActiveDocument

Dim selection1 As Selection
Set selection1 = partDocument1.Selection

selection1.Search "CATPrtSearch.Fillet,sel"

Set selection1 = CATIA.ActiveDocument.Selection

Set visPropertySet1 = selection1.VisProperties
visPropertySet1.SetRealColor 255, 255, 128, 1

selection1.Clear

End Sub

RE: Hi there I want to create a m

Hi,

There are multiple options, you have to think a little bit what you want.

For example, you can ask user to select first something (in your case the PartBody), or you can select first directly in the macro without asking user the PartBody and then, inside that selection, you can search whatever type of element you want.

It can be done also in different ways but you have also to specify what are you using: CATScript or catvba or something else (from how is looking your code I suppose you don't use catvbs).

Also, when you start to program in CATIA, take in consideration where that macro will be used (which OS, what CATIA version or release, is a CATIA network installation or not).

Regards
Fernando

https://picasaweb.google.com/102257836106335725208 - Romania
https://picasaweb.google.com/103462806772634246699... - EU

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