Message 1 of 7

Not applicable
03-23-2020
02:46 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
This code works in a main assembly but it doesnt work if the sketch is in a subassembly. I think it is about selecting parts in context of a assembly. Here is the picture of the situation where the rule is used. Any help please?
Dim oDoc As Document oDoc = ThisApplication.ActiveDocument Dim oObject As Object oObject = ThisApplication.ActiveEditObject Dim oSelectSet As SelectSet oSelectSet = oDoc.SelectSet If oObject.Type = ObjectTypeEnum.kPlanarSketchObject Then For Each oEntity In oObject.SketchEntities If oEntity.ConstraintStatus = 51716 Or oEntity.ConstraintStatus = 51715 Then 'kUnknownConstraintStatus 'kOverConstrainedConstraintStatus oSelectSet.Select(oEntity) End If Next For Each oEntity In oObject.SketchEntities If oEntity.Type = 83896576 Then 'kSketchPointObject If oEntity.Reference = True Then oSelectSet.Select(oEntity) End If End If Next End If
Solved! Go to Solution.