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!

[CATDrawing] Vb Objet name to change hatchings to colors?

Status
Not open for further replies.

borisboris

New member
Mar 10, 2013
10
FR
Hi all,

I try to make a macro, in CATDrawing to change the hatchings in colors but I don't find the vb code/objet to do it, have you an idea?

I'll arrive to select all hatchings, bue after that...

thank you help

Boris
 
Replies continue below

Recommended for you

I've been looking for any objects related to drawing/dress-up/area fill and haven't found anything.

My solution: You should search all objects "area fill", then select results, and press ctrl+enter to show properties menu

If You are interested in Macros in Catia (Catscripts, Catvba) feel free to send me a message. I will wrote specified macros for free and post it on eng-tips forum
 
The properties (right click on hatchs) are "GeneratedShape/HlrViewFeat.1"
I try to find informations on "V5Automation.chm", but nothing!

As i said i my first thread, i arrive to select all hatchs like that, with "CATEarlyGenShape"
Dim uVisProperties As VisPropertySet
Set uVisProperties = uselection.VisProperties
uselection.Search "CATDrwSearch.CATEarlyGenShape,all"


but to colour in the hatchings is another story...
 
Code:
Sub CatMain()
CATIA.ActiveDocument.Selection.Search "Drafting.'Area Fill',all"
End Sub

Run Macro, then press Alt+Enter. You will be able to change properties of all filled areas at once

Area fills are not exposed to V5Automation...

If You are interested in Macros in Catia (Catscripts, Catvba) feel free to send me a message. I will wrote specified macros for free and post it on eng-tips forum
 
Thank's Luka!

This solution works, but only for the CATPart's drawing. For CATProduct's rawing, I would like to differentiate my treatment for each CATParts. And if i select all in same time...

I thought of applying one materials different for every CATPart of the CATProduct and to associate in materials a special color characteristic. But I can't get back in the CATDrawing this information. Also I can't modify the color of the hatchings according to every CATPart (may be you know how?).


arrggg!
 
well, what i want to do...

In CATDrawing,
First, i would like to use macro to select all hatchs from CATPart OR CATProduct. For this point i'm ok.
Second, change hatchs colors, i would like the color of the hatchings is the same of the CATParts.
And finaly, Change hatch to coloring areas.

Easy no? [banghead]

I hope to be more clear

 
Boris, You have to understand, that hatchings are attached to views, not to specified part on the view.
There is no simply way to determinate, which hatchings are attached to specified part.

If You are interested in Macros in Catia (Catscripts, Catvba) feel free to send me a message. I will wrote specified macros for free and post it on eng-tips forum
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top