04-02-2019
10:32 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
04-02-2019
10:32 PM
Try below iLogic code to access sub occurrence from selected object.
Sub Main()
Dim oInteraction As InteractionEvents
oInteraction = ThisApplication.CommandManager.CreateInteractionEvents
Dim oSelect As SelectEvents
oSelect = oInteraction.SelectEvents
AddHandler oSelect.OnSelect, AddressOf oSelectEvents_OnSelect
oInteraction.Start
End Sub
Private Sub oSelectEvents_OnSelect(ByVal JustSelectedEntities As ObjectsEnumerator, ByVal SelectionDevice As SelectionDeviceEnum, ByVal ModelPosition As Point, ByVal ViewPosition As Point2d, ByVal View As Inventor.View)
Dim obj As Object
For Each obj In JustSelectedEntities
MessageBox.Show(obj.Type)
Next
End Sub
Thanks and regards,
CHANDRA SHEKAR G
Developer Advocate
Autodesk Developer Network
