ilogic to turn on tangent and interface edges

ilogic to turn on tangent and interface edges

JacobRL4SN
Enthusiast Enthusiast
468 Views
3 Replies
Message 1 of 4

ilogic to turn on tangent and interface edges

JacobRL4SN
Enthusiast
Enthusiast

Has anyone written ilogic to turn on tangent and interface edges for all views? Or have a way to make it default turned on?

0 Likes
Accepted solutions (1)
469 Views
3 Replies
Replies (3)
Message 2 of 4

WCrihfield
Mentor
Mentor
Accepted solution

Hi @JacobRL4SN.  Yes, that is possible.  The DrawingView API object has those properties that can be turned on and off by code.

https://help.autodesk.com/view/INVNTOR/2024/ENU/?guid=DrawingView_DisplayInterferenceEdges 

https://help.autodesk.com/view/INVNTOR/2024/ENU/?guid=DrawingView_DisplayTangentEdges 

Do you have a starter code you are working with already?  If so, could you post what you have, then we can try to update it for you.  Otherwise please include more details about the situation, such as how you want to tell the code which view for it to target (every view on every sheet of the drawing, just one specific view, just the first view on the first sheet, etc, etc).

Edit:  Below is an example iLogic rule you can try out.

If ThisDoc.Document.DocumentType <> DocumentTypeEnum.kDrawingDocumentObject Then
	MsgBox("A Drawing document must be active for this code to work. Exiting.", vbCritical, "")
	Exit Sub
End If
Dim oDDoc As DrawingDocument = ThisDoc.Document
If oDDoc.IsModifiable = False Then Exit Sub
Dim oSheets As Inventor.Sheets = oDDoc.Sheets
For Each oSheet As Inventor.Sheet In oSheets
	Dim oViews As DrawingViews = oSheet.DrawingViews
	If oViews.Count = 0 Then Continue For
	For Each oView As DrawingView In oViews
		Try
			oView.DisplayInterferenceEdges = True
			oView.DisplayTangentEdges = True
		Catch 
		End Try
	Next
Next

If this solved your problem, or answered your question, please click ACCEPT SOLUTION .
Or, if this helped you, please click (LIKE or KUDOS) 👍.

Wesley Crihfield

EESignature

(Not an Autodesk Employee)

0 Likes
Message 3 of 4

JacobRL4SN
Enthusiast
Enthusiast

Hi @WCrihfield,

 

I do not have any starter code written new to ilogic. I would want the ilogic to target every view on every sheet to turn on tangent and interface edges.

 

 

0 Likes
Message 4 of 4

JacobRL4SN
Enthusiast
Enthusiast

My hero thank you!

0 Likes