Hello,
@WCrihfield Thanks for reply, for the feature props i was already thinking to the model browser nodes, but it's to complex, so as you say.
@FINET_Laurent thanks for the snippet, i had already something like that but with a small mistake to actual change the style,
But use the
CreatedByFeature.type or CreatedByFeature.name
is not use full, i want to change all edges created from an surface bodie, not an solid,
it can be, that we use 'thicken' , sweep, extrude, ... (in surface mode)
So i found an way to do :
the code can run 30 sheets, with 6 vieuws/sheet that need to be changed in 2min on mine workstation, but there is a small bug,...
The last vieuw is not change... maybe you know why?
i can force hardcore to do the last vieuw again but it is not the way to do,...
here is mine code :
Dim doc As Inventor.DrawingDocument = ThisApplication.ActiveDocument
Dim SheetList As Inventor.Sheets = doc.Sheets
Dim s As Inventor.Sheet '= doc.ActiveSheet
Dim viewList As Inventor.DrawingViews '= s.DrawingViews
Dim v As Inventor.DrawingView
Dim CurvelistSurface As New List(Of Inventor.DrawingCurve)
Dim blfound As Boolean = False
For Each s In SheetList
If s.DrawingViews.Count = 0 Or _
Not TypeOf s.DrawingViews.Item(1).ReferencedDocumentDescriptor.ReferencedDocument _
Is Inventor.PartDocument Then Continue For
s.Activate
viewList = s.DrawingViews
For Each v In viewList
'If Not (v.IncludeSurfaceBodies = True AndAlso v.DesignViewRepresentation = "MetLakzijde") Then Continue For
If Not v.IncludeSurfaceBodies = True Then Continue For
Dim CurvelistOriginal As New List(Of Inventor.DrawingCurve)
For Each c In v.DrawingCurves
CurvelistOriginal.Add(c)
Next
v.IncludeSurfaceBodies = False
s.Update
Dim CurvelistModel As New List(Of Inventor.DrawingCurve)
For Each c In v.DrawingCurves
CurvelistModel.Add(c)
Next
v.IncludeSurfaceBodies = True
s.Update
For Each obj As Object In CurvelistOriginal
blfound = False
For Each obj2 As Object In CurvelistModel
If obj Is obj2 Then
blfound = True
Exit For
End If
Next
If blfound = False Then
CurvelistSurface.Add(obj)
End If
Next
Next
For Each c In CurvelistSurface
c.LineType = LineTypeEnum.kDashedHiddenLineType 'kDashedLineType=dashed space
'c.LineWeight = 0.02
Next
s.Update
Next