09-13-2023
04:44 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
09-13-2023
04:44 PM
It looks like your manually choosing the occurrences. Would it be easier to just get all occurrences in the view into a list and then just loop through the occurrence list? The function below is getting the views curves and returning one but it could be made into a sub routine and a list could be added. Of course you could do the same with the occurrence selection tool you have and manually add the occurrence to the list leaving the user in control.
Function GetOccurrence(occName As String, curves As DrawingCurvesEnumerator) As ComponentOccurrence
For Each curve As DrawingCurve In curves
For Each curveSegment As DrawingCurveSegment In curve.Segments
Try
Dim modelGeom As Object = curve.ModelGeometry
occ = modelGeom.ContainingOccurrence
Catch
End Try
If occ.Name = occName Then
Logger.Info("found occ from curve " & occ.Name)
Return occ
End If
Next
Next
End Function
If this solved a problem, please click (accept) as solution.
Or if this helped you, please, click (like)
Regards
Alan
Or if this helped you, please, click (like)
Regards
Alan