Message 1 of 2
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
I have a simple code we've been using for several years that works really well.
Basically it's used to put all model surface geometry on the phantom layer in a drawing.
I'm trying to stabilize the drawing dimensions by attaching to included model sketch geometry.
The problem is, including the model sketch creates an error, because it is not considered in the rule.
How can I ignore the included sketch geometry to prevent the error?
Dim doc As DrawingDocument doc = ThisDoc.Document Dim oDC As DrawingCurve Dim oDCS As DrawingCurveSegment Dim oView As DrawingView = Nothing Dim oDrawingViews As DrawingViews = ThisApplication.ActiveDocument.Sheets.Item(1).DrawingViews If ThisDrawing.ModelDocument Is Nothing Then' Else ' Iterate through drawing views For i = 1 To oDrawingViews.Count oView = oDrawingViews.Item(i) xView = oView.Name For Each oDC In doc.Sheets(1).DrawingViews(i).DrawingCurves For Each oDCS In oDC.Segments If Not oDCS.Parent.ModelGeometry.Parent.IsSolid Then oDCS.Layer = doc.StylesManager.Layers.Item(9) End If Next Next Next End If
Dewayne
Inventor Pro 2023
Vault Pro 2023
Inventor Pro 2023
Vault Pro 2023
Solved! Go to Solution.