×
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

desactivate bodies and feature with rule

desactivate bodies and feature with rule

desactivate bodies and feature with rule

(OP)
hi everybody,

do you know how to create a rule to desactivate all bodies and features contained in a part without selected all features one by one?

thanks

RE: desactivate bodies and feature with rule

not a solution, but left click on the first feature, press and hold shift, left click on the last feature (that you want to deactivate). then right click on any selected feature, selected objects, deactivate.

RE: desactivate bodies and feature with rule

Hi,

Same action described by Loki you will have with a CATScript like bellow:

CODE --> CATScript

Language="VBSCRIPT"

Sub CATMain()

Dim partDocument1 As Document
Set partDocument1 = CATIA.ActiveDocument

Dim selection1 As Selection
Set selection1 = partDocument1.Selection

selection1.Search "Name=*Body*,all"

Dim selection2 As Selection
Set selection2 = partDocument1.Selection

selection2.Search "CATPrtSearch.MechanicalFeature,sel"
CATIA.StartCommand "Deactivate Terminal Node"
End Sub 

Regards
Fernando

https://picasaweb.google.com/102257836106335725208
https://picasaweb.google.com/103462806772634246699...

RE: desactivate bodies and feature with rule

The macro Ferdo supplied is the way to go. A rule can be executed multiple times and this could slow your process.

Perhaps you want the features locked as deactivated?

Win XP64
21SP7/22SP5, 3DVIA Composer 2013X, ST R20
Dell T7400 16GB Ram
Quadro FX 4800 - 1.5GB

RE: desactivate bodies and feature with rule

(OP)
sorry gents, I was unabble to respond.
I have read all suggested respond but what i want to do is to desactivated a body and all features contains on it.
I have a skeleton of my system on a part with all body including boolean operations and i have create some parameters to desactivate some bodies to modified to final design of the system.
to avoid troubles with bodies I need to desactivated bodies whose are not usefull.
I dont't know if a rules can be launch a vb script as suggested by fredo.

RE: desactivate bodies and feature with rule

Expert rules:

b:body

b.Activity = False

Where is the problem?

Eric N.
indocti discant et ament meminisse periti

RE: desactivate bodies and feature with rule

(OP)
itsmyjob, can you put a condition in an expert rule?
for example

if boolean.1 == false
(
d.Ativity = false
}
else
(
d.Ativity = true
}

RE: desactivate bodies and feature with rule

did you try?

Eric N.
indocti discant et ament meminisse periti

RE: desactivate bodies and feature with rule

(OP)
yes but I cannot select the boolean parameter to write the condition

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