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 ?
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
start coding...and explain where is your problem i will help (but I won't do your job)
indocti discant et ament meminisse periti
RE: Hi there I want to create a m
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
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