hexagon logo

How to use AppEvents?

Hello all After searching the forums and spending time trying to figure this out I came up short. I am trying to run code as soon as a DIMENSION command is created via the AppEvents automation in Excel VBA.for example
Private Sub AppEvents_OnAddObject(ByVal PartProg As PCDLRN.IPartProgram, ByVal DimensionCommand As Command)
    ' Event subroutine. This activates when a dimension command is fired.
MsgBox "Do something"
End Sub

At the moment it's triggered by ANY new item inserted in PcDmis no matter the type. How do you get it to trigger for SPECIFIC commands ONLY?

Any input is welcomed?
Thanks,
Kp61dude!
Parents Reply Children
No Data