Announcements
Attention for Customers without Multi-Factor Authentication or Single Sign-On - OTP Verification rolls out April 2025. Read all about it here.

@JhoelForshav ,

 

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