Activate/Deactivate with VB

COE Administrator

Activate/Deactivate with VB
Hello,

I've noticed it's not possible on Catia v5 to Activate/Deactivate more than 1 part or component on the same time in an assembly (when deactivated, there is a red and white logo added in the tree to specify -> different to show/hide and different to Activate/Deactivate terminal node).
So I would like to know if someone have a macro to do this ?

Thank you in advance,

K


Attachments

  • 001_RightClic.JPG (94.7k)

John Alexander

RE: Activate/Deactivate with VB
(in response to COE Administrator)
No problem cnanjo I have such a script at work, I will put it on here as soon as I get in tomorrow for you! :-)

Fernando Petre

RE: Activate/Deactivate with VB
(in response to COE Administrator)
See link bellow

http://www.eng-tips.com/viewthread.cfm?qid=290845&page=1

John Alexander

RE: Activate/Deactivate with VB
(in response to COE Administrator)
Here you go cnanjo,

Just select the items within the CATProduct and run the de-activate script.

I've included the re-activate script as this can save time also.

Best Regards,

John.
Attachments

  • Multiple_Deactivate.txt (1.2k)
  • Multiple_Reactivate.txt (1.1k)

COE Administrator

RE: Activate/Deactivate with VB
(in response to COE Administrator)
Thank you for this code
It works well and do exactly what I want !

BUT... I have an issue with assemblies in which there is CGR type files
The program stumbles on the line " Component activation state"
I guess there problem comes from the file type
Is there someone who knows a trick for this case ?



Thanks

K




Attachments

  • LOG.JPG (43.1k)

Tomislav Solina

RE: Activate/Deactivate with VB
(in response to COE Administrator)
with so small picture is hard to help you

COE Administrator

RE: Activate/Deactivate with VB
(in response to COE Administrator)
Sorry

I think it should be better now :




Attachments

  • LOG_BIS.jpg (29.4k)

COE Administrator

RE: Activate/Deactivate with VB
(in response to COE Administrator)
No idea ?

COE Administrator

RE: Activate/Deactivate with VB
(in response to COE Administrator)
Up

Mike Dubya

RE: Activate/Deactivate with VB
(in response to John Alexander)



In Reply to John Alexander:

Here you go cnanjo,

Just select the items within the CATProduct and run the de-activate script.

I've included the re-activate script as this can save time also.

Best Regards,

John.

Those scripts work great, thank you.  Just to clarify for people, those are CATScripts, not CATvba.