×
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

Views on assembly

Views on assembly

Views on assembly

(OP)
Hi guys! That's me again but I need your help again for the last time I think!

I'm still on my piping circuit and I got a new question to ask you: I make a selection of all my parts but on each part I need to make a little selection so inside my loop I put a CATIA.StartCommand("Reframe On").
But since I got a selection that takes ALL the assembly, it makes a reframe on all the structure. But what I need is a zoom on each part to make the selection, validates, move to another part, make the selection...

How can I make it that way?

RE: Views on assembly

Maybe define work object at each part level? I'm not 100% sure.

RE: Views on assembly

when you have a selection (big one), store it in a collection, then you can make another selection (smaller or bigger) and go back to the first selection by using the collection.

Eric N.
indocti discant et ament meminisse periti

RE: Views on assembly

(OP)
So the way of doing that would be:
Make a big selection
=> put it into a collection
=> make a new selection inside that collection
=> select the object i and reframe on

Is that so?

RE: Views on assembly

yep

Eric N.
indocti discant et ament meminisse periti

RE: Views on assembly

(OP)
I think I did as you said but it doesn't seem to work and I don't know why...

CODE --> CATScript

document = CATIA.ActiveDocument
selection = document.Selection
selection.Search "(CATLndSearch.Product),all"  ===> selection of all the products of my assembly
NbParts = selection.Count
For i = 1 To NbParts
set sel = selection.Item(i) sel.Search "Topology.CGMEdge,all" Nbedges = sel.Count
For j = 1 to Nbedges CATIA.StartCommand("Reframe On") MsgBox "edge N°" & j
Next
Next

But when I put a MsgBox for the Nbedges, nothing appears
I think I've got a problem about my selection again...

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