- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
I need to hide the hidden lines on just the screw flights on the attached drawing. is this accomplished in the browser or can I do it an easier way. C#, VB or VBA will work.
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Hello
You can change the selection priority for drawings with the little pulldown in the quick access toolbar to part selection. After this, if you hover over the screw flights, all lines should be highlighted. Right click and click on "hidden lines" in the context menu.
Or you can test the iLogic rule below. Start it and pick one line (if the line has visible or hidden line style is not relevant) and the hidden lines will be set to invisible.
To reset the invisible lines, right click on an empty space of the drawing view and select "show hidden lines".
Dim oApp As Inventor.Application= ThisApplication
Dim oDrawDoc As DrawingDocument = oApp.ActiveDocument
Dim oDrawCurveSeg As DrawingCurveSegment= oApp.CommandManager.Pick(kDrawingCurveSegmentFilter, "Pick a line of the component")
Dim oDrawCurve As DrawingCurve= oDrawCurveSeg.Parent
Dim oDrawView As DrawingView = oDrawCurve.Parent
Dim oEdgeProxy As EdgeProxy= oDrawCurve.ModelGeometry
Dim oOcc As ComponentOccurrence = oEdgeProxy.ContainingOccurrence
Dim oDrawCurves As DrawingCurvesEnumerator = oDrawView.DrawingCurves(oOcc)
For Each oDrawCurve In oDrawCurves
For Each oDrawCurveSeg In oDrawCurve.Segments
If oDrawCurveSeg.HiddenLine = True Then
oDrawCurveSeg.Visible = False
End If
Next
Next
R. Krieg
RKW Solutions
www.rkw-solutions.com
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Thanks for the reply. I should have mentioned this app is running with no user input.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Hello
Then you have to tell us how to unique identify the screw flights. Upload the model, tell us how the component is named in browser or something else. ![]()
R. Krieg
RKW Solutions
www.rkw-solutions.com
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Hello
Thanks for the files. I picked the part "Flight" in the part name to identify the parts we need.
The script is not perfect, but works so far.
Option Explicit on
Dim oApp As Inventor.Application= ThisApplication
Dim oDrawDoc As DrawingDocument = oApp.ActiveDocument
Dim oAssDoc As AssemblyDocument= oDrawDoc.ReferencedDocuments(1) 'we assume there is only one
Dim oObjColl As ObjectCollection = oApp.TransientObjects.CreateObjectCollection
Dim oOccs As ComponentOccurrencesEnumerator
Dim oOcc As ComponentOccurrence
Dim oDrawView As DrawingView
Dim oDrawCurves As DrawingCurvesEnumerator
Dim oDrawCurve As DrawingCurve
Dim oDrawCurveSeg As DrawingCurveSegment
Dim oRefedDoc As Document
Dim oTrans As Transaction = oApp.TransactionManager.StartTransaction(oDrawDoc, "HideLines")
For Each oDrawView In oDrawDoc.ActiveSheet.DrawingViews
If oDrawView.ViewType = DrawingViewTypeEnum.kStandardDrawingViewType Then
For Each oRefedDoc In oAssDoc.AllReferencedDocuments
If InStr(oRefedDoc.FullFileName, "Flight") Then
oOccs = oAssDoc.ComponentDefinition.Occurrences.AllReferencedOccurrences(oRefedDoc)
For Each oOcc In oOccs
oDrawCurves = oDrawView.DrawingCurves(oOcc)
For Each oDrawCurve In oDrawCurves
For Each oDrawCurveSeg In oDrawCurve.Segments
If oDrawCurveSeg.HiddenLine = True Then
oDrawCurveSeg.Visible = False
End If
Next
Next
Next
oDrawCurves = Nothing
End If
oOccs = Nothing
Next
End If
Next
oTrans.End
R. Krieg
RKW Solutions
www.rkw-solutions.com
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report