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!

How to select many line at one time to hide in a drawings ?

Status
Not open for further replies.

prolynx

Mechanical
Sep 9, 2005
29
0
0
DK
Hello !

This seems pretty simple, I want in a drawing to select at the same time many lines to be hidden to get "cleaner" views.
At the moment, I can only do it by "multi-selecting" the lines by drawing a box with the mouse where the lines are completly in. In most cases, this is not good, because lots of extra lines will also be included.
So I was looking at the possibility to use the "free hand selection trap". Well, the "tools palette" where this is located is not showing up when clicking the "hide" button, so I tried to create a macro to emulate it.
So I came up with the following:


Language="VBSCRIPT"
Sub CATMain()
Dim drawingDocument1 As Document
Set drawingDocument1 = CATIA.ActiveDocument
Dim Selection As Selection
Set Selection = drawingDocument1.Selection
Dim Status,InputObjectType(0)
InputObjectType(0)="AnyObject"
Status=Selection.SelectElement3(InputObjectType,"Select lines",true,CATMultiSelTriggWhenSelPerf,false)
if (Status = "Cancel") then Exit Sub
For PointIndex = 1 to Selection.Count2
Set visPropertySet1 = Selection.VisProperties
visPropertySet1.SetShow 1
next
Selection.Clear
End Sub

The tools palette comes up as expected, and I can draw the freehand line, but the problem is that the whole view (or views) gets hidden, not only the lines that are "intersected" with the freehand line I draw. This works if I select a line before running the macro, but again, this is not good as in this case, the macro is useless because I can't run the tools palette before.
I also tried to change the type to Line2D, but this only works with line I added on the drawing, not the lines coming from the 3D.

I'm running out of ideas how to solve that, so I'm now asking here if anyone have any idea. Maybe it's much easier that I thought, but at the moment, I really can't get it.

Oh, I don't know if it matters, but we are using Catia V5 R20
Thanks in advance !
 
Replies continue below

Recommended for you

Hi,

A small "trick"...change the color (make it a specific one) for the 3D objects which you want to hide the lines in 2D, then in 2D search for elements generated which has that specific color and hide them (use projection with 3D colors).

Another possibility it would be to use overload properties if this is a good option for you.

Regards
Fernando

 
Hello,
Just use the Select option "free hand selection trap" and draw the "selection line/curve" accross any of the elements you are wanting to hide/delete. You can get pretty creative with the selection line/curve in picking just the elements you want. Try it out, I think you will find it works quickly & easily.

Harold G. Morgan
CATIA, QA, CNC & CMM Programmer
 
I would love to use the "free hand selection trap", but how to you get it to show up with the "hide/show" command ?
Fernando, overload properties is not good for me, and also I don't think that changing the color in 3D is helping much.
To try to explain a bit more, I have a drawing of a big assembly, and it's almost like I want some parts to have the "fillets" shown ("boundaries"), and for some other parts just the "symbolic" fillets.
Any thoughts ?

Sebastien
 
Hello,
Use the "free hand selection trap" 1st (trap/select the desired elements), then select Hide.

Harold G. Morgan
CATIA, QA, CNC & CMM Programmer
 
Status
Not open for further replies.
Back
Top