Continue to Site

Eng-Tips is the largest engineering community on the Internet

Intelligent Work Forums for Engineering Professionals

  • Congratulations KootK on being selected by the Eng-Tips community for having the most helpful posts in the forums last week. Way to Go!

Views on assembly

Status
Not open for further replies.

AtomicNico

Nuclear
May 10, 2016
62
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?
 
Replies continue below

Recommended for you

Maybe define work object at each part level? I'm not 100% sure.
 
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
 
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?
 
yep

Eric N.
indocti discant et ament meminisse periti
 
I think I did as you said but it doesn't seem to work and I don't know why...
Code:
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
[indent]set sel = selection.Item(i)
sel.Search "Topology.CGMEdge,all"
Nbedges = sel.Count
[indent]For j = 1 to Nbedges
CATIA.StartCommand("Reframe On")
MsgBox "edge N°" & j[/indent]
Next[/indent]
Next

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

Part and Inventory Search

Sponsor