Turn on all tangent edges in all views

Turn on all tangent edges in all views

aurel_e
Collaborator Collaborator
1,039 Views
6 Replies
Message 1 of 7

Turn on all tangent edges in all views

aurel_e
Collaborator
Collaborator

I'm looking for an I-logic rule to turn on all the tangent edges in all the views in multi-sheets drawings.

Inventor 2020.

Thank you.

0 Likes
Accepted solutions (1)
1,040 Views
6 Replies
Replies (6)
Message 2 of 7

JhoelForshav
Mentor
Mentor

Hi @aurel_e 

Try this:

Dim oDoc As DrawingDocument = ThisDrawing.Document
For Each oSheet As Sheet In oDoc.Sheets
	For Each oView As DrawingView In oSheet.DrawingViews
		oView.DisplayTangentEdges = True
	Next
Next
0 Likes
Message 3 of 7

aurel_e
Collaborator
Collaborator

Hi @JhoelForshav 

It isn't working. This is the message;

2020-06-03 09_33_39-Autodesk Inventor Professional 2020.png

For what I can see, it's working just for the first sheet.

 

0 Likes
Message 4 of 7

JhoelForshav
Mentor
Mentor
Accepted solution

Hi @aurel_e 

For some views it's not possible to turn on tangent edges

Tangent.PNG

This will do it for all views that allow it:

Dim oDoc As DrawingDocument = ThisDrawing.Document
For Each oSheet As Sheet In oDoc.Sheets
	For Each oView As DrawingView In oSheet.DrawingViews
		On Error Resume Next
		oView.DisplayTangentEdges = True
	Next
Next
oDoc.Update
0 Likes
Message 5 of 7

dgreatice
Collaborator
Collaborator

Hi all,

 

you need filtering about viewstyle:

 

Dim oDoc as DrawingDocument = ThisDrawing.Document
For Each oSheet In oDoc.Sheets
    For Each oView In oSheet.DrawingViews
        If Not oView.ViewStyle = kFromBaseDrawingViewStyle Then
            oView.DisplayTangentEdges = False
        End If
    Next
Next
Please use the ACCEPT AS SOLUTION or KUDOS button if my Idea helped you to solve the problem.

Autodesk Inventor Professional Certified 2014
0 Likes
Message 6 of 7

aurel_e
Collaborator
Collaborator

@JhoelForshav 

It's perfect now.

Thank you.

Message 7 of 7

octavio.olivaEUAB9
Explorer
Explorer

Disculpa esta configuración donde la inserto para obtener de forma automática cada dibujo que cree, las aristas Tangentes?

0 Likes