CATIA V5 | 3DEXPERIENCE
Vous souhaitez réagir à ce message ? Créez un compte en quelques clics ou connectez-vous pour continuer.

macro catia V5

3 participants

Aller en bas

macro catia V5 Empty macro catia V5

Message par wassimo Mar 1 Nov 2016 - 11:23

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 ?

wassimo
timide
timide

Messages : 1
Date d'inscription : 01/11/2016
Localisation : Tunis

Revenir en haut Aller en bas

macro catia V5 Empty Re: macro catia V5

Message par Guss_ Ven 18 Nov 2016 - 11:57

Hi,

In your example, when you make a "split" it is by using the tool to split or by using a macro that automatically split ?

You want to color the faces generated by the operation ? At what time you want to run the macro ?


Guss_
Admin
Admin

Messages : 530
Date d'inscription : 08/01/2010

Revenir en haut Aller en bas

macro catia V5 Empty Re: macro catia V5

Message par lumpazepfel Dim 20 Nov 2016 - 19:18

Hi,
Here an example of code witch color pad and split.
you can add all other shapes you use in your parts.

Code:
'vbscript

Sub CATMain()

Dim oselection 'As Selection
set oselection = CATIA.ActiveDocument.Selection

oselection.Search "Name=*Pad*,all"
Dim Kolor 'As VisPropertySet
Set Kolor = oselection.VisProperties
Kolor.SetRealColor 10, 10, 200, 0

oselection.clear
oselection.Search "Name=*Split*,all"
Set Kolor = oselection.VisProperties
Kolor.SetRealColor 255,255, 10, 0

 End Sub
lumpazepfel
lumpazepfel
Fédérateur
Fédérateur

Messages : 316
Date d'inscription : 02/11/2015
Localisation : Ensisheim

Revenir en haut Aller en bas

macro catia V5 Empty Re: macro catia V5

Message par Contenu sponsorisé


Contenu sponsorisé


Revenir en haut Aller en bas

Revenir en haut

- Sujets similaires

 
Permission de ce forum:
Vous ne pouvez pas répondre aux sujets dans ce forum