iLogic, Drawing feature supression

iLogic, Drawing feature supression

Anonymous
Not applicable
435 Views
1 Reply
Message 1 of 2

iLogic, Drawing feature supression

Anonymous
Not applicable

I am looking to use iLogic to create feature supression in individual drfawing views, i.e for simplicity, in veiw 1 part has a hole in view 2 part does not have a hole it has been supressed

 

I am aware this can be done with iParts but im trying to avoid using iparts

 

any one have any ideas on if this can be done or am i wasting my time?

 

Thanks

 

 

0 Likes
436 Views
1 Reply
Reply (1)
Message 2 of 2

xiaodong_liang
Autodesk Support
Autodesk Support

Hi,

 

I am not sure if iLogic can do this. In theory, you need to find the drawing curves of hole feature and make them invisible. A VBA code is:

 

 Sub hideViewCurve()

    Dim oDoc As DrawingDocument
    Set oDoc = ThisApplication.ActiveDocument
    
    Dim oView As DrawingView
    
    Set oView = oDoc.ActiveSheet.DrawingViews(1)
    
    Dim oPartDoc As PartDocument
    Set oPartDoc = oView.ReferencedDocumentDescriptor.ReferencedDocument
    
    Dim oPartDef As PartComponentDefinition
    Set oPartDef = oPartDoc.ComponentDefinition
    
    Dim oHoleFeature As HoleFeature
    Set oHoleFeature = oPartDef.Features("Hole1")
    
    Dim oDrawingCurvesOfHole
    Dim oEachCurveOfHole
    Dim oEachCurveSeg
    Set oDrawingCurvesOfHole = oView.DrawingCurves(oHoleFeature)
    
    For Each oEachCurveOfHole In oDrawingCurvesOfHole
       For Each oEachCurveSeg In oEachCurveOfHole.Segments
          oEachCurveSeg.Visible = False
        Next
    Next

End Sub

 

 

 

 

0 Likes