Eng-Tips is the largest engineering community on the Internet

Intelligent Work Forums for Engineering Professionals

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

Active multiselection. 1

Status
Not open for further replies.

jmuriarte

Automotive
Oct 28, 2005
36
0
0
ES
Hello:

Some body knows how can I create a multiselection that updates depending on new geometry created.
For example: I want to project on a plane all geometry created in a geometrical set.

Thank you very much.
 
Replies continue below

Recommended for you

Hi,

I don't think it’s possible with usual CATIA commands. Maybe with some automation tools.

Taking your example in consideration, I tried to do something...maybe its useful, maybe not.

First I used the record CATScript function to have next code, only to select lines and points in all OpenBodies (or GeometricalSets). With this selection done by macro, you can use Projection command in GSD. The CATScript can be modified to add what ever you want in this collection which will be projected, just modify the search line in macro.

In the second CATScript, I added just few lines in the beginning. In my opinion (by the way, if I'm wrong, please correct me), its much easier to make the update for the new elements created if you will delete first the MultiOutput Projection, reselect them and create again the projection (which means in fact to use again the same procedure like in the first macro).

To delete MultiOutput Projection, first select what you want to delete in the tree and then run the second macro.

And something else which I've learned from Eric (itsmyjob) in one of the CATIA forums. Running the macro in this form will take a longer time then if you will create a counter for those elements (I will let you the pleasure to modify the macro).


1.

Language="VBSCRIPT"

Sub CATMain()

Dim partDocument1 As Document
Set partDocument1 = CATIA.ActiveDocument

Dim selection2 As Selection
Set selection2 = partDocument1.Selection

selection2.Search "(CATGmoSearch.Line + CATGmoSearch.Point),all"

End Sub


2.

Language="VBSCRIPT"

Sub CATMain()

Dim partDocument1 As Document
Set partDocument1 = CATIA.ActiveDocument

Dim selection1 As Selection
Set selection1 = partDocument1.Selection
selection1.delete

Dim selection2 As Selection
Set selection2 = partDocument1.Selection

selection2.Search "(CATGmoSearch.Line + CATGmoSearch.Point),all"

End Sub

Regards
Fernando
 
This may not be the best answer, jumriarte - but I notice that in more recent releases of Catia, (specifically R17) you can now actually select geometrical sets for selections. (rather than individual objects, or multi-selections) So, it may be just as easy now to double click the projection, and re-select the entire geometrical set.

Maybe you are already doing this, but in case you are not, I know this wouldn't work in the past.

Conversely, maybe you can write, or have someone write, a reaction for you, so that any change to the geo set would result in an update.

-----------------------------------------------------------
Catia Design|Catia Design News|Catia V5 blog
 
What solid7 noticed is correct, if you will double click the projection and re-select the geometrical set, you will obtain an update (its also enough to select only the new elements, the old ones will remain in the initial selection), I've tested in r12 (the oldest version which I have installed)

The second observation of solid7 its a much more elegant way to have an update.

Regards
Fernando
 
Hi solid7:

I tryed to project a geometrical set, like you explain in your post ,but I work with release 16.

I am trying to do this between to diferent geometrical sets but I cant.
 

I'm pretty sure that geometrical set selection is new to R17. So you have my apologies, but I have no other suggestion there.

My top advice would still be to get someone to write you a reaction for your operation, so that it automatically updates when the contents of the geometrical set change.

-----------------------------------------------------------
Catia Design|Catia Design News|Catia V5 blog
 
Status
Not open for further replies.
Back
Top