Message 1 of 6
ActiveEditDocument.SelectSet Issue
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Hi, Could I get some help with ActiveEditDocument.SelectSet? When working in a part document my script works fine, but when editing a part from an assembly it doesn't seem to work.
Sub Main Dim doc As PartDocument If ThisApplication.ActiveDocument.DocumentType = DocumentTypeEnum.kAssemblyDocumentObject If ThisApplication.ActiveEditDocument.DocumentType = DocumentTypeEnum.kPartDocumentObject doc = ThisApplication.ActiveEditDocument Else Return End If Else If ThisApplication.ActiveDocument.DocumentType = DocumentTypeEnum.kPartDocumentObject Then doc = ThisApplication.ActiveDocument End If If doc IsNot Nothing Dim obj As Object obj = ThisApplication.CommandManager.Pick(SelectionFilterEnum.kPartFaceFilter, "Select Entity") For Each oFace In doc.ComponentDefinition.SurfaceBodies(1).Faces If (oFace.SurfaceType = CType(obj, Face).SurfaceType) And (Math.Round(oFace.Evaluator.Area, 6) = Math.Round(CType(obj, Face).Evaluator.Area, 6)) doc.SelectSet.Select(oFace) End If Next End If End Sub